链接:https://pan.baidu.com/s/1ZqMtOfwaImmQkhW7pH3Bzw
提取码:tgjd
1、解压安装包 [root@zhixi opt]# tar -xvf mysql-8.0.18-1.el7.x86_64.rpm-bundle.tar [root@zhixi opt]# ls mysql-8.0.18-1.el7.x86_64.rpm-bundle.tar mysql-community-libs-8.0.18-1.el7.x86_64.rpm mysql-community-client-8.0.18-1.el7.x86_64.rpm mysql-community-libs-compat-8.0.18-1.el7.x86_64.rpm mysql-community-common-8.0.18-1.el7.x86_64.rpm mysql-community-server-8.0.18-1.el7.x86_64.rpm mysql-community-devel-8.0.18-1.el7.x86_64.rpm mysql-community-test-8.0.18-1.el7.x86_64.rpm mysql-community-embedded-compat-8.0.18-1.el7.x86_64.rpm 2、移动安装包到指定目录 [root@zhixi opt]# mv ./*.rpm /usr/local/mysql/ 3、安装软件包 3.1:第一个软件包 [root@zhixi mysql]# rpm -ivh mysql-community-common-8.0.18-1.el7.x86_64.rpm warning: mysql-community-common-8.0.18-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Verifying... ################################# [100%] Preparing... ################################# [100%] Updating / installing... 1:mysql-community-common-8.0.18-1.e################################# [100%] 3.2:第二个软件包(报错了, 参考:https://blog.csdn.net/study8hard/article/details/102886174 解决:在后面加上--force --nodeps即可) [root@zhixi mysql]# rpm -ivh mysql-community-libs-8.0.18-1.el7.x86_64.rpm warning: mysql-community-libs-8.0.18-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY error: Failed dependencies: libcrypto.so.10()(64bit) is needed by mysql-community-libs-8.0.18-1.el7.x86_64 libcrypto.so.10(libcrypto.so.10)(64bit) is needed by mysql-community-libs-8.0.18-1.el7.x86_64 libssl.so.10()(64bit) is needed by mysql-community-libs-8.0.18-1.el7.x86_64 libssl.so.10(libssl.so.10)(64bit) is needed by mysql-community-libs-8.0.18-1.el7.x86_64 [root@zhixi mysql]# rpm -ivh mysql-community-libs-8.0.18-1.el7.x86_64.rpm --force --nodeps warning: mysql-community-libs-8.0.18-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Verifying... ################################# [100%] Preparing... ################################# [100%] Updating / installing... 1:mysql-community-libs-8.0.18-1.el7################################# [100%] 3.3:第三个软件包 [root@zhixi mysql]# rpm -ivh mysql-community-client-8.0.18-1.el7.x86_64.rpm --force --nodeps warning: mysql-community-client-8.0.18-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Verifying... ################################# [100%] Preparing... ################################# [100%] Updating / installing... 1:mysql-community-client-8.0.18-1.e################################# [100%] 3.4:第四个软件包 [root@zhixi mysql]# rpm -ivh mysql-community-server-8.0.18-1.el7.x86_64.rpm --force --nodeps warning: mysql-community-server-8.0.18-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Verifying... ################################# [100%] Preparing... ################################# [100%] Updating / installing... 1:mysql-community-server-8.0.18-1.e################################# [100%] [/usr/lib/tmpfiles.d/mysql.conf:23] Line references path below legacy directory /var/run/, updating /var/run/mysqld → /run/mysqld; please update ttmpfiles.d/ drop-in file accordingly. 4、查看已经安装的mysql [root@zhixi mysql]# rpm -qa | grep mysql mysql-community-client-8.0.18-1.el7.x86_64 mysql-community-libs-8.0.18-1.el7.x86_64 mysql-community-server-8.0.18-1.el7.x86_64 mysql-community-common-8.0.18-1.el7.x86_64