标签:libxml conf ext local postgres openipmi hang 准备工作 MTA
程序目录 /usr/pgsql
数据目录/usr/local/pgdata
mkdir /opt/soft_bak cd /opt/soft_bak wget https://ftp.postgresql.org/pub/source/v10.1/postgresql-10.1.tar.gz
yum -y install lrzsz sysstat e4fsprogs ntp readline-devel zlib zlib-devel openssl openssl-devel pam-devel libxml2-devel libxslt-devel python-devel tcl-devel gcc make yum -y install smartmontools flex bison perl perl-devel perl-ExtUtils* OpenIPMI-tools systemtap-sdt-devel
useradd postgres mkdir /usr/pgsql mkdir /usr/local/pgdata chown postgres:postgres /usr/pgsql chown postgres:postgres /usr/local/pgdata
tar zxvf /opt/soft_bak/postgresql-10.1.tar.gz chown -R postgres:postgres /opt/soft_bak/postgresql-10.1
vi /home/postgres/.bashrc export PGPORT=5432 export PGDATA=/usr/local/pgdata export LANG=en_US.utf8 export PGHOME=/usr/pgsql export LD_LIBRARY_PATH=$PGHOME/lib:$LD_LIBRARY_PATH export PATH=$PGHOME/bin:$PATH:. export PGUSER=postgres export PGHOST=$PGDATA export PGDATABASE=postgres vi ~/.bash_profile PATH=$PATH:$HOME/bin:/opt/pgsql10.1/bin source ~/.bash_profile
安装
cd /opt/soft_bak/postgresql-10.1 ./configure --prefix=/opt/pgsql10.1 --with-pgport=5432 --with-perl --with-tcl --with-python --with-openssl --with-pam --without-ldap --with-libxml --with-libxslt --with-wal-blocksize=8 --with-blocksize=8 --enable-dtrace --enable-debug --enable-cassert 可选:加入--with-uuid=ossp 支持 uuid-ossp插件 gmake world gmake install-world ln -s /opt/pgsql10.1/* /usr/pgsql/
初始化数据库
检查是否安装成功,如果说是找不到或者报错,应该是环境变量设置的问题
psql -V
切换到postgres: su - postgres
initdb -D $PGDATA -E UTF8 --locale=C -U postgres -W mkdir /usr/local/pgdata/pg_log chown postgres:postgres /usr/local/pgdata/pg_log
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime (yum install ntpdate) ntpdate -u ntp.api.bz
标签:libxml conf ext local postgres openipmi hang 准备工作 MTA
原文地址:https://www.cnblogs.com/guoxueyuan/p/9184288.html