1:安装nginx
sudo apt-get install nginx
检测 nginx : sudo nginx -t 出现如下表示成功
2:安装配置mysql
2.1:安装mysql
sudo apt-get install mysql-server mysql-client
2.2:客户端连接mysql
B:如果没有上面这条:
B. 1:开启对外访问:
grant all privileges on *.* to 'zzz'@'%' identified by 'zzz111112' with grant option;
B.2mysql.cnf中确保此行被注释了
B.3 重启:
service mysql restart
C:客户端连接到mysql
3:安装php
sudo apt-get install php php-fpm
4:配置环境
4.1: 修改nginx.conf配置你的项目
在http中添加:
sudo nginx -t 检测没问题后重启nginx: sudo service nginx restart
4.2:修改php-fpm.conf(报502多是没做下面配置)
配置添加:
[www]
listen = 127.0.0.1:9000
listen.owner = nobody
listen.group = nobody
sudo service php7.0-fpm restart
4.3:配置 hosts
4.4:看到下面的页面,nice,成功了...