- 1. 安装nginx
yum install nginx
##开启nginx
service nginx start
-
2.安装MYSQL
yum localinstall http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
yum install mysql-community-server
//开启mysql
service mysqld start
//查看mysql的root账号的密码
grep 'temporary password' /var/log/mysqld.log
//登录mysql
mysql -uroot -p
//修改密码
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password';
//修改root用户可远程登录
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
//刷新
flush privileges;
-
3.安装php7.1
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
//查看
yum search php71w
//安装php以及扩展
yum install php71w php71w-fpm php71w-cli php71w-common php71w-devel php71w-gd php71w-pdo php71w-mysql php71w-mbstring php71w-bcmath
//开启服务
service php-fpm start