postgresql随机启动设置

本文介绍了PostgreSQL随机启动的设置方法,包括源码安装和rpm安装的不同步骤。对于源码安装,需要修改启动脚本并创建相应的符号链接;而对于rpm安装,则主要通过chkconfig进行配置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值