ITPub博客

首页 > 数据库 > Oracle > postgresql随机启动设置

postgresql随机启动设置

原创 Oracle 作者:panpong 时间:2017-02-03 22:17:51 0 删除 编辑

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博客 ” ,链接:https://blog.itpub.net/16976507/viewspace-2133043/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
数据库工程师,熟悉Oracle,Postgresql,MySQL等主流关系型数据库运维,调优,一直活跃在运维一线。了解Python,Django,简单自动化运维系统开发。

注册时间:2009-03-06

  • 博文量
    142
  • 访问量
    392344