Linux下停止SendMail程式[Linux基礎]

tangyunoracle發表於2014-01-05
我們在安裝虛擬機器經常為了加快虛擬機器啟動,都要停掉SendMail程式。下面是停止SendMail程式啟動的過程。
1、執行命令service sendmail stop
2、執行命令:chkconfig --list sendmail
sendmail 0:off 1:off 2:on 3:on 4:on 5:on 6:off
表明sendmail在level在2、3、4、5時是自動啟動sendMail服務的,一般系統設定為level 3(命令列介面)或者level 5(圖形介面),以後機器重啟,sendMail會自動重啟。
# chkconfig --level 2 sendmail off
# chkconfig --level 3 sendmail off
# chkconfig --level 4 sendmail off
# chkconfig --level 5 sendmail off
# chkconfig   --list   sendmail
這樣以來,sendmail在2、3、4、5級別也關閉了。這樣,機器重啟之後,sendmail也不會重啟了執行命令
# /etc/init.d/sendmail   stop
# chkconfig   sendmail   off
==》解除安裝linux的郵件系統sendmail
# service sendmail stop
    Shutting down sendmail:                            [  OK  ]
    Shutting down sm-client:                           [  OK  ]
# chkconfig --del sendmail
# mv /usr/lib/sendmail /usr/lib/sendmail.bk
# ls /usr/sbin/sendmail -l
# mv /usr/sbin/sendmail /usr/sbin/sendmail.bk
# ls -l /usr/bin/newaliases
# mv /usr/bin/newaliases /usr/bin/newaliases.bk
# ls -l /usr/bin/mailq
# mv /usr/bin/mailq /usr/bin/mailq.bk
==》Solaris系統:
1、停止程式:
# /etc/init.d/sendmail stop
2、禁止作業系統啟動時自動啟動此服務程式:
# cd /etc/rc2.d (r3.d  solaris 10)
# mv S88sendmail S88sendmail.bk
==》AIX系統:
1、停止程式:
# stopsrc -s sendmail
2、禁止作業系統啟動時自動啟動此服務程式:
# chrctcp -d sendmail
 =================End======================================

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24930246/viewspace-1067323/,如需轉載,請註明出處,否則將追究法律責任。

相關文章