php 7 mysql 8 nginx 1.14

安装nginx

设置安装源
yum localinstall http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
yum -y install nginx
安装mysql8
yum localinstall https://repo.mysql.com//mysql80-community-release-el7-
1.noarch.rpm
yum install mysql-community-server
service mysqld start
查看初始化密码
grep 'temporary password' /var/log/mysqld.log

修改密码
如果提示无法更新,请先FLUSH PRIVILEGES;

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的密码'; 
FLUSH PRIVILEGES;

配置文件 /etc/my.cnf

mysql8加密方式更改

default_authentication_plugin= mysql_native_password

整个参考

[mysqld]
;设置3306端口
port = 3306 
; 允许最大连接数
max_connections=200
; 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
; 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
default_authentication_plugin= mysql_native_password
[mysql]
; 设置mysql客户端默认字符集
default-character-set=utf8
安装php7.2
设置安装源
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
安装php7.2
yum -y install php72w php72w-cli php72w-fpm php72w-common php72w-devel php72w-embedded php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml
安装redis
yum install -y http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum --enablerepo=remi install redis

启动

service redis start

或者

systemctl start redis

你可能感兴趣的:(php 7 mysql 8 nginx 1.14)