linux關閉sendmail服務

2021-07-05 06:12:04 字數 1044 閱讀 6515

方法一:

a.[root@sample ~]# /etc/rc.d/init.d/sendmail stop  --關閉sendmail服務

或者|***

[root@sample ~]# service sendmail stop  --關閉sendmail服務

shutting down sendmail: [ ok ]

shutting down sm-client: [ ok ]

b.[root@sample ~]# chkconfig sendmail off  --關閉sendmail自啟動

c.[root@sample ~]# 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:on  3:on  4:on  5:on  6:off

可以看到在啟動模式2/3/4/5都是預設啟動的,通常生產系統一般是3,可以按層級關閉服務

[root@sample ~]# chkconfig --level 2 sendmail off

[root@sample ~]# chkconfig --level 3 sendmail off

[root@sample ~]# chkconfig --level 4 sendmail off

[root@sample ~]# chkconfig --level 5 sendmail off

[root@sample ~]# chkconfig --list sendmail

sendmail 0:off 1:off 2:off 3:off 4:off 5:off 6:off

方法二:

[root@sample ~]# ntsysv

將sendmail前面[ ]中的*去掉即可。

關閉linux的sendmail服務

linux 系統啟動的時候總是在 sendmail 服務這停止較長的時間,遠遠超過了我可以忍耐的時間 chkconfig命令 root linux1 chkconfig list sendmail sendmail 0 off 1 off 2 on 3 on 4 on 5 on 6 off 可以看到...

關閉sendmail服務

遇到啟動vmware的linux系統時用很長時間,大部分時間都用來啟動sendmail服務。這種情況有幾點需要注意就可以解決,1.檢查主機名和ip是否正確,etc hosts etc sysconfig network 2.停掉sendmail服務,如果不用的話。1 service sendmail...

linux 下關閉啟動sendmail 服務

在啟動時關閉sendmail 服務 其它服務也一樣 在啟動時關閉sendmail 對其他的服務可以採取同樣的措施。而對於那些不是從inetd啟動的服務,則通過命令來關閉,例如需要關閉sendmail服務,則 etc rc.d init.d sendmail stop 然後再設定其不在系統啟動時啟動 ...