/ 中存储网

LINUX系统启动卡在starting sendmail的解决办法

2014-07-13 20:10:05 来源:中存储网

      新装的linux系统,由于功能的需要把主机名改了。于是一连串的问题接踵而至。首先在重启服务器是发现,系统停在 starting sendmail和starting sm-client的地方要停好半天才能继续继续运行剩下的检测。再有用ssh客户端来登陆服务器需要很长时间才能建立连接。

      在网上查了下原来就是改主机名改的。更改主机名后,不能解析新主机名的ip。解决方法很简单。在hosts及network文件里将更改的主机名加进去就行啦。

[root@mj ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1    mj         localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
hostname=mj
[root@mj ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=mj
[root@mj ~]# cat /etc/resolv.conf
nameserver 202.106.0.20