Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7610783
  • 博文数量: 1769
  • 博客积分: 18684
  • 博客等级: 上将
  • 技术积分: 16352
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-02 10:28
个人简介

啥也没写

文章分类

全部博文(1769)

文章存档

2024年(15)

2023年(44)

2022年(39)

2021年(46)

2020年(43)

2019年(27)

2018年(44)

2017年(50)

2016年(47)

2015年(15)

2014年(21)

2013年(43)

2012年(143)

2011年(228)

2010年(263)

2009年(384)

2008年(246)

2007年(30)

2006年(38)

2005年(2)

2004年(1)

分类: LINUX

2008-04-30 16:18:58

今天没事,所以把postgresql编译了一下,记下过程,以备以后有用
 
下载:
tar -zxvf postgresql-8.3.1.tar.gz
cd postgresql-8.3.1
./configure --prefix=/usr/local/psql
再果没通过,我少装了readline,错误提示中可以说用--without-readline跳过
./configure --prefix=/usr/local/psql --without-readline 
make;make install
。。。。。。。。
终于OK了,
创建postgresql用户及目录
useradd postgres
passwd postgres
mkdir date
chown -R postgres date
 
切换用户,初始化数据库
su - postgres
/usr/local/psql/bin/initdb -D /usr/local/psql/date
 
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 zh_CN.
The default database encoding has accordingly been set to EUC_CN.
initdb: could not find suitable text search configuration for locale zh_CN
The default text search configuration will be set to "simple".
fixing permissions on existing directory /usr/local/psql/date ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers/max_fsm_pages ... 32MB/204800
creating configuration files ... ok
creating template1 database in /usr/local/psql/date/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... 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 /usr/local/psql/date
or
    ./pg_ctl -D /usr/local/psql/date -l logfile start
 
运行并创建数据库
[postgres@localhost bin]$ ./postmaster -D /usr/local/psql/date
LOG:  database system was shut down at 2008-04-27 13:35:00 CST
LOG:  autovacuum launcher started
LOG:  database system is ready to accept connections
[postgres@localhost bin]$ ./createdb test
 
[postgres@localhost bin]$ ./psql test
Welcome to psql 8.3.1, the PostgreSQL interactive terminal.
Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit
test=#
好了,接下来就可以操作了!
阅读(2614) | 评论(0) | 转发(0) |
0

上一篇:Subversion安装简介

下一篇:用BAT隐藏小文件

给主人留下些什么吧!~~