centso apache2.4 配置 php7.1
----------------
安装apache : yum install -y httpd
卸载apache : rpm -e httpd
查看apache是否安装成功 : apachectl -v
Apache安装
yum install httpd
启动
systemctl start httpd.service #启动
systemctl stop httpd.service #停止
systemctl restart httpd.service #重启
第二、设置开机启动/关闭
systemctl enable httpd.service #开机启动
systemctl disable httpd.service #开机不启动
第三、检查httpd状态
systemctl status httpd.service
网站根目录 : /var/www/html/
启动apache : centos6.5 -> service httpd start
centos7 -> cd /bin -> systemctl start httpd.service
启动服务(等同于service httpd start): systemctl start httpd.service
停止服务(等同于service httpd stop) : systemctl stop httpd.service
重启服务(等同于service httpd restart): systemctl restart httpd.service
查看服务是否运行(等同于service httpd status): systemctl status httpd.service
开机自启动服务(等同于chkconfig httpd on): systemctl enable httpd.service
开机时禁用服务(等同于chkconfig httpd on): systemctl disable httpd.service
修改配置
添加以上代码;