linux下安装apache有两种方式:1.yum安装方式 2.源码编译的方式
yum安装apache服务
yum -y install httpd*
service httpd start #启动apache服务
service httpd stop #关闭apache服务
service httpd restart #重启apache服务
service httpd reload #重新加载
service httpd status #查看状态
chkconfig httpd on #设置开机启动
chkconfig httpd on #设置开机不启动
chkconfig httpd --level 35 on #设置在3、5上开机启动
修改selinux的状态
vi /etc/selinux/config
SELINUX=disabled