1、查看当前服务器的版本
#方法1 cat /etc/redhat-release #方法2 rpm -q centos-release
2、安装apache
#一键安装apache yum install httpd #启动apche service httpd start
#centos7 启动httpd
apachectl start
#centos6.5 启动httpd
/etc/init.d/httpd start 或者 service httpd start
#设置apache开机自动启动
chkc