php7.2加mysql8.0_centos7 安装lnmp,php7.2,mysql8.0,nginx

安装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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值