MariaDB官網提供了repositoryubuntu
https://downloads.mariadb.org/mariadb/repositories/#mirror=tunaide
在這裏能夠查詢到各種系統的安裝方法,這裏僅對Ubuntu 16.04 LTS講解。code
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo sh -c 'echo "deb [arch=amd64,i386,ppc64el] http://mirrors.tuna.tsinghua.edu.cn/mariadb/repo/10.2/ubuntu xenial main" >> /etc/apt/sources.list.d/mariadb.list'
apt update
sudo apt-get install mariadb-server