cd /usr/ports/databases/postgresql84-server/
sudo make install clean
sudo emacs /etc/login.conf
---
postgres:\
:lang=en_US.UTF-8:\
:setenv=LC_COLLATE=C:\
:tc=default:
---
and run `cap_mkdb /etc/login.conf'.
Then add 'postgresql_class="postgres"' to /etc/rc.conf.
To initialize the database, run
sudo /usr/local/etc/rc.d/postgresql initdb
You can then start PostgreSQL by running:
sudo /usr/local/etc/rc.d/postgresql start
To run PostgreSQL at startup, add
'postgresql_enable="YES"' to /etc/rc.conf
监听所有地址
sudo emacs /usr/local/pgsql/data/postgresql.conf
listen_addresses = '*'
允许某ip段连接
sudo emacs /usr/local/pgsql/data/pg_hba.conf
# my lan
host all all 192.168.64.0/22 md5
修改pgsql密码
su
su pgsql
psql -d postgres
alter user pgsql with password '******';
给某个db增加过程语言
createlang plpgsql yangchao
posted on 2009-12-16 16:33
大日如来 阅读(444)
评论(0) 编辑 收藏 引用 所属分类:
游戏-编程