wget http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

rpm -ivh nginx-release-centos-7-0.el7.ngx.noarch.rpm

# yum install -y nginx

systemctl start nginx.service

下载repo资源
# wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
安装 mysql-community-release-el7-5.noarch.rpm
# rpm -ivh mysql-community-release-el7-5.noarch.rpm
安装mysql & 设置用户权限 & 重启
# sudo yum install -y mysql-server
# sudo chown -R root:root /var/lib/mysql
# systemctl restart mysql.service
登陆MySQL,修改密码(可以所有安装完成后自行设置):
# mysql -u root
mysql > use mysql;
mysql > update user set password=password(‘135790‘) where user=‘root‘;

mysql设置root权限的远程访问
grantallprivilegeson*.*toroot@"%"identifiedby"密码";
flush privileges; // 刷新设置立即生效
然后就可以通过navicat(或者其他工具)远程连接了
安装php
# 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 install -y php70w

# yum install -y php70w-mysql.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64

# yum install -y php70w-fpm

安装完毕开始进行配置nginx 中的php
网上教程很多,这个改配置文件就不继续写了
网友评论