RHEL 5 的 postgresql 版本是 8.1
公司要我們裝 7.4
所以就使用內建的系統工具去移除 postgresql
結果偉大的 red hat 計算相依性的結果後要將 httpd 與 php 5 移除
但是之後我需要使用 phppgadmin 來管理我的 postgresql 資料庫
因此就只好全部自己手動安裝
發生了不少問題
避免日後重導覆轍
將筆記寫下來是最安全的:)
httpd 2.2.3:
./configure --enable-so
make
make install
php 5.2.6:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-pgsql --without-sqlite
phppgadmin 4.2:
解壓後直接丟到httpd的html目錄下
(如/usr/local/apache2/htdocs/)
postgresql:
see the INSTALL file
1. 如果想要讓 postgres 登入, 一定要先修改 postgres 的密碼(postgres 的密碼不能為空)
2. vim /etc/phppgadmin/config.inc.php
3. 修改 $conf['extra_login_security'] = true;
4. 變成 $conf['extra_login_security'] = false;
5. 這樣子就可以用 postgres 登入.
省卻每次打postgresql相關指令都要下絕對路徑:
vim ~/.bashrc # 設定環境參數, 將下述寫入 .bashrc 檔最下面即可
export POSTGRE_HOME=/usr/lib/postgresql/8.2
export PGLIB=$POSTGRE_HOME/lib
export PGDATA=/var/postgresql/data
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$PGLIB"
export PATH=$PATH:$POSTGRE_HOME/bin
source ~/.bashrc
postgresql 開機自動執行:
chmod a+x /root/software/postgresql-7.4.19/contrib/start-scripts/linux
cp /root/software/postgresql-7.4.19/contrib/start-scripts/linux /etc/init.d/postgresql
chkconfig --add postgresql
Reference:
1. http://bbs.chinaunix.net/archiver/tid-781168.html
2. http://plog.longwin.com.tw/my_note-unix/2007/07/13/debian_postgresql_phppgadmin_2007
P.S. LAPP(Linux Apache Postgresql PHP)
沒有留言:
張貼留言