Hướng dẫn cài đặt MariaDB 10.x trên Ubuntu 17.x
* Ubuntu 17.04Bước 1: Cập nhật gói MariaDB
[ MariaDB 10.1]
# 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://sgp1.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu zesty main'
hoặc thêm gói
# sudo nano /etc/apt/sources.list.d/mariadb.list
thêm dòng sau:
# MariaDB 10.1 repository list
# http://downloads.mariadb.org/mariadb/repositories/
deb [arch=amd64,i386] http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu zesty main
deb-src http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu zesty main
[ MariaDB 10.2]
# 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://sgp1.mirrors.digitalocean.com/mariadb/repo/10.2/ubuntu zesty main'
hoặc thêm gói
# sudo nano /etc/apt/sources.list.d/mariadb.list
thêm dòng sau:
# MariaDB 10.2 repository list
# http://downloads.mariadb.org/mariadb/repositories/
deb [arch=amd64,i386] http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.2/ubuntu zesty main
deb-src http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.2/ubuntu zesty main
[ MariaDB 10.3 ]
# 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://sgp1.mirrors.digitalocean.com/mariadb/repo/10.3/ubuntu zesty main'
thêm gói cài đặt
# sudo nano /etc/apt/sources.list.d/mariadb.list
thêm dòng sau:
# MariaDB 10.3 repository list
# http://downloads.mariadb.org/mariadb/repositories/
deb [arch=amd64,i386] http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.3/ubuntu zesty main
deb-src http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.3/ubuntu zesty main
Bước 2: Cài đặt MariaDB
# sudo apt update
# sudo apt install mariadb-server mariadb-client
* Ubuntu 17.10
Bước 1: Cập nhật gói MariaDB
[ MariaDB 10.1 ]
# 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://sgp1.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu artful main'
hoặc thêm gói cài đặt
# sudo nano /etc/apt/sources.list.d/mariadb.list
thêm dòng sau:
# MariaDB 10.1 repository list
# http://downloads.mariadb.org/mariadb/repositories/
deb [arch=amd64,i386] http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu artful main
deb-src http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu artful main
[ MariaDB 10.2]
# 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://sgp1.mirrors.digitalocean.com/mariadb/repo/10.2/ubuntu artful main'
hoặc thêm gói cài đặt
# sudo nano /etc/apt/sources.list.d/mariadb.list
thêm dòng sau:
# MariaDB 10.2 repository list
# http://downloads.mariadb.org/mariadb/repositories/
deb [arch=amd64,i386] http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.2/ubuntu artful main
deb-src http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.2/ubuntu artful main
Bước 2: Cài đặt MariaDB
# sudo apt update
# sudo apt install mariadb-server mariadb-client
Khởi động và cho phép MariaDB khởi động cùng hệ thống
# sudo systemctl start mariadb
# sudo systemctl enable mariadb
Xem thêm video
Chúc bạn thành công !
No comments: