linux:lamp环境

关于LAMP

linux:lamp环境

 linux:lamp环境

LAMP搭建

安装php和Apache

先装php,因为安装php有apache的依赖包

yum install php

启动Apache

service httpd start

启动成功,但有一个警告:无法确定主机的FQDN

linux:lamp环境

解决方法:修改Apache的配置文件(/etc/httpd/conf/httpd.conf)

vim /etc/httpd/conf/httpd.conf

在文件中搜索 ServerName,去掉前面的注释,保存退出:

linux:lamp环境

重新检测:

linux:lamp环境

linux:lamp环境

测试php

默认的Apache站点目录:/var/www/html/

1、创建一个index.php文件

linux:lamp环境

2、检测

linux:lamp环境

安装mysql

 参考:链接

相关推荐