centos7源码编译安装Postgresql9.6.2
2017-03-15 00:00
441 查看
最小化安装centos7
yum install libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel openssl openssl-devel openldap openldap-devel readline readline-devel pam pam-devel systemd-devel tcl-devel -y
groupadd postgres
useradd -g postgres postgres
passwd postgres(新建用户密码)
cd /
mkdir -p postgres-data
chmod +w postgres-data
chown -R postgres:postgres /postgres-data
./configure --prefix=/usr/local/pgsql --with-tcl --with-systemd --with-gssapi --with-pam --with-ldap --with-openssl --with-libxml --enable-thread-safety --with-zlib --with-selinux --with-readline
su - postgres(切换用户)
/usr/local/pgsql/bin/initdb -D /postgres-data/(初始化数据库)
拷贝启动脚本
cd (源码包)/contrib/start-scripts/linux /etc/init.d/postgresql
chmod +x /etc/init.d/postgresql
注意:有部分坑,比如文件夹不存在,pgdata路径错误的,自己稍稍修改,祝君成功!
yum install libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel openssl openssl-devel openldap openldap-devel readline readline-devel pam pam-devel systemd-devel tcl-devel -y
groupadd postgres
useradd -g postgres postgres
passwd postgres(新建用户密码)
cd /
mkdir -p postgres-data
chmod +w postgres-data
chown -R postgres:postgres /postgres-data
./configure --prefix=/usr/local/pgsql --with-tcl --with-systemd --with-gssapi --with-pam --with-ldap --with-openssl --with-libxml --enable-thread-safety --with-zlib --with-selinux --with-readline
su - postgres(切换用户)
/usr/local/pgsql/bin/initdb -D /postgres-data/(初始化数据库)
拷贝启动脚本
cd (源码包)/contrib/start-scripts/linux /etc/init.d/postgresql
chmod +x /etc/init.d/postgresql
注意:有部分坑,比如文件夹不存在,pgdata路径错误的,自己稍稍修改,祝君成功!
相关文章推荐
- centos6.6下源码编译安装PostgreSQL9.5.x
- centos 7下源码编译安装php支持PostgreSQL
- CentOS 7.0 下 源码编译安装PostgreSQL
- Centos源码编译安装postgresql
- Centos7下Postgresql源码编译安装
- CentOS7源码编译安装Postgresql9.5
- CentOS 7.0 下 源码编译安装PostgreSQL
- centos下postgresql源码编译安装与主备异步配置
- CentOS编译postgresql源码,以及安装pg依赖包
- CentOS release 5.6 (Final)源码编译安装fcitx-3.6.3方法
- CentOS5.6下使用cmake编译MySQL5.5.13源码和安装笔录
- centos源码编译安装mysql-5.5.13
- linux - Centos 单机 源码 编译 安装 mysql cluster 7.2.7 source install
- CentOS 5.X 源码编译安装LAMP(Apache+MySQL+PHP)
- Centos-Server-Mysql服务(源码编译安装)--(三)
- centos 源码编译安装gcc 4.7.0
- CentOS源码编译安装Nginx和tcp_proxy module
- Centos 5.5 Lamp源码包安装编译
- 在centos 6 64位下使用源码编译安装svn 1.7
- CentOS5.6下使用cmake编译MySQL5.5.13源码和安装笔录