wget http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
wget下载安装nginx包rpm -ivh nginx-release-centos-7-0.el7.ngx.noarch.rpm
建立nginx的yum仓库# yum install -y nginx
install nginxsystemctl start nginx.service
start nginx下载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
rpm安装php相应的yum资源# yum install -y php70w
install php7.0# 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
安装php fpm安装完毕开始进行配置nginx 中的php
网上教程很多,这个改配置文件就不继续写了
网友评论