3、关闭SELINUX
[root@server ~]# vim /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 - No SELinux policy is loaded.
#SELINUX=enforcing #注释掉强制
SELINUX=disabled #关闭
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
#SELINUXTYPE=targeted #注释掉
:wq #保存退出
重启系统
[root@server ~]# reboot
安装软件包:
4、安装Apache
检查是否安装httpd,使用YUM 自动安装:
[root@server ~]# rpm -qa |grep httpd
[root@server ~]# yum -y install httpd #根据提示,输入Y安装即可成功安装
启动Apache
[root@server ~]# service httpd start
正在启动 httpd:httpd: apr_sockaddr_info_get() failed for server
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[确定]
设为开机启动
[root@server ~]# chkconfig httpd on
重启Apache
[root@server ~]# service httpd restart
停止 httpd: [确定]
正在启动 httpd:httpd: apr_sockaddr_info_get() failed for server
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[确定]
查看启动Apache运行状态
[root@server ~]# service httpd status
httpd (pid 1290) 正在运行...
浏览器访问:
CentOS 6.3安装配置LAMP服务器(Linux+Apache+MySQL+PHP5)(2)
内容版权声明:除非注明,否则皆为本站原创文章。
转载注明出处:http://www.heiqu.com/531f4ef5d5e141fbf3e50b4e0d5a1224.html