linux:lamp环境
关于LAMP


LAMP搭建
安装php和Apache
先装php,因为安装php有apache的依赖包
yum install php
启动Apache
service httpd start
启动成功,但有一个警告:无法确定主机的FQDN

解决方法:修改Apache的配置文件(/etc/httpd/conf/httpd.conf)
vim /etc/httpd/conf/httpd.conf
在文件中搜索 ServerName,去掉前面的注释,保存退出:

重新检测:


测试php
默认的Apache站点目录:/var/www/html/
1、创建一个index.php文件

2、检测

安装mysql
参考:链接

浙公网安备 33010602011771号