1、安装Apache:rpm -ivh httpd*
2、创建用户test:useradd test;passwd test
3、编辑Apache主配置文件:vi /etc/httpd/conf/httpd.conf
查找UserDir disable,在前面加“#”注释掉此行;
继续向下查找UserDir public_html,将前面的“#”去掉,使生效。
保存退出
4、使用test 用户登录 : su - test
在宿主目录下创建public_html目录,并在此目录下放置主页index.html
在home目录下,赋予其他用户对test有可执行的权限: chmod o+x test
5、修改selinux安全机制:vi /etc/sysconfig/selinux
将selinux=enforcing改为selinux=disabled
需要重启系统,麻烦,可以使用setenforce 0 代替
6、重启Apache服务:service httpd restart
7、客户端访问:http//192.168.0.1/~test