postgresql Installation from Source Code
来源:互联网 发布:淘宝买家怎么改价格 编辑:程序博客网 时间:2024/06/02 10:05
1.和其他数据库安装一样,可以根据自己的需求,修改系统参数
/etc/sysctl.conf ,/etc/security/limits.conf,
2.新建用户和组:
#groupadd postgresql
#useradd -g postgresql postgresql
3.创建相关目录:
mkdir -p /database/pgdata/pg_root
mkdir -p /opt/pgsql
chown -R postgres:postgres /database/pgdata/pg_root
4.配置环境变量
export PS1="$USER@`/bin/hostname -s`-> "
export PGPORT=1921
export PGDATA= /database/pgdata/pg_root
export LANG=en_US.utf8
export PGHOME=/opt/pgsql
export LD_LIBRARY_PATH=$PGHOME/lib:/lib64:/usr/lib64:/usr/local/lib64:/lib:/usr/lib:/usr/local/lib
export DATE=`date +"%Y%m%d%H%M"`
export PATH=$PGHOME/bin:$PATH:.
export MANPATH=$PGHOME/share/man:$MANPATH
alias rm='rm -i'
alias ll='ls -lh'
根据自己需求自己修改
5.解压安装包,可以安装了
./configure --help这个可以查看一下对应的帮助,根据自己的环境,适当选用一些参数
gmake
su
gmake install
安装完成以后
su - postgres
initdb -D /database/pgdata/pg_root
初始化以后,可以启动数据库了
通过postgres -D 或者pg_ctl -D后面跟对应的安装路径就可以了。
- postgresql Installation from Source Code
- Postfix Installation From Source Code
- zabbix Installation from source
- Zabbix installation (from source)
- Build OpenSolaris from source code
- compile mysql from source code
- Build distcc from source code
- 安装Nginx(From Source Code)
- postgresql extract (field from source) 获取年月日
- Installing Code::Blocks from source on Linux
- learn from tutorials of source code
- compile gromacs GPU version from source code
- Bluedroid From A2DP|source code reading note
- Learning English From Android Source Code:1
- Setup Samba Daemon from Source Code
- (OK) Building Android from AOSP source code
- How to get source code from APK
- android source code download from tsinghua
- Linux环境变量设置总结
- 图的深度优先搜索(DFS)——图用邻接矩阵表示
- adb server is out of date. killing...
- 黑马程序员--java设计模式
- EntityFramework5.0 Code First add-migration
- postgresql Installation from Source Code
- 浅谈中国互联网发展的三大阶段
- stored to '*' during its initialization is never read
- NoSQL非关系数据库简介
- CSS中怎么让DIV居中
- 现有分布式技术(socket、.net remoting、asp.net webservice、WSE、ES)和wcf的比较及优势
- Android 常用的距离单位
- 关于线程的停止和挂起
- NSDate 整理笔记