安装POSTGRESQL
# cd /usr/ports/databases/postgresql83-server && make install clean
# echo ‘postgresql_enable=”YES”‘ >> /etc/rc.conf
# /usr/local/etc/rc.d/postgresql initdb
# passwd pgsql
# su – pgsql
$ createuser -P -s -e XXXX (创建一个新的超级用户)
安装phpPgAdmin
# cd /usr/ports/databases/phppgadmin && make install clean
# ee /usr/local/etc/apache22/Includes/phppgadmin.conf
Alias /phppgadmin/ “/usr/local/www/phpPgAdmin/”
<Directory “/usr/local/www/phpPgAdmin/”>
Options none
AllowOverride LimitOrder Deny,Allow
Deny from all
#Allow from 127.0.0.1 .example.com
Allow from 127.0.0.1 192.168
#Allow from all
</Directory>
# ee /usr/local/www/phpPgAdmin/conf/config.inc.php
$conf[‘default_lang’] = ‘chinese-utf8-zh_CN’;
# apachectl restart
http://localhost/phppgadmin/
安装过程错误解决:
如果先安装了KDE3或者其他软件,再安装postgresql83可能会提示冲突终止安装,比如提示postgresql81-client冲突.
# cd /usr/ports/databases/postgresql81-client && make deinstall
卸载postgresql81-client再重新安装
如果有安装PHP5还要重新安装pgsql.so和pdo_pgsql.so
# cd /usr/ports/databases/php5-pgsql && make deinstall
# cd /usr/ports/lang/php5-extensions && make reinstall clean FORCE_PKG_REGISTER=YES
重启PGSQL
$ pg_ctl restart -D /usr/local/pgsql/data/
重载配置文件
$pg_ctl reload -D /usr/local/pgsql/data/
远程登录
postgresql.conf
listen_addresses = ‘*’
pg_hba.conf
hostssl all all 192.168.0.1/24 md5
hostssl all all 12.12.151.15/32 md5
—
免费在线记账服务,个人理财好帮手,小型企业财务管理工具。
http://www.keepaccounts.com/