centso apache2.4 配置 php7.1

----------------
安裝apache : yum install -y httpd
卸載apache : rpm -e httpd
查看apache是否安裝成功 : apachectl -vhtml

Apache安裝
yum install httpd
啓動
systemctl start httpd.service #啓動
systemctl stop httpd.service #中止
systemctl restart httpd.service #重啓
第2、設置開機啓動/關閉
systemctl enable httpd.service #開機啓動
systemctl disable httpd.service #開機不啓動
第3、檢查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.serviceapache

修改配置centos

 

添加以上代碼;網站

相關文章
相關標籤/搜索