歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux管理 >> Linux維護

Linux通過Yum安裝MariaDB數據庫的技巧

Linux系統對於MariaDB數據庫這款開源免費的小型數據庫一定不會陌生,不過雖然許多用戶都懂得如何使用MariaDB數據庫,但是卻也有不少用戶不知道該如何安裝MariaDB數據庫。今天小編就和大家分享下yum 安裝 MariaDB 數據庫的方法。

安裝方法:

准備yum一個lamp環境,發現yum版本的mysql居然依然是5.1.x的版本,因此准備更換為MariaDB。

配置源:

[root@localhost ~]# cat /etc/yum.repos.d/MariaDB.repo

# MariaDB 10.0 CentOS repository list - created 2013-08-23 13:08 UTC

# http://mariadb.org/mariadb/repositories/

[mariadb]

name = MariaDB

baseurl = http://yum.mariadb.org/10.0/centos6-amd64

gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB

gpgcheck=1

檢查源:

[root@localhost ~]# yum search mariadb

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

* base: ftp.sjtu.edu.cn

* extras: mirrors.aliyun.com

* updates: mirrors.aliyun.com

======================================================= N/S Matched: mariadb ========================================================

MariaDB-Galera-server.x86_64 : MariaDB: a very fast and robust SQL database server

MariaDB-Galera-test.x86_64 : MariaDB: a very fast and robust SQL database server

MariaDB-cassandra-engine.x86_64 : MariaDB: a very fast and robust SQL database server

MariaDB-client.x86_64 : MariaDB: a very fast and robust SQL database server

MariaDB-common.x86_64 : MariaDB: a very fast and robust SQL database server

MariaDB-compat.x86_64 : MariaDB: a very fast and robust SQL database server

MariaDB-connect-engine.x86_64 : MariaDB: a very fast and robust SQL database server

MariaDB-devel.x86_64 : MariaDB: a very fast and robust SQL database server

MariaDB-oqgraph-engine.x86_64 : MariaDB: a very fast and robust SQL database server

MariaDB-server.x86_64 : MariaDB: a very fast and robust SQL database server

MariaDB-shared.x86_64 : MariaDB: a very fast and robust SQL database server

MariaDB-test.x86_64 : MariaDB: a very fast and robust SQL database server

Name and summary matches only, use “search all” for everything.

安裝database:

[root@localhost ~]# yum install MariaDB-server MariaDB-client

[root@localhost ~]# yum install MariaDB-*

運行database:

[root@localhost ~]# /etc/init.d/mysql start

Starting MySQL. SUCCESS!

[root@localhost ~]# mysql -V

mysql Ver 15.1 Distrib 10.0.17-MariaDB, for Linux (x86_64) using readline 5.1

這就是Linux系統中yum 安裝 MariaDB 數據庫的方法了,有需要的用戶就用這種方法進行安裝吧。

Copyright © Linux教程網 All Rights Reserved