标签:arch systemctl lnmp move 分享 host 官方 mct pac
安装7.2把7.1改成7.2就行
使用第三方扩展epel源安装php7.2 #移除旧版php [root@web02 ~]# yum remove php-mysql-5.4 php php-fpm php-common #安装扩展源 [root@web02 ~]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm [root@web02 ~]# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm #安装php7版本 [root@web02 ~]# yum -y install php71w php71w-cli php71w-common php71w-devel php71w-embedded \ php71w-gd php71w-mcrypt php71w-mbstring php71w-pdo php71w-xml php71w-fpm php71w-mysqlnd php71w-opcache php71w-pecl-memcached php71w-pecl-redis php71w-pecl-mongodb
nginx
去官方站点获取yum仓库
[root@web02 ~]# cat /etc/yum.repos.d/nginx.repo [nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/7/$basearch/ gpgcheck=0 enabled=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 nginx
mysql
//下载官方扩展源, 扩展源集成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‘;
标签:arch systemctl lnmp move 分享 host 官方 mct pac
原文地址:https://www.cnblogs.com/john5yang/p/10203979.html