基于CentOS的企业架构规划及服务器优化参数(5)

hostname backup sed -i "s#oldboy40#backup#g" /etc/sysconfig/network grep "backup" /etc/sysconfig/network HOSTNAME=backup grep "backup" /etc/hosts 172.16.1.41 backup

3.4.1 手动修改网卡地址

sed -i 's#200#41#g' /etc/sysconfig/network-scripts/ifcfg-eth[01]

3.4.2 修改系统主机名称

hostname backup sed -i 's#znix#backup#g' /etc/sysconfig/network 修改hosts文件

3.4.3 重启网卡生效

/etc/init.d/network restart

3.4.4 重新建立xsheel标签进行连接

第一台克隆主机完成

3.5 虚拟主机快照

模板机初始化完成进行拍照留念

存储空间足够,快照要多保存。,

3.6 错误排查 3.6.1 网卡配置问题

a 两删除操作完成之后,不要再进行setup修改网卡操作,否则mac地址信息会再次出现

b setup命令无法设置网卡信息,主要和字符集设置有关

3.7 如何让setup 命令中防火墙配置生效 3.7.1 CentOS系统找不到setup命令工具的解决方法

 

yum -y install setuptool #安装setup命令工具 yum -y install ntsysv #安装setup工具配套的系统服务组件 yum -y install system-config-securitylevel-tui #安装setup工具配套的防火墙配置组件 yum -y install system-config-network-tui #安装setup工具配套的网络配置组件 yum -y install authconfig-gtk #安装setup工具配套的验证配置组件 yum -y install system-config-keyboard #安装setup工具配套的键盘配置组件

 

3.7.2 使用setup配置中的Firewall configuration出现的错误

 

Traceback (most recent call last): File "/usr/bin/system-config-firewall-tui", line 29, in <module> import fw_tui File "/usr/share/system-config-firewall/fw_tui.py", line 34, in <module> import fw_nm File "/usr/share/system-config-firewall/fw_nm.py", line 30, in <module> bus = dbus.SystemBus() File "/usr/lib/python2.6/site-packages/dbus/_dbus.py", line 202, in __new__ private=private) File "/usr/lib/python2.6/site-packages/dbus/_dbus.py", line 108, in __new__ bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop) File "/usr/lib/python2.6/site-packages/dbus/bus.py", line 125, in __new__ bus = cls._new_for_bus(address_or_type, mainloop=mainloop) dbus.exceptions.DBusException: org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

 

3.7.3 解决办法

yum install -y system-config-firewall system-config-firewall-tui dbus eggdbus && service messagebus start

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/fd7c27addaf2d44677989768e276be35.html