离线rpm安装 Mariadb

一、https://mirrors.tuna.tsinghua.edu.cn/mariadb/mariadb-10.2.5/yum/centos6-amd64/rpms/

下载:

 galera-25.3.19-1.rhel6.el6.x86_64.rpm

 MariaDB-server-10.2.5-1.el6.x86_64-client.rpm

 MariaDB-server-10.2.5-1.el6.x86_64-common.rpm

 MariaDB-server-10.2.5-1.el6.x86_64-compat.rpm

 MariaDB-server-10.2.5-1.el6.x86_64-devel.rpm

 MariaDB-server-10.2.5-1.el6.x86_64-server.rpm

二、yum remove mysql*

三、yum install libaio perl perl-DBI perl-Module-Pluggable perl-Pod-Escapes perl-Pod-Simple perl-libs perl-version

四:进入下载目录:

rpm -i MariaDB*

 

 

 

下面为英文版本:

Here are the detailed steps for installing MariaDB (version 10.1.21) via RPMs on CentOS 7.

The RPM's needed for the installation are all available on the MariaDB website and are given below:

  • jemalloc-3.6.0-1.el7.x86_64.rpm
  • MariaDB-10.1.21-centos7-x86_64-client.rpm
  • MariaDB-10.1.21-centos7-x86_64-compat.rpm
  • galera-25.3.19-1.rhel7.el7.centos.x86_64.rpm
  • jemalloc-devel-3.6.0-1.el7.x86_64.rpm
  • MariaDB-10.1.21-centos7-x86_64-common.rpm
  • MariaDB-10.1.21-centos7-x86_64-server.rpm

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

While installing MariaDB-10.1.21-centos7-x86_64-common.rpm there might be a conflict with older MariaDB packages. we need to remove them and install the original rpm again.

Here is the error message for dependencies:

# rpm -ivh MariaDB-10.1.21-centos7-x86_64-common.rpm 
warning: MariaDB-10.1.21-centos7-x86_64-common.rpm: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY
error: Failed dependencies:
	mariadb-libs < 1:10.1.21-1.el7.centos conflicts with MariaDB-common-10.1.21-1.el7.centos.x86_64

Solution: search for this package:

# rpm -qa | grep mariadb-libs
mariadb-libs-5.5.52-1.el7.x86_64

Remove this package:

# rpm -ev --nodeps mariadb-libs-5.5.52-1.el7.x86_64
Preparing packages...
mariadb-libs-1:5.5.52-1.el7.x86_64
  • 5) rpm -ivh MariaDB-10.1.21-centos7-x86_64-common.rpm
  • 6) rpm -ivh MariaDB-10.1.21-centos7-x86_64-compat.rpm
  • 7) rpm -ivh MariaDB-10.1.21-centos7-x86_64-client.rpm
  • 8) rpm -ivh galera-25.3.19-1.rhel7.el7.centos.x86_64.rpm

While installing the Galera package there might be a conflict in installation for a dependency package. Here is the error message:

[root@centos-2 /]# rpm -ivh galera-25.3.19-1.rhel7.el7.centos.x86_64.rpm 
error: Failed dependencies:
	libboost_program_options.so.1.53.0()(64bit) is needed by galera-25.3.19-1.rhel7.el7.centos.x86_64

The dependencies for Galera package is: libboost_program_options.so.1.53.0

Solution:

yum install boost-devel.x86_64

Another warning message while installing Galera package is as shown below:

warning: galera-25.3.19-1.rhel7.el7.centos.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY 

The solution for this is to import the key:

#rpm --import http://yum.mariadb.org/RPM-GPG-KEY-MariaDB
  • 9) rpm -ivh MariaDB-10.1.21-centos7-x86_64-server.rpm

After step 9, the installation will be completed. The last step will be to run mysql_secure_installation to secure the production server by dis allowing remote login for root, creating root password and removing the test database.

  • 10) mysql_secure_installation
https://mariadb.com/kb/en/mariadb/mariadb-installation-version-10121-via-rpms-on-centos-7/

 

ps:
Mysql安装完后,需要设置服务端字符集:
修改/etc/my.cnf.d/server.cnf
 
[mysqld]
 
init_connect='SET collation_connection = utf8_unicode_ci'
init_connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_unicode_ci
skip-character-set-client-handshake
#skip-networking
#bind-address = <some ip-address>
 
修改/etc/my.cnf.d/mysql-clients.cnf

 

[mysql]
default-character-set=utf8
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值