centos7 通過yum源安裝制定版本的mariadb資料庫
阿新 • • 發佈:2021-11-05
一、準備工作
https://mariadb.org/mariadb/all-releases/
選擇想要安裝的版本,再選擇MariaDB Respositories,複製yum源資訊
二、先確認當前環境是否安裝過資料庫
[root@localhost ~]# rpm -q mariadb-server package mariadb-server is not installed
三、重新配置yum倉庫
# vim /etc/yum.repos.d/MariaDB.repo
將複製的yum源資訊填寫到MariaDB.repo
[mariadb] name = MariaDB baseurl= https://tw1.mirror.blendbyte.net/mariadb/yum/10.6/centos7-amd64 gpgkey=https://tw1.mirror.blendbyte.net/mariadb/yum/RPM-GPG-KEY-MariaDB gpgcheck=1
檢視已安裝好的yum源倉庫
[root@localhost yum.repos.d]# yum repolist Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile base | 3.6kB 00:00:00 epel | 4.7 kB 00:00:00 extras | 2.9 kB 00:00:00 mariadb| 3.4 kB 00:00:00 updates | 2.9 kB 00:00:00 (1/2): mariadb/updateinfo | 5.4 kB 00:00:01 (2/2): mariadb/primary_db | 66 kB 00:00:01 repo id repo name status base/7/x86_64 CentOS-7 10,072 epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13,674 extras/7/x86_64 CentOS-7 500 mariadb MariaDB 93 updates/7/x86_64 CentOS-7 2,943 repolist: 27,282
四、yum安裝mariadb服務端
# yum install -y mariadb-server
[root@localhost yum.repos.d]# mariadb --version mariadb Ver 15.1 Distrib 10.6.4-MariaDB, for Linux (x86_64) using readline 5.1
五、安裝後,執行安全加固(過程略)
可參考:
https://www.cnblogs.com/iverson-3/p/11198712.html
你關注的人都在努力變的更好,你還在等什麼呢。