CentOS5ã«yumã§PostgreSQL8.3ãã¤ã³ã¹ãã¼ã«ãã
CentOS 5ç³»ã®OSã§ãyumã使ãæ¨æºã®ã¾ã¾PostgreSQLã®ã¤ã³ã¹ãã¼ã«ãè¡ãã¨ãPostgreSQL 8.1.11ãã¤ã³ã¹ãã¼ã«ããããã¨ã³ã¸ã³ã®æ¹è¯ãè¡ããã¦é«éã«åä½ããã¨è¨ããã 8.3 ãææ°ã® 8.4 ãå©ç¨ãããæã¯ã tar.gz ã§ã½ã¼ã¹ãæã£ã¦ãã¦ã³ã³ãã¤ã«ããæ¹æ³ããããããã£ã±ãyumããããªãã¨æãç§ã®ãããªå ´åã«ã¯ã以ä¸ã®æ¹æ³ã§ææ°ã® PostgreSQLãå©ç¨ãããã¨ã«ããã
ã¾ãã¯ãã¤ã³ã¹ãã¼ã«ãã¦ããPostgreSQLãã¢ã³ã¤ã³ã¹ãã¼ã«
# yum -y remove postgresql
次ã«pgdg-CentOS - PostgreSQL 8.4.X PGDG RPMs for CentOS - Yum Repository Configuration ãã欲ãããã¼ã¸ã§ã³ã®PostgreSQLç¨ãªãã¸ããªãå ¥æããã¤ã³ã¹ãã¼ã«ã
# wget http://yum.pgsqlrpms.org/reporpms/8.3/pgdg-centos-8.3-6.noarch.rpm
# rpm -ivh pgdg-centos-8.3-6.noarch.rpm
ç¶ãã¦å ã ãããªãã¸ã㪠CentOS-Base.repo ãç·¨éããBaseãããupdateãã®gpgkey= ã®è¡ã®ç´ä¸ã«ã ãexclude=postgres*ãã追è¨ããããã®å¾ã§ yum ã使ã£ã¦ PostgreSQL ãã¤ã³ã¹ãã¼ã«ããã°ã8.3ç³»ã®postgreSQLãã¤ã³ã¹ãã¼ã«ã§ããã
# yum -y install postgresql-server postgresql-devel php-pgsql
ã¤ã³ã¹ãã¼ã«ãããããã±ã¼ã¸ã確èªããã¨ä»¥ä¸ã®éããã¡ããã¨æ°ãããã¼ã¸ã§ã³ã«ãªã£ã¦ããã
# rpm -qa| grep postgres
postgresql-libs-8.3.7-1PGDG.rhel5
postgresql-8.3.7-1PGDG.rhel5
postgresql-server-8.3.7-1PGDG.rhel5
compat-postgresql-libs-4-1PGDG.rhel5
postgresql-devel-8.3.7-1PGDG.rhel5
以ä¸ãè£è¶³æ å ±ãã¤ã³ã¹ãã¼ã«ããPostgreSQLãµã¼ããèµ·åããéã«ã¯ãååèµ·åã«éãæåã§initdbãå®è¡ããã¼ã¿ãã¼ã¹ã¯ã©ã¹ã¿ãåæåããå¿ è¦ããããä¸è¨æé ã§ã¤ã³ã¹ãã¼ã«ããå ´åã«èªåä½æãããPostgreSQLã®èµ·ååæ¢ã¹ã¯ãªããã§ã¯ãååèµ·åã ã£ãå ´åã«èªåã§initdbãå®è¡ããæ©è½ã¯ãªãã®ãæåå®è¡ããªããã°ãªããªãäºæ ã§ãããæåã§ã®initdbå®è¡ã¯ä»¥ä¸ã®ããã«ããã°OKã
# su - postgres
$ initdb --encoding=UTF8 --no-locale
# /etc/init.d/postgresql start
postgresql ãµã¼ãã¹ãéå§ä¸: [ OK ]