Linux使用RPM包离线安装MariaDB数据库

使用yum 远程安装MariaDB出现的问题:

1,由于带宽限制,下载安装速度比较慢

最近使用原来的方法,居然不能安装了,还是使用rpm包来安装吧

之前安装的方法:

rpm --import http://yum.mariadb.org/RPM-GPG-KEY-MariaDB

vi /etc/yum.repos.d/MariaDB.repo

# MariaDB repository list - created 2012-08-12 09:38 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/centos6-amd64
gpgcheck=1


yum -y install MariaDB-server MariaDB-client
chkconfig --levels 235 mysql on
/etc/init.d/mysql start
设置mysql密码及相关设置
mysql_secure_installation

遇到问题:

Downloading Packages:
http://yum.mariadb.org/5.5/centos6-amd64/rpms/MariaDB-10.0.27-centos6-x86_64-client.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.

Error Downloading Packages:
  MariaDB-client-10.0.27-1.el6.x86_64: failure: rpms/MariaDB-10.0.27-centos6-x86_64-client.rpm from mariadb: [Errno 256] No more mirrors to try.
  MariaDB-compat-10.0.27-1.el6.x86_64: failure: rpms/MariaDB-10.0.27-centos6-x86_64-compat.rpm from mariadb: [Errno 256] No more mirrors to try.
  MariaDB-server-10.0.27-1.el6.x86_64: failure: rpms/MariaDB-10.0.27-centos6-x86_64-server.rpm from mariadb: [Errno 256] No more mirrors to try.
  MariaDB-common-10.0.27-1.el6.x86_64: failure: rpms/MariaDB-10.0.27-centos6-x86_64-common.rpm from mariadb: [Errno 256] No more mirrors to try.

下载
进入MariaDB官网下载MariaDB需要的RPM包, 下载地址: http://yum.mariadb.org/
选择系统匹配的RPM包。
使用下载软件下载所需要的RPM包, 总共4个, 并上传到CentOS主机指定目录.
MariaDB-10.0.20-centos6-x86_64-server.rpm
MariaDB-10.0.20-centos6-x86_64-client.rpm
MariaDB-10.0.20-centos6-x86_64-common.rpm
MariaDB-10.0.20-centos6-x86_64-compat.rpm

百度分享地址:
http://pan.baidu.com/s/1miuDTXY

1.安装依赖包:
yum install libaio perl perl-DBI perl-Module-Pluggable perl-Pod-Escapes perl-Pod-Simple perl-libs perl-version

2.移除所有原有的mysql软件包
yum remove mysql*

3. 进入RPM包目录位置, 安装MariaDB
rpm -i MariaDB*


rm -f /var/lib/mysql    断开软链接

mysql_install_db  --datadir=/var/lib/mysql/

chown -R mysql:mysql  /var/lib/mysql/*

service mysql start

参考地址:
http://my.oschina.net/zhuxianwen/blog/474406

未经允许不得转载:好玩吧 » Linux使用RPM包离线安装MariaDB数据库