amazon linux 2安装 新版mariadb

  • Post author:
  • Post category:linux




amazon linux 2安装 新版mariadb

卸载mariadb

获取mariadb



mariadb

中获取tar包

wget https://dlm.mariadb.com/2687943/MariaDB/mariadb-10.10.2/yum/centos/mariadb-10.10.2-rhel-7-x86_64-rpms.tar
tar -xvf mariadb-10.10.2-rhel-7-x86_64-rpms.tar
sudo mv mariadb-10.10.2-rhel-7-x86_64-rpms /opt/
cd /opt/mariadb-10.10.2-rhel-7-x86_64-rpms
./setup_repository
yum install MariaDB-server
报错,缺少pv
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
MariaDB                                                                                                                                                                             | 2.9 kB  00:00:00
amzn2-core                                                                                                                                                                          | 3.7 kB  00:00:00
MariaDB/primary_db                                                                                                                                                                  |  33 kB  00:00:00
1 packages excluded due to repository priority protections
Package mariadb-server is obsoleted by MariaDB-server, trying to install MariaDB-server-10.10.2-1.el7.centos.x86_64 instead
Resolving Dependencies
--> Running transaction check
---> Package MariaDB-server.x86_64 0:10.10.2-1.el7.centos will be installed
--> Processing Dependency: MariaDB-common >= 10.6.1 for package: MariaDB-server-10.10.2-1.el7.centos.x86_64
--> Processing Dependency: MariaDB-client >= 10.6.1 for package: MariaDB-server-10.10.2-1.el7.centos.x86_64
--> Processing Dependency: libpmem.so.1(LIBPMEM_1.0)(64bit) for package: MariaDB-server-10.10.2-1.el7.centos.x86_64
--> Processing Dependency: galera-4 for package: MariaDB-server-10.10.2-1.el7.centos.x86_64
--> Processing Dependency: pv for package: MariaDB-server-10.10.2-1.el7.centos.x86_64
--> Processing Dependency: libpmem.so.1()(64bit) for package: MariaDB-server-10.10.2-1.el7.centos.x86_64
--> Running transaction check
---> Package MariaDB-client.x86_64 0:10.10.2-1.el7.centos will be installed
--> Processing Dependency: perl(DBI) for package: MariaDB-client-10.10.2-1.el7.centos.x86_64
--> Processing Dependency: perl(Data::Dumper) for package: MariaDB-client-10.10.2-1.el7.centos.x86_64
--> Processing Dependency: libtinfo.so.5()(64bit) for package: MariaDB-client-10.10.2-1.el7.centos.x86_64
--> Processing Dependency: libncurses.so.5()(64bit) for package: MariaDB-client-10.10.2-1.el7.centos.x86_64
---> Package MariaDB-common.x86_64 0:10.10.2-1.el7.centos will be installed
--> Processing Dependency: MariaDB-compat for package: MariaDB-common-10.10.2-1.el7.centos.x86_64
---> Package MariaDB-server.x86_64 0:10.10.2-1.el7.centos will be installed
--> Processing Dependency: pv for package: MariaDB-server-10.10.2-1.el7.centos.x86_64
---> Package galera-4.x86_64 0:26.4.13-1.el7.centos will be installed
--> Processing Dependency: socat for package: galera-4-26.4.13-1.el7.centos.x86_64
--> Processing Dependency: libboost_program_options-mt.so.1.53.0()(64bit) for package: galera-4-26.4.13-1.el7.centos.x86_64
---> Package libpmem.x86_64 0:1.3-3.amzn2 will be installed
--> Running transaction check
---> Package MariaDB-compat.x86_64 0:10.10.2-1.el7.centos will be obsoleting
---> Package MariaDB-server.x86_64 0:10.10.2-1.el7.centos will be installed
--> Processing Dependency: pv for package: MariaDB-server-10.10.2-1.el7.centos.x86_64
---> Package boost-program-options.x86_64 0:1.53.0-27.amzn2.0.5 will be installed
---> Package mariadb-libs.x86_64 1:5.5.68-1.amzn2 will be obsoleted
---> Package ncurses-compat-libs.x86_64 0:6.0-8.20170212.amzn2.1.3 will be installed
---> Package perl-DBI.x86_64 0:1.627-4.amzn2.0.2 will be installed
--> Processing Dependency: perl(RPC::PlServer) >= 0.2001 for package: perl-DBI-1.627-4.amzn2.0.2.x86_64
--> Processing Dependency: perl(RPC::PlClient) >= 0.2000 for package: perl-DBI-1.627-4.amzn2.0.2.x86_64
---> Package perl-Data-Dumper.x86_64 0:2.145-3.amzn2.0.2 will be installed
---> Package socat.x86_64 0:1.7.3.2-2.amzn2.0.1 will be installed
--> Running transaction check
---> Package MariaDB-server.x86_64 0:10.10.2-1.el7.centos will be installed
--> Processing Dependency: pv for package: MariaDB-server-10.10.2-1.el7.centos.x86_64
---> Package perl-PlRPC.noarch 0:0.2020-14.amzn2 will be installed
--> Processing Dependency: perl(Net::Daemon) >= 0.13 for package: perl-PlRPC-0.2020-14.amzn2.noarch
--> Processing Dependency: perl(Net::Daemon::Test) for package: perl-PlRPC-0.2020-14.amzn2.noarch
--> Processing Dependency: perl(Net::Daemon::Log) for package: perl-PlRPC-0.2020-14.amzn2.noarch
--> Processing Dependency: perl(Compress::Zlib) for package: perl-PlRPC-0.2020-14.amzn2.noarch
--> Running transaction check
---> Package MariaDB-server.x86_64 0:10.10.2-1.el7.centos will be installed
--> Processing Dependency: pv for package: MariaDB-server-10.10.2-1.el7.centos.x86_64
---> Package perl-IO-Compress.noarch 0:2.061-2.amzn2 will be installed
--> Processing Dependency: perl(Compress::Raw::Zlib) >= 2.061 for package: perl-IO-Compress-2.061-2.amzn2.noarch
--> Processing Dependency: perl(Compress::Raw::Bzip2) >= 2.061 for package: perl-IO-Compress-2.061-2.amzn2.noarch
---> Package perl-Net-Daemon.noarch 0:0.48-5.amzn2 will be installed
--> Running transaction check
---> Package MariaDB-server.x86_64 0:10.10.2-1.el7.centos will be installed
--> Processing Dependency: pv for package: MariaDB-server-10.10.2-1.el7.centos.x86_64
---> Package perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.amzn2.0.2 will be installed
---> Package perl-Compress-Raw-Zlib.x86_64 1:2.061-4.amzn2.0.2 will be installed
--> Finished Dependency Resolution
Error: Package: MariaDB-server-10.10.2-1.el7.centos.x86_64 (MariaDB)
           Requires: pv
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

查看https://aws.amazon.com/cn/premiumsupport/knowledge-center/ec2-enable-epel/

sudo amazon-linux-extras install epel -y
# 重新执行安装
yum install MariaDB-server
# 完成

systemctl mariadb start # 启动
systemctl mariadb restart # 重启
systemctl mariadb stop # 停止



版权声明:本文为Ch_Chenjs原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。