nginx去官方站点获取yum仓库mysql如果mysql登陆需要密码,请查看该文件[root@nginx~]#greptemporarypasswordvar 安装7.2把7.1改成7.2就行使用第三方扩展epel源安装php7.2#移除旧版php[root@web02 ~]# yum remove p
nginx
去官方站点获取yum仓库
[root@web02 ~]# cat /etc/yum.repos.d/nginx.repo [nginx]name=nginx repobaseurl=http://nginx.org/packages/centos/7/$basearch/gpgcheck=0enabled=1# 安装Nginx[root@web02 ~]# yum install nginx -y[root@web02 ~]# sed -i ‘/^user/c user www;‘ /etc/nginx/nginx.conf[root@web02 ~]# systemctl enable nginx[root@web02 ~]# systemctl start nginxmysql
//下载官方扩展源, 扩展源集成mysql5.6、5.7、8.0,仅5.7仓库是开启[root@nginx ~]# rpm -ivh http://repo.mysql.com/yum/mysql-5.7-community/el/7/x86_64/mysql57-community-release-el7-10.noarch.rpm[root@nginx ~]# yum install mysql-community-server -y[root@nginx ~]# systemctl start mysqld[root@nginx ~]# systemctl enable mysqld//如果mysql登陆需要密码,请查看该文件[root@nginx ~]# grep ‘temporary password‘ /var/log/mysqld.log
#高级方式[root@web02 ~]# mysql -uroot -p$(awk ‘/temporary password/{print $NF}‘ /var/log/mysqld.log)
#登陆mysql重新配置密码[root@nginx ~]# mysql -uroot -p‘password‘# 修改登录密码mysql> ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘Bgx123.com‘;
centos7 yum 安装lnmp