â
Ubuntuä¸ã§PostgreSQL 8.3.5ã¤ã³ã¹ãã¼ã«
âåæºå
ã»ã°ã«ã¼ãä½æ
groupadd postgres
ã»ã¦ã¼ã¶ã¼ä½æ
useradd -g postgres postgres -s /bin/bash
passwd postgres
ã»ãã¼ã ãã£ã¬ã¯ããªãä½æ
mkdir /home/postgres
chown postgres.postgres
chmod g=+rwx /home/postgres
â»ãã¼ã ãã£ã¬ã¯ããªä½æã¾ã§å®äºããããä¸åº¦ããã¹ã¯ãããã§ããã°ã¤ã³ãã¦ã¿ã
ã»ã¦ã¼ã¶ã¼ã®ç°å¢å¤æ°è¨å®
/home/postgresä¸ã« .bashrc ä½æ
export PATH=$PATH:/usr/local/pgsql/8.3.5/bin
export MANPATH=$MANPATH:/usr/local/pgsql/8.3.5/man
export PGDATA=/usr/local/pgsql/8.3.5/data
â
ãè¨è¿°ãã¦ä¿åã
ã»ã¤ã³ã¹ãã¼ã«ãã£ã¬ã¯ããªä½æ
mkdir /usr/local/pgsql/8.3.5
mkdir /usr/local/pgsql/8.3.5/data
chown pgsql.pgsql /usr/local/pgsql/8.3.5 -R
âpostgresqlæ¬ä½ã®ã¤ã³ã¹ãã¼ã«
./configure --prefix=/usr/local/pgsql/8.3.5
make
sudo make install
â
権éããrootã«å¤ãã£ãå ´åãpostgresã«å¤æ´ãã
âåæå
su - pgsql
initdb
âèµ·å
pg_ctl start &
âDBä½æ
createdb -T template0 hogedb