您好,登錄后才能下訂單哦!
這篇文章主要介紹Debian和buntu中如何安裝MariaDB 10,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!
MariaDB數(shù)據(jù)庫(kù)管理系統(tǒng)是MySQL的一個(gè)分支,主要由開源社區(qū)在維護(hù),采用GPL授權(quán)許可 MariaDB的目的是完全兼容MySQL,包括API和命令行,使之能輕松成為MySQL的代替品。
1、在安裝之前 MariaDB 之前,你需要通過(guò)下面的命令導(dǎo)入倉(cāng)庫(kù)密匙并獲取 MariaDB 倉(cāng)庫(kù)
$ sudo apt-get install software-properties-common $ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8 $ sudo add-apt-repository 'deb [arch=amd64,i386] http://www.ftp.saix.net/DB/mariadb/repo/10.1/debian sid main'
$ sudo apt-get install software-properties-common $ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8 $ sudo add-apt-repository 'deb [arch=amd64] http://www.ftp.saix.net/DB/mariadb/repo/10.1/debian stretch main'
$ sudo apt-get install software-properties-common $ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db $ sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://www.ftp.saix.net/DB/mariadb/repo/10.1/debian jessie main'
$ sudo apt-get install python-software-properties $ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db $ sudo add-apt-repository 'deb [arch=amd64,i386] http://www.ftp.saix.net/DB/mariadb/repo/10.1/debian wheezy main'
$ sudo apt-get install software-properties-common $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 $ sudo add-apt-repository 'deb [arch=amd64,i386] http://www.ftp.saix.net/DB/mariadb/repo/10.1/ubuntu yakkety main'
$ sudo apt-get install software-properties-common $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 $ sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://www.ftp.saix.net/DB/mariadb/repo/10.1/ubuntu xenial main'
$ sudo apt-get install software-properties-common $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db $ sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://www.ftp.saix.net/DB/mariadb/repo/10.1/ubuntu trusty main'
2、 然后,更新系統(tǒng)安裝包列表,并像下面這樣安裝 MariaDB 服務(wù)器:
$ sudo apt-get update $ sudo apt-get install mariadb-server
安裝過(guò)程中,將會(huì)請(qǐng)求你配置 MariaDB 服務(wù)器;在下面的頁(yè)面中設(shè)置一個(gè)安全的 root 用戶密碼:
為 MariaDB 設(shè)置新的 Root 密碼
再次輸入密碼并按下回車鍵來(lái)繼續(xù)安裝。
再次輸入 MariaDB 密碼
當(dāng) MariaDB 安裝包安裝完成以后,啟動(dòng)數(shù)據(jù)庫(kù)服務(wù)器守護(hù)進(jìn)程,同時(shí)啟用它,使得在下次開機(jī)時(shí)它能夠像下面這樣自動(dòng)啟動(dòng):
------------- On SystemD Systems ------------- $ sudo systemctl start mariadb $ sudo systemctl enable mariadb $ sudo systemctl status mariadb ------------- On SysVinit Systems ------------- $ sudo service mysql start $ chkconfig --level 35 mysql on OR $ update-rc.d mysql defaults $ sudo service mysql status
開啟 MariaDB 服務(wù)
4、 然后,運(yùn)行 mysql_secure_installation 腳本來(lái)保護(hù)數(shù)據(jù)庫(kù),在這兒你可以:
$ sudo mysql_secure_installation
保護(hù) MariaDB 安裝
5、 一旦數(shù)據(jù)庫(kù)服務(wù)器受保護(hù)以后,可以使用下面的 shell 命令查看已安裝版本和登錄 MariaDB:
$ mysql -V $ mysql -u root -p
以上是“Debian和buntu中如何安裝MariaDB 10”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對(duì)大家有幫助,更多相關(guān)知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。