系统设定除了使用手动的方式编辑配置文件之外 (例如 /etc/inittab, /etc/fstab 等),其实在 Red Hat 系统的 RHEL、CentOS 及 Fedora 还有提供一支程序来管理的,那就是 setup 这个指文本模式设置工具。实际上, setup 只有在 Red Hat 的系列才有, 在其他的 Linux distributions 并不存在,setup 还是挺实用的。
CentOS 6/RHEL6最小化安装后一般无法使用无法使用setup命令。可以通过yum源来安装程序包:
yum install setuptool system-config-firewall system-config-securitylevel-tui authconfig system-config-network-tui ntsysv system-config-keyboard
然后输入命令“setup”即可即可呼出如上图。
可能遇到的问题:
(1)dbus.exceptions.DBusException: org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[root@topseek ~]# system-config-firewall-tui Traceback (most recent call last): File "/usr/bin/system-config-firewall-tui", line 29, in import fw_tui File "/usr/share/system-config-firewall/fw_tui.py", line 34, in import fw_nm File "/usr/share/system-config-firewall/fw_nm.py", line 30, in 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
解决方法:
[root@topseek ~]# service messagebus start Starting system message bus: [ OK ] [root@topseek ~]# chkconfig messagebus on
(2)没有安装dbus-python、dbus-python-devel
拓展参考资料:
(1)Bug 1123919 – system-config-firewall-tui won’t start (ImportError: No module named fw_nm)