mysql下载地址:http://repo.mysql.com/
我用的是centos7.4下载的是mysql5.7
[root@localhost u01]# cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core) [root@localhost u01]# pwd /home/u01 [root@localhost u01]# wget http://repo.mysql.com/mysql57-community-release-el6-9.noarch.rpm ##下载mysql的rpm包,为yum安装座准备 --2019-05-23 14:43:08-- http://repo.mysql.com/mysql57-community-release-el6-9.noarch.rpm Resolving repo.mysql.com (repo.mysql.com)... 23.78.217.58 Connecting to repo.mysql.com (repo.mysql.com)|23.78.217.58|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 9216 (9.0K) [application/x-redhat-package-manager] Saving to: ‘mysql57-community-release-el6-9.noarch.rpm’ 100%[===================================================>] 9,216 --.-K/s in 0s 2019-05-23 14:43:08 (59.0 MB/s) - ‘mysql57-community-release-el6-9.noarch.rpm’ saved [9216/9216] [root@localhost u01]# ls ###下载成功。下列就是 mysql57-community-release-el6-9.noarch.rpm [root@localhost u01]# rpm -ivh mysql57-community-release-el6-9.noarch.rpm ##加载这个包。yum安装的时候就是这个版本的mysql了 warning: mysql57-community-release-el6-9.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ################################# [100%] Updating / installing... 1:mysql57-community-release-el6-9 ################################# [100%] [root@localhost u01]# yum install mysql -y ###开始安装 Loaded plugins: fastestmirror mysql-connectors-community | 2.5 kB 00:00:00 mysql-tools-community | 2.5 kB 00:00:00 mysql57-community | 2.5 kB 00:00:00 (1/3): mysql-connectors-community/x86_64/primary_db | 37 kB 00:00:00 (2/3): mysql-tools-community/x86_64/primary_db | 50 kB 00:00:00 (3/3): mysql57-community/x86_64/primary_db | 182 kB 00:00:00 Loading mirror speeds from cached hostfile * base: centos.uhost.hk * extras: centos.uhost.hk * updates: centos.uhost.hk Resolving Dependencies --> Running transaction check ---> Package mysql-community-client.x86_64 0:5.7.26-1.el6 will be installed --> Processing Dependency: mysql-community-libs(x86-64) >= 5.7.9 for package: mysql-community-client-5.7.26-1.el6.x86_64 --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.56-2.el7 will be obsoleted --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64 --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64 ---> Package mysql-community-libs.x86_64 0:5.7.26-1.el6 will be obsoleting --> Processing Dependency: mysql-community-common(x86-64) >= 5.7.9 for package: mysql-community-libs-5.7.26-1.el6.x86_64 --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.56-2.el7 will be updated ---> Package mariadb-libs.x86_64 1:5.5.60-1.el7_5 will be an update ---> Package mysql-community-common.x86_64 0:5.7.26-1.el6 will be installed ---> Package mysql-community-libs-compat.x86_64 0:5.7.26-1.el6 will be obsoleting ---> Package postfix.x86_64 2:2.10.1-6.el7 will be updated ---> Package postfix.x86_64 2:2.10.1-7.el7 will be an update Removing mariadb-libs.x86_64 1:5.5.60-1.el7_5 - u due to obsoletes from mysql-community-libs.x86_64 0:5.7.26-1.el6 - u base/7/x86_64/filelists_db | 7.1 MB 00:00:30 --> Restarting Dependency Resolution with new changes. --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.60-1.el7_5 will be an update --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-7.el7.x86_64 --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-7.el7.x86_64 --> Finished Dependency Resolution Error: Package: 2:postfix-2.10.1-7.el7.x86_64 (base) Requires: libmysqlclient.so.18()(64bit) Removing: 1:mariadb-libs-5.5.56-2.el7.x86_64 (@anaconda) libmysqlclient.so.18()(64bit) Obsoleted By: mysql-community-libs-5.7.26-1.el6.x86_64 (mysql57-community) ~libmysqlclient.so.20()(64bit) Updated By: 1:mariadb-libs-5.5.60-1.el7_5.x86_64 (base) libmysqlclient.so.18()(64bit) Error: Package: 2:postfix-2.10.1-7.el7.x86_64 (base) Requires: libmysqlclient.so.18(libmysqlclient_18)(64bit) Removing: 1:mariadb-libs-5.5.56-2.el7.x86_64 (@anaconda) libmysqlclient.so.18(libmysqlclient_18)(64bit) Obsoleted By: mysql-community-libs-5.7.26-1.el6.x86_64 (mysql57-community) Not found Updated By: 1:mariadb-libs-5.5.60-1.el7_5.x86_64 (base) libmysqlclient.so.18(libmysqlclient_18)(64bit) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest 这一片红色都是报错,报错内容有个缺失postfix [root@localhost u01]# yum install -y postfix ##安装缺少的 Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.uhost.hk * extras: centos.uhost.hk * updates: centos.uhost.hk Resolving Dependencies --> Running transaction check ---> Package postfix.x86_64 2:2.10.1-6.el7 will be updated ---> Package postfix.x86_64 2:2.10.1-7.el7 will be an update --> Finished Dependency Resolution Dependencies Resolved ============================================================================================= Package Arch Version Repository Size ============================================================================================= Updating: postfix x86_64 2:2.10.1-7.el7 base 2.4 M Transaction Summary ============================================================================================= Upgrade 1 Package Total download size: 2.4 M Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. postfix-2.10.1-7.el7.x86_64.rpm | 2.4 MB 00:00:10 Running transaction check Running transaction test Transaction test succeeded Running transaction Warning: RPMDB altered outside of yum. Updating : 2:postfix-2.10.1-7.el7.x86_64 1/2 Cleanup : 2:postfix-2.10.1-6.el7.x86_64 2/2 Verifying : 2:postfix-2.10.1-7.el7.x86_64 1/2 Verifying : 2:postfix-2.10.1-6.el7.x86_64 2/2 Updated: postfix.x86_64 2:2.10.1-7.el7 Complete! [root@localhost u01]# yum install mysql -y ##再次安装mysql Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.uhost.hk * extras: centos.uhost.hk * updates: centos.uhost.hk Resolving Dependencies --> Running transaction check ---> Package mysql-community-client.x86_64 0:5.7.26-1.el6 will be installed --> Processing Dependency: mysql-community-libs(x86-64) >= 5.7.9 for package: mysql-community-client-5.7.26-1.el6.x86_64 --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.56-2.el7 will be obsoleted --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-7.el7.x86_64 --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-7.el7.x86_64 ---> Package mysql-community-libs.x86_64 0:5.7.26-1.el6 will be obsoleting --> Processing Dependency: mysql-community-common(x86-64) >= 5.7.9 for package: mysql-community-libs-5.7.26-1.el6.x86_64 --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.56-2.el7 will be updated ---> Package mariadb-libs.x86_64 1:5.5.60-1.el7_5 will be an update ---> Package mysql-community-common.x86_64 0:5.7.26-1.el6 will be installed ---> Package mysql-community-libs-compat.x86_64 0:5.7.26-1.el6 will be obsoleting Removing mariadb-libs.x86_64 1:5.5.60-1.el7_5 - u due to obsoletes from mysql-community-libs.x86_64 0:5.7.26-1.el6 - u --> Restarting Dependency Resolution with new changes. --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.60-1.el7_5 will be an update --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-7.el7.x86_64 --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-7.el7.x86_64 --> Finished Dependency Resolution Error: Package: 2:postfix-2.10.1-7.el7.x86_64 (@base) Requires: libmysqlclient.so.18()(64bit) Removing: 1:mariadb-libs-5.5.56-2.el7.x86_64 (@anaconda) libmysqlclient.so.18()(64bit) Obsoleted By: mysql-community-libs-5.7.26-1.el6.x86_64 (mysql57-community) ~libmysqlclient.so.20()(64bit) Updated By: 1:mariadb-libs-5.5.60-1.el7_5.x86_64 (base) libmysqlclient.so.18()(64bit) Error: Package: 2:postfix-2.10.1-7.el7.x86_64 (@base) Requires: libmysqlclient.so.18(libmysqlclient_18)(64bit) Removing: 1:mariadb-libs-5.5.56-2.el7.x86_64 (@anaconda) libmysqlclient.so.18(libmysqlclient_18)(64bit) Obsoleted By: mysql-community-libs-5.7.26-1.el6.x86_64 (mysql57-community) Not found Updated By: 1:mariadb-libs-5.5.60-1.el7_5.x86_64 (base) libmysqlclient.so.18(libmysqlclient_18)(64bit) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest ##还是报错。要求移除centos自带的数据库类型mariadb [root@localhost u01]# yum remove install mariadb-libs ##移除安装 Loaded plugins: fastestmirror No Match for argument: install Resolving Dependencies --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.56-2.el7 will be erased --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-7.el7.x86_64 --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-7.el7.x86_64 --> Running transaction check ---> Package postfix.x86_64 2:2.10.1-7.el7 will be erased --> Finished Dependency Resolution Dependencies Resolved ============================================================================================= Package Arch Version Repository Size ============================================================================================= Removing: mariadb-libs x86_64 1:5.5.56-2.el7 @anaconda 4.4 M Removing for dependencies: postfix x86_64 2:2.10.1-7.el7 @base 12 M Transaction Summary ============================================================================================= Remove 1 Package (+1 Dependent package) Installed size: 17 M Is this ok [y/N]: y Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Erasing : 2:postfix-2.10.1-7.el7.x86_64 1/2 Erasing : 1:mariadb-libs-5.5.56-2.el7.x86_64 2/2 Verifying : 2:postfix-2.10.1-7.el7.x86_64 1/2 Verifying : 1:mariadb-libs-5.5.56-2.el7.x86_64 2/2 Removed: mariadb-libs.x86_64 1:5.5.56-2.el7 Dependency Removed: postfix.x86_64 2:2.10.1-7.el7 Complete! [root@localhost u01]# yum install mysql -y ##再次安装mysql Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.uhost.hk * extras: centos.uhost.hk * updates: centos.uhost.hk Resolving Dependencies --> Running transaction check ---> Package mysql-community-client.x86_64 0:5.7.26-1.el6 will be installed --> Processing Dependency: mysql-community-libs(x86-64) >= 5.7.9 for package: mysql-community-client-5.7.26-1.el6.x86_64 --> Running transaction check ---> Package mysql-community-libs.x86_64 0:5.7.26-1.el6 will be installed --> Processing Dependency: mysql-community-common(x86-64) >= 5.7.9 for package: mysql-community-libs-5.7.26-1.el6.x86_64 --> Running transaction check ---> Package mysql-community-common.x86_64 0:5.7.26-1.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================= Package Arch Version Repository Size ============================================================================================= Installing: mysql-community-client x86_64 5.7.26-1.el6 mysql57-community 22 M Installing for dependencies: mysql-community-common x86_64 5.7.26-1.el6 mysql57-community 332 k mysql-community-libs x86_64 5.7.26-1.el6 mysql57-community 2.1 M Transaction Summary ============================================================================================= Install 1 Package (+2 Dependent packages) Total download size: 25 M Installed size: 112 M Downloading packages: warning: /var/cache/yum/x86_64/7/mysql57-community/packages/mysql-community-common-5.7.26-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Public key for mysql-community-common-5.7.26-1.el6.x86_64.rpm is not installed (1/3): mysql-community-common-5.7.26-1.el6.x86_64.rpm | 332 kB 00:00:02 (2/3): mysql-community-libs-5.7.26-1.el6.x86_64.rpm | 2.1 MB 00:00:18 (3/3): mysql-community-client-5.7.26-1.el6.x86_64.rpm | 22 MB 00:01:47 --------------------------------------------------------------------------------------------- Total 237 kB/s | 25 MB 00:01:47 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql Importing GPG key 0x5072E1F5: Userid : "MySQL Release Engineering <[email protected]>" Fingerprint: a4a9 4068 76fc bd3c 4567 70c8 8c71 8d3b 5072 e1f5 Package : mysql57-community-release-el6-9.noarch (installed) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : mysql-community-common-5.7.26-1.el6.x86_64 1/3 Installing : mysql-community-libs-5.7.26-1.el6.x86_64 2/3 Installing : mysql-community-client-5.7.26-1.el6.x86_64 3/3 Verifying : mysql-community-client-5.7.26-1.el6.x86_64 1/3 Verifying : mysql-community-common-5.7.26-1.el6.x86_64 2/3 Verifying : mysql-community-libs-5.7.26-1.el6.x86_64 3/3 Installed: mysql-community-client.x86_64 0:5.7.26-1.el6 Dependency Installed: mysql-community-common.x86_64 0:5.7.26-1.el6 mysql-community-libs.x86_64 0:5.7.26-1.el6 Complete! ##安装 成功 [root@localhost u01]#
nginx下载地址
我下载是这个http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm