How to install MariaDB?
What is the most stable/safest way to install MariaDB?
Solution 1:
For Precise Pangolin 12.04 LTS
-
Install the repo manager
sudo apt-get install python-software-properties
-
Import the GnuPG signing key
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
-
Modify your
sources.list
file to add MariadDBOpen it from terminal (
gksudo gedit /etc/apt/sources.list
) and add the following lines at the end:-
For Version 10:
deb http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu precise main deb-src http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu precise main
Or have the lines automatically added with:
sudo add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu precise main'
-
For Version 5.5:
deb http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu precise main deb-src http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu precise main
Or have the lines automatically added with:
sudo add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu precise main'
-
-
Refresh your system
sudo apt-get update
-
And finally install MariaDB
sudo apt-get install mariadb-server
For further information see the their download page.
Solution 2:
For 14.04 LTS and newer:
MariaDB 5.5 is included in 14.04, to install it you can do:
sudo apt-get install mariadb-server
An alternative would be to get it from MariaDB themselves by following these instructions.