首页 | 博客群 | 公社 | 专栏 | 论坛 | 图片 | 资讯 | 注册 | 帮助 | 博客联播 | 随机访问
把握机会- -| 回首页 | 2006年索引 | - -终于有自己的家了……

在 OpenBSD 4.0 上安装 PostgreSQL 8.2.0

关键词OpenBSD    PostgreSQL                                          

作者:辛亚平
日期:2006年12月18日

# groupadd postgresql
# useradd -g postgresql postgres
# passwd postgres
Changing password for user postgres.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

# cp postgresql-8.2.0.tar.gz /tmp/
# cd /tmp/
# chmod +x postgresql-8.2.0.tar.gz
# tar zxvf postgresql-8.2.0.tar.gz
# cd postgresql-8.2.0
# ./configure --prefix=/usr/local/pgsql
# gmake
# gmake install
# mkdir /var/database/pgsql/data
# chown -R postgres /var/database/pgsql/data

# su postgres
$ initdb -D /var/database/pgsql/data
ksh: initdb: not found
$ ./initdb -D /var/database/pgsql/data
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale C.
fixing permissions on existing directory /var/database/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 40
selecting default shared_buffers/max_fsm_pages ... 28MB/179200
creating configuration files ... ok
creating template1 database in /var/database/pgsql/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.
Success. You can now start the database server using:
    ./postgres -D /var/database/pgsql/data
or
    ./pg_ctl -D /var/database/pgsql/data -l logfile start
$ exit
#

# su postgres
$ /usr/local/pgsql/bin/postmaster -D /var/database/pgsql/data &
[1] 29454
$ LOG:  database system was shut down at 2006-12-16 17:57:32 CST
LOG:  checkpoint record is at 0/42C210
LOG:  redo record is at 0/42C210; undo record is at 0/0; shutdown TRUE
LOG:  next transaction ID: 0/593; next OID: 10820
LOG:  next MultiXactId: 1; next MultiXactOffset: 0
LOG:  database system is ready
$ /usr/local/pgsql/bin/createdb XoopsDB1
CREATE DATABASE
$ exit
#

【作者: 辛亚平】【访问统计:】【2006年12月18日 星期一 02:14】【注册】【打印

搜索

Google

Trackback

你可以使用这个链接引用该篇文章 http://publishblog.blogchina.com/blog/tb.b?diaryID=5966498

回复

- 评论人:与诗   2006-12-25 19:35:59   与诗的博客  

圣诞快乐~

验证码:   
评论内容: