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/