CentOS 7 快速安装 PHP环境

分类:笔记 2.65k浏览

装个php单页,没啥需求,一键yum即可。

1、安装apache和php

yum install httpd httpd-devel

yum install php

2、路径备注:

apache配置文件:/etc/httpd/conf/httpd.conf

网站根目录:/var/www/html

3、启动和自动启动

systemctl start httpd

systemctl enable httpd