CentOS8搭建Web服务器笔记3 Mysql8+Redis6数据库
1. Mysql
1.1 安装
1.1.1 查询下载版本
https://dev.mysql.com/downloads/repo/yum/
1.1.2 下载安装Yum Repository
wget -i -c https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm
[root@VM-0-16-centos ~]# cd /usr/local/downloads
[root@VM-0-16-centos downloads]# wget -i -c https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm
--2021-02-25 20:56:48-- https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm
Resolving dev.mysql.com (dev.mysql.com)... 137.254.60.11
Connecting to dev.mysql.com (dev.mysql.com)|137.254.60.11|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://repo.mysql.com//mysql80-community-release-el8-1.noarch.rpm [following]
--2021-02-25 20:56:50-- https://repo.mysql.com//mysql80-community-release-el8-1.noarch.rpm
Resolving repo.mysql.com (repo.mysql.com)... 184.50.117.5
Connecting to repo.mysql.com (repo.mysql.com)|184.50.117.5|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 30388 (30K) [application/x-redhat-package-manager]
Saving to: ‘mysql80-community-release-el8-1.noarch.rpm’
mysql80-community-release-e 100%[===========================================>] 29.68K 38.7KB/s in 0.8s
2021-02-25 20:56:55 (38.7 KB/s) - ‘mysql80-community-release-el8-1.noarch.rpm’ saved [30388/30388]
-c: No such file or directory
No URLs found in -c.
FINISHED --2021-02-25 20:56:55--
Total wall clock time: 6.8s
Downloaded: 1 files, 30K in 0.8s (38.7 KB/s)
yum -y install mysql80-community-release-el8-1.noarch.rpm
[root@VM-0-16-centos downloads]# yum -y install mysql80-community-release-el8-1.noarch.rpm
Repository AppStream is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository PowerTools is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Last metadata expiration check: 0:05:12 ago on Thu 25 Feb 2021 08:53:29 PM CST.
Dependencies resolved.
================================================================================================================
Package Architecture Version Repository Size
================================================================================================================
Installing:
mysql80-community-release noarch el8-1 @commandline 30 k
Transaction Summary
================================================================================================================
Install 1 Package
Total size: 30 k
Installed size: 29 k
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : mysql80-community-release-el8-1.noarch 1/1
Verifying : mysql80-community-release-el8-1.noarch 1/1
Installed:
mysql80-community-release-el8-1.noarch
Complete!
1.1.3 yum安装 Server
yum -y install mysql-server
[root@VM-0-16-centos downloads]# yum -y install mysql-server
Repository AppStream is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository PowerTools is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Last metadata expiration check: 0:17:27 ago on Thu 25 Feb 2021 09:00:38 PM CST.
Dependencies resolved.
================================================================================================================
Package Arch Version Repository Size
================================================================================================================
Installing:
mysql-server x86_64 8.0.21-1.module_el8.2.0+493+63b41e36 AppStream 22 M
Installing dependencies:
mariadb-connector-c-config noarch 3.1.11-2.el8_3 AppStream 15 k
mecab x86_64 0.996-1.module_el8.2.0+493+63b41e36.9 AppStream 393 k
mysql x86_64 8.0.21-1.module_el8.2.0+493+63b41e36 AppStream 12 M
mysql-common x86_64 8.0.21-1.module_el8.2.0+493+63b41e36 AppStream 148 k
mysql-errmsg x86_64 8.0.21-1.module_el8.2.0+493+63b41e36 AppStream 581 k
protobuf-lite x86_64 3.5.0-13.el8 AppStream 149 k
Enabling module streams:
mysql 8.0
Transaction Summary
================================================================================================================
Install 7 Packages
Total download size: 35 M
Installed size: 182 M
Downloading Packages:
(1/7): mariadb-connector-c-config-3.1.11-2.el8_3.noarch.rpm 447 kB/s | 15 kB 00:00
(2/7): mysql-common-8.0.21-1.module_el8.2.0+493+63b41e36.x86_64.rpm 4.5 MB/s | 148 kB 00:00
(3/7): mecab-0.996-1.module_el8.2.0+493+63b41e36.9.x86_64.rpm 5.0 MB/s | 393 kB 00:00
(4/7): mysql-errmsg-8.0.21-1.module_el8.2.0+493+63b41e36.x86_64.rpm 5.6 MB/s | 581 kB 00:00
(5/7): protobuf-lite-3.5.0-13.el8.x86_64.rpm 3.6 MB/s | 149 kB 00:00
(6/7): mysql-8.0.21-1.module_el8.2.0+493+63b41e36.x86_64.rpm 37 MB/s | 12 MB 00:00
(7/7): mysql-server-8.0.21-1.module_el8.2.0+493+63b41e36.x86_64.rpm 50 MB/s | 22 MB 00:00
----------------------------------------------------------------------------------------------------------------
Total 68 MB/s | 35 MB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : mariadb-connector-c-config-3.1.11-2.el8_3.noarch 1/7
Installing : mysql-common-8.0.21-1.module_el8.2.0+493+63b41e36.x86_64 2/7
Installing :