swsrl 发表于 2015-11-25 12:51:59

linux关闭sendmail服务

方法一:
a.
# /etc/rc.d/init.d/sendmail stop  --关闭sendmail服务
或者|伦理片http://www.dotdy.com/
# service sendmail stop  --关闭sendmail服务
Shutting down sendmail: [ OK ]
Shutting down sm-client: [ OK ]
b.
# chkconfig sendmail off  --关闭sendmail自启动
c.
# chkconfig --list sendmail --确认sendmail自启动已被关闭(都为off就OK)
sendmail 0:off 1:off 2:off 3:off 4:off 5:off 6:off
如果chkconfig --list sendmail显示如下:
sendmail 0:off 1:off 2:on3:on4:on5:on6:off
可以看到在启动模式2/3/4/5都是默认启动的,通常生产系统一般是3,可以按层级关闭服务
# chkconfig --level 2 sendmail off
# chkconfig --level 3 sendmail off
# chkconfig --level 4 sendmail off
# chkconfig --level 5 sendmail off
# chkconfig --list sendmail
sendmail 0:off 1:off 2:off 3:off 4:off 5:off 6:off
方法二:
# ntsysv
将sendmail前面[ ]中的*去掉即可。

页: [1]
查看完整版本: linux关闭sendmail服务