PG随机启动设置
如果是源码安装则首选参考源码包中的:../postgresql-9.4.1/contrib/start-scripts文件;
将对应文件更名为:/etc/init.d/postgresql (or# /etc/rc.d/init.d/postgresql)
并且make symlinks to
# /etc/rc.d/rc0.d/K02postgresql
# /etc/rc.d/rc1.d/K02postgresql
# /etc/rc.d/rc2.d/K02postgresql
# /etc/rc.d/rc3.d/S98postgresql
# /etc/rc.d/rc4.d/S98postgresql
# /etc/rc.d/rc5.d/S98postgresql
# Or, if you have chkconfig, simply:
chkconfig --add postgresql
其次,编辑/etc/rc.local文件,添加pg_ctl start -D $PGDATA -l logfile
如果是rpm安装,则仅需要配置chkconfig:
#chkconfig postgresql on
#systemctl enable postgresql --linux 7
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16976507/viewspace-2133043/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/16976507/viewspace-2133043/
本文介绍了PostgreSQL随机启动的设置方法,包括源码安装和rpm安装的不同步骤。对于源码安装,需要修改启动脚本并创建相应的符号链接;而对于rpm安装,则主要通过chkconfig进行配置。
1513

被折叠的 条评论
为什么被折叠?



