Centos7.3服务器搭建LNMP环境的方法

2019-10-10 13:14:17丽君

3.2 修改php-fpm配置文件

php-fpm配置文件位置:(/etc/php-fpm.d/www.conf)

修改

user =nginx
group=nginx

4.放入测试文件

cd /forest/nginxDir/html
echo 'hello eric' >index.php

5.启动服务

5.1 启动nginx服务:

systemctl start nginx.service

查看启动状态:

systemctl status nginx

看到以下字眼说明启动成功!

​Active: active (running) since 六 2016-11-19 13:40:04 CST; 50min ago

5.2 启动PHP-FPM:

systemctl start php-fpm.service

查看启动状态:

systemctl status php-fpm.service

看到以下字眼说明启动成功!

​Active: active (running) since 六 2016-11-19 14:14:33 CST; 18min ago

6.测试

在浏览器打开192.168.44.129:80/index.php

看到 hello eric 就大功告成~

希望本文所述对大家CentOS服务器配置有所帮助。