首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

chkconfig 跟 service区别

2014-01-21 
chkconfig 和 service区别???先说共性吧:chkconfig和service都可以作为服务启动,比如:?service postgresql

chkconfig 和 service区别

?

?

?

先说共性吧:

chkconfig和service都可以作为服务启动,比如:

?

service postgresql start

或者

/etc/init.d/postgresql start

?

再说区别:

chkconfig除了可以启动服务外,还可以把服务添加到启动列表中。

所以可以狭窄的理解为:

service启动的服务在机器重启后将会失效。

而chkconfig添加的服务在机器重启后依然生效。

?

http://zhidao.baidu.com/link?url=jkQbO776pg6sqpeUWQZODYds1NtnFWQC5S8-hW_BbtKDWOu1Fn5XZ5NUZ9EPfYrSMoDg8MtgYJ6MbpTGoBx7g_

?

?

?----------------------------------------------------------------------------------------------------------------

顺便说一下chkconfig如何把postgresql添加到自启动列表,(背景:postgresql是用yum安装的)

1、用rot登录

1、cd /etc/init.d/

2、chkconfig --add postgresql9.1

3、可以用chkconfig --list来查看启动列表

4、添加好以后就可以利用service postgresql9.1 start/stop/restart来控制它了。

?

refurl:http://www.cnblogs.com/mchina/archive/2012/06/06/2539003.html

?

?http://soft.chinabyte.com/os/494/12379994.shtml

?

?

?

热点排行