1. 故障提示

setup 命令中防火墙配置选项无法打开 - 图1

1.1 如何让setup 命令中防火墙配置生效

1.1.1 CentOS系统找不到setup命令工具的解决方法

  1. yum -y install setuptool
  2. #安装setup命令工具
  3. yum -y install ntsysv
  4. #安装setup工具配套的系统服务组件
  5. yum -y install system-config-securitylevel-tui
  6. #安装setup工具配套的防火墙配置组件
  7. yum -y install system-config-network-tui
  8. #安装setup工具配套的网络配置组件
  9. yum -y install authconfig-gtk
  10. #安装setup工具配套的验证配置组件
  11. yum -y install system-config-keyboard
  12. #安装setup工具配套的键盘配置组件

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

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

1.1.3 故障解决办法

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

2. 推荐方法

  1. dbus-daemon --system

2.1 yum 安装大礼包

  1. yum groupinstall "Base" "Debugging tools" "Compatibility libraries" "Development" -y