- 安装vmware
- 加载ubantu iso镜像
-
ubantu下安装ssh
- 安装:sudo apt-get install openssh-server
- 检测:
表示成功
-
xshell 登录(注意:ubantu需要在开机登录状态下)
- 检测:
- 连接
- 检测:
2:安装nginx
- 安装sudo apt-get install nginx
- 检测 nginx : sudo nginx -t 出现如下表示成功
3:安装配置mysql
- 安装mysql
- 安装:sudo apt-get install mysql-server mysql-client
- 检测 :mysql -h 127.0.0.1 -P 3306 -u root -pzzz11112 出现:如下表示成功
- 客户端连接mysq
- select User,host from mysql.user;
-
如果没有上面这条:
- 开启对外访问: grant all privileges on *.* to 'zzz'@'%' identified by 'zzz111112' with grant option
- mysql.cnf中确保此行被注释了
- 重启:service mysql restart
- 开启对外访问: grant all privileges on *.* to 'zzz'@'%' identified by 'zzz111112' with grant option
- select User,host from mysql.user;
- 客户端连接到mysql
4:安装php
sudo apt-get install php php-fpm
5:配置环境
-
修改nginx.conf配置你的项目
- 在http中添加:
- sudo nginx -t 检测没问题后重启nginx: sudo service nginx restart
- 在http中添加:
-
修改php-fpm.conf(报502多是没做下面配置)
- 配置添加:[www] listen = 127.0.0.1:9000 listen.owner = nobody listen.group = nobody
- 然后重启php sudo service php7.0-fpm restart
- 配置 hosts
- 看到下面的页面,nice,成功了...