Ubuntu Server 12.04源码安装PostgreSQL 9.2.4
2013-05-29 20:25
609 查看
1.下载源码包: http://ftp.postgresql.org/pub/source/v9.2.4/postgresql-9.2.4.tar.bz22.安装依赖:apt-get install gcc make libreadline6 libreadline6-dev (提醒缺少什么就安装什么,如提示缺少,zlib库,请参照http://greenzb.blog.51cto.com/745896/1212817,安装)3.开始编译: (1)解压源码包到 /home/linux/postgresql-9.2.3 (2)./configure --prefix=/要安装postgresql到哪个目录 (3)sudo make(成功提示:All of PostgreSQL successfully made. Ready to install.) (4)su(切换到root用户) (5)make install(成功提示:PostgreSQL installation complete.) (6)adduser postgres (7)创建数据目录:mkdir /你安装postgresql的目录/data (8)修改拥有者:chown postgres /你安装postgresql的目录/data (9)切换到postgres用户:su - postgres (10)初始化数据目录:/你安装postgresql的目录/bin/initdb -D /你安装postgresql的目录/data(成功提示:Success. You can now start the database server using: /opt/postgresql-9.2/bin/postgres -D /opt/postgresql-9.2/data
or
/opt/postgresql-9.2/bin/pg_ctl -D /opt/postgresql-9.2/data -l logfile start) (11)启动postgresql服务:/你安装postgresql的目录/bin/postgres -D /你安装postgresql的目录/data >logfile 2>&1 & (12)创建数据库:/你安装postgresql的目录/bin/createdb test (13)连接到数据库:/你安装postgresql的目录/bin/psql test 如果成功,你将会看到:( psql (9.2.3)
Type "help" for help.)
or
/opt/postgresql-9.2/bin/pg_ctl -D /opt/postgresql-9.2/data -l logfile start) (11)启动postgresql服务:/你安装postgresql的目录/bin/postgres -D /你安装postgresql的目录/data >logfile 2>&1 & (12)创建数据库:/你安装postgresql的目录/bin/createdb test (13)连接到数据库:/你安装postgresql的目录/bin/psql test 如果成功,你将会看到:( psql (9.2.3)
Type "help" for help.)
相关文章推荐
- 安装Drupal7.12+Postgresql9.1(Ubuntu Server 12.04)
- ubuntu server 12.04 安装postgresql 9.2
- 在ubuntu 6.06 server 下源码安装Postgresql8.2.0
- 在Ubuntu Server 14.04 LTS版上以git方式源码安装Odoo8.0
- 在Ubuntu Server 14.04上源码安装Odoo 9.0
- 在Ubuntu Server上源码安装OpenERP(odoo) 8.0,并配置wsgi和nginx运行环境
- Ubuntu16.04 源码安装nginx并修改Server名
- ubuntu server 12.04上的skyeye1.3.5安装和使用(打造最精确的安装步骤和注意事项)
- ubuntu server 12.04 安装后相关设置
- Ubuntu server PostgreSQL安装以及基本操作
- 在Ubuntu Server 12.04 LTS上搭建可远程访问的PostgreSQL 9.1环境
- ubuntu 12.04 Server 上安装 MongoDB及运行
- ubuntu server 12.04 安装 iredmail
- OpenStack Havana 部署在Ubuntu 12.04 Server 【OVS+GRE】(三)——计算节点的安装
- ubuntu 12.04 Server 上安装 MongoDB及运行
- 如何在 Ubuntu 12.04 Server 中安装图形用户界面
- 在Ubuntu 12.04(精确的穿山甲)上安装LAMP Server
- ubuntu server 12.04 安装 mysql5.7
- 如何在Ubuntu 12.04 Server 中安装图形用户界面
- 在virtualbox中安装ubuntu server 12.04,搭建嵌入式开发环境