這幾日在整vmware + openfiler + rhel5u3搭建Oracle 10g的RAC環境,可發現Linux系統啟動的時候總是在sendmail服務這停止較長的時間,遠遠超過了我可以忍耐的時間….
Starting xinetd: [ OK ]
Starting uuidd: [ OK ]
Starting sendmail: 等待…
Starting sm-client: 繼續等…
想想自己做個實驗也用不到這東西,關掉不就得了~
方法一:service命令
[root@linux1 ~]# service sendmail status
sendmail (pid 3721 3711) is running...
[root@linux1 ~]# service sendmail stop
Shutting down sm-client: [OK]
Shutting down sendmail: [OK]
注意:service命令雖然已經關掉了sendmial服務,但是在下次重新啟動OS的時候,還是會隨OS啟動而啟動。
方法二:chkconfig命令
[root@linux1 ~]# chkconfig --listsendmail
sendmail 0:off 1:off 2:on 3:on 4:on 5:on 6:off
可以看到在啟動模式2/3/4/5都是默認啟動的,通常生產系統我一般是3。
[root@linux1 ~]# chkconfig --level 2 sendmail off
[root@linux1 ~]# chkconfig --level 3 sendmail off
[root@linux1 ~]# chkconfig --level 4 sendmail off
[root@linux1 ~]# chkconfig --level 5 sendmail off
[root@linux1 ~]# chkconfig --list sendmail
sendmail 0:off 1:off 2:off 3:off 4:off 5:off 6:off
這樣就可以在下次系統啟動的時禁止sendmail服務啟動了。
方法三:ntsysv
將sendmail前面[]中的*去掉即可