coetos7 安装lnmp mysql8.0
Posted 飘柔2019
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了coetos7 安装lnmp mysql8.0相关的知识,希望对你有一定的参考价值。
安装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
整个参考
[mysql] ; 设置mysql客户端默认字符集 default-character-set=utf8 [mysqld] ;设置3306端口 port = 3306 ; 设置mysql的安装目录 basedir=D:/server/mysql8/ ; 设置mysql数据库的数据的存放目录 datadir=D:/server/mysql8/data ; 允许最大连接数 max_connections=200 ; 服务端使用的字符集默认为8比特编码的latin1字符集 character-set-server=utf8 ; 创建新表时将使用的默认存储引擎 default-storage-engine=INNODB default_authentication_plugin= mysql_native_password
安装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
安装
yum -y install php72w php72w-cli php72w-common php72w-devel php72w-embedded php72w-fpm php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml php72w-process php-mysqli
经等待就可以了。
最后完成
[root@localhost 123456]# php -v PHP 7.2.11 (cli) (built: Oct 11 2018 19:14:35) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.11, Copyright (c) 1999-2018, by Zend Technologies
安装redis
yum install -y http://rpms.famillecollet.com/enterprise/remi-release-7.rpm yum --enablerepo=remi install redis
启动
service redis start
或者
systemctl start redis
查询信息
rpm -qa |grep redis
开机启动
chkconfig redis on
或者
systemctl enable redis.service
原文链接:https://www.jianshu.com/p/d217bf05fb75
以上是关于coetos7 安装lnmp mysql8.0的主要内容,如果未能解决你的问题,请参考以下文章