解决Linux sendmail启动速度慢的问题?

我的CentOS是安装在VMware虚拟机下面的,近段时间启动时sendmail启动非常慢,需要好几分钟,从这儿得到启发,然后按照上面修改的就改好了:-)


[root@CentOS_Test_Server ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain   localhost
#::1    localhost6.localdomain6 localhost6
修改为
[root@CentOS_Test_Server ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain   localhost CentOS_Test_Server
#::1    localhost6.localdomain6 localhost6
即可,就是在127.0.0.1那一行的最后面加上操作系统的主机名即可,CentOS_Test_Server来自哪儿呢,是我自定义的,来自于文件/etc/sysconfig/network

[root@CentOS_Test_Server ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
GATEWAY=192.168.1.1
HOSTNAME=CentOS_Test_Server

重启sendmail服务,1秒左右就启动完成了,ok,搞定,完成。
[root@CentOS_Test_Server ~]# service sendmail restart
Shutting down sm-client:                                   [  OK  ]
Shutting down sendmail:                                    [  OK  ]
Starting sendmail:                                         [  OK  ]
Starting sm-client:                                        [  OK  ]

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据