今天看了一下Linux下的管理工具Webmin感觉不错,安装完发现在windows下无法访问,分析了一下可能是selinux 和防火墙的问题。
首先想到关闭Selinux 开始在网上找了一些方法,发现都不好用
如:
[root@Lovel ~]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
#SELINUX=enforcing
  改为
   SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted
保存退出
reboot
……………………
 
如果不想重启系统,使用命令setenforce 0
注:
setenforce 1 设置SELinux 成为enforcing模式
setenforce 0 设置SELinux 成为permissive模式
以上个人测试都失败了
在lilo或者grub的启动参数中增加:selinux=0,也可以关闭selinux
不过大家都说的不够详细 下面是我做的修改
[root@Lovel ~]# vi /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/sda2
#          initrd /initrd-version.img
#boot=/dev/sda1
default=0
timeout=5
splashp_w_picpath=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-128.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-128.el5 or root=LABEL=/
        initrd /initrd-2.6.18-128.el5.img
    改成
        kernel /vmlinuz-2.6.18-128.el5 ro selinux=0 or root=LABEL=/
        initrd /initrd-2.6.18-128.el5.img
保存退出
reboot
……………………
用 getenforce 查看
Disabled
 
                                                                                                                             FireWolf