[MariaDB] 在CentOS8.2上安裝最新版的MariaDB

通常 CentOS 官方的 repository 不會隨著各個軟體更新到最新,因為對於伺服器來說穩定最重要。但需要使用最新的話要怎麼辦呢?就來看看如何做吧!

(環境:CentOS8.2)
  1. 新增一個 repository
    [user@localhost ~]$ sudo vim /etc/yum.repos.d/MariadDB.repo
    
    [mariadb]
    name = MariaDB
    baseurl = http://yum.mariadb.org/10.5/centos8-amd64
    module_hotfixes=1
    gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
    gpgcheck=1
    
    這裡要特別說明一下,若版本(上面紅色顯示的部分)是選擇x.x,則會安裝x.x版中最新的那個版本,像寫文章這個當下,在10.5中最新版本是10.5.5,若要指定下載10.5.4怎麼辦呢?很簡單!紅色部分就改為10.5.4就好了。
  2. 確認有加入成功,若有看到 MariaDB 就是可以安裝新版了喲!
    [user@localhost ~]$ sudo dnf makecache
    CentOS-8 - AppStream
    CentOS-8 - Base
    CentOS-8 - Extras
    MariaDB
    Extra Packages for Enterprise Linux Modular 8 - x86_64
    Extra Packages for Enterprise Linux 8 - x86_64
    Metadata cache created.
    
  3. 開始安裝!
    [user@localhost ~]$ sudo dnf install mariadb-server mariadb
    
  4. 檢查版本
    [user@localhost ~]$ rpm -qi MariaDB-server
    Name        : MariaDB-server
    Version     : 10.5.5
    Release     : 1.el8
    Architecture: x86_64
    Install Date: Wed 23 Sep 2020 03:43:14 PM CST
    Group       : Applications/Databases
    Size        : 132924528
    License     : GPLv2
    Signature   : DSA/SHA1, Sat 08 Aug 2020 10:10:11 AM CST, Key ID cbcb082a1bb943db
    Source RPM  : MariaDB-server-10.5.5-1.el8.src.rpm
    Build Date  : Sat 08 Aug 2020 12:27:40 AM CST
    Build Host  : rhel8-amd64
    Relocations : (not relocatable)
    Vendor      : MariaDB Foundation
    URL         : http://mariadb.org
    Summary     : MariaDB: a very fast and robust SQL database server
    Description :
    MariaDB: a very fast and robust SQL database server
    
    It is GPL v2 licensed, which means you can use the it free of charge under the
    conditions of the GNU General Public License Version 2 (http://www.gnu.org/licenses/).
    
    MariaDB documentation can be found at https://mariadb.com/kb
    MariaDB bug reports should be submitted through https://jira.mariadb.org
    
    

留言

這個網誌中的熱門文章