在线安装(慢的要命)
在线安装打开官方网站 https://mariadb.org/
点击Download,跳转到下一页面
继续点击Download,进到下页
点击红框中的[链接] (https://downloads.mariadb.org/mariadb/repositories/#mirror=23Media),进到一下页面
根据自己的服务器的类型/版本来选择要安装的数据库版本.
按照上述步骤可以在线安装。
点击图4中的baseurl
点击rpms, 可以看到一堆rpm包,不要着急,继续看下一步
打开MariaDB org --> Learn --> [MariaDB Knowledge Base] --> MariaDB Server -->
Getting, Installing, and Upgrading MariaDB --> MariaDB Binary Packages --> Installing MariaDB RPM Files --> MariaDB Installation (Version 10.1.21) via RPMs on CentOS 7
最终的url点击之后,就可以看到如下图所示界面:本来完全可以提供最终的一个url,提供一步一步点击的按钮连接,是为了方便大家来学习路线思路,而不能只拿结果。
还记得我们之前第二步看到的一堆rpm包吗? 下载第三步方框中的package,当然,这个文档的版本稍有点落后,但是我们只需要搜索前缀名称就行了,比如搜索client:
我们下载最新版本就可以了。
接下来进入正式步骤了哦~:
在图7中有Step by step installation:
Step by step installation:
1) First install all of the dependencies needed. Its easy to do this via YUM packages: yum install rsync nmap lsof perl-DBI nc
2) rpm -ivh jemalloc-3.6.0-1.el7.x86_64.rpm
3) rpm -ivh jemalloc-devel-3.6.0-1.el7.x86_64.rpm
4) rpm -ivh MariaDB-10.1.21-centos7-x86_64-common.rpm MariaDB-10.1.21-centos7-x86_64-compat.rpm MariaDB-10.1.21-centos7-x86_64-client.rpm galera-25.3.19-1.rhel7.el7.centos.x86_64.rpm MariaDB-10.1.21-centos7-x86_64-server.rpm
按照步骤我们开始:
安装依赖信息,命令行执行:
[root@iZ2ze7s2v0b78922wia32rZ software]# yum install rsync nmap lsof perl-DBI nc
安装我们之前下载的版本jemalloc-3.6.0-1.el7.x86_64.rpm
[root@iZ2ze7s2v0b78922wia32rZ mariadb]# rpm -ivh jemalloc-3.6.0-1.el7.x86_64.rpm
安装jemalloc-devel-3.6.0-1.el7.x86_64.rpm
[root@iZ2ze7s2v0b78922wia32rZ mariadb]# rpm -ivh jemalloc-devel-3.6.0-1.el7.x86_64.rpm
安装剩余的mariadb相关的包,一定要注意顺序.common > compat > client > galera > server
[root@iZ2ze7s2v0b78922wia32rZ mariadb]# rpm -ivh MariaDB-common-10.4.8-1.el7.centos.x86_64.rpm MariaDB-compat-10.4.8-1.el7.centos.x86_64.rpm MariaDB-client-10.4.8-1.el7.centos.x86_64.rpm galera-4-26.4.3-1.rhel7.el7.centos.x86_64.rpm MariaDB-server-10.4.8-1.el7.centos.x86_64.rpm warning: MariaDB-common-10.4.8-1.el7.centos.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY error: Failed dependencies: mariadb-libs < 1:10.1.0 conflicts with MariaDB-compat-10.4.8-1.el7.centos.x86_64 mariadb-libs is obsoleted by MariaDB-compat-10.4.8-1.el7.centos.x86_64 libaio.so.1()(64bit) is needed by MariaDB-client-10.4.8-1.el7.centos.x86_64 libaio.so.1(LIBAIO_0.1)(64bit) is needed by MariaDB-client-10.4.8-1.el7.centos.x86_64 libaio.so.1(LIBAIO_0.4)(64bit) is needed by MariaDB-client-10.4.8-1.el7.centos.x86_64 libboost_program_options.so.1.53.0()(64bit) is needed by galera-4-26.4.3-1.rhel7.el7.centos.x86_64 libaio.so.1()(64bit) is needed by MariaDB-server-10.4.8-1.el7.centos.x86_64 libaio.so.1(LIBAIO_0.1)(64bit) is needed by MariaDB-server-10.4.8-1.el7.centos.x86_64 libaio.so.1(LIBAIO_0.4)(64bit) is needed by MariaDB-server-10.4.8-1.el7.centos.x86_64