Installing MariaDB .deb Files
Installing MariaDB using APT
For Debian and Ubuntu, it is highly recommended to install from the
repositories, using apt-get
, aptitude
, or another package
manager.
First import the gpg key we use to sign the repositories. This key enables
apt
to verify the integrity of the packages it downloads.
The id of our signing key is 1BB943DB
and the key fingerprint is:
1993 69E5 404B D5FC 7D2F E43B CBCB 082A 1BB9 43DB
The apt-key
application is an easy way to import this key into apt:
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 1BB943DB
While importing signing key, either on ubuntu or debian system. The above command remains same.
Example:
localhost:~# apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 1BB943DB
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --recv-keys --keyserver keyserver.ubuntu.com 1BB943DB
gpg: requesting key 1BB943DB from hkp server keyserver.ubuntu.com
gpg: key 1BB943DB: public key "Daniel Bartholomew (Monty Program signing key) <[email protected]>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1
Once the key is added you are ready to add the appropriate repository.
To easily generate the appropriate sources.list entries (also known as APT lines), use our online sources.list generator.
Once you have your sources.list entries, add them to your local
/etc/apt/sources.list
(e.g. with "sudo gedit /etc/apt/sources.list
"
or to a separate file under sources.list.d/
(e.g. with "sudo gedit /etc/apt/sources.list.d/mariadb.list
".
You can also use the Software Sources tool to add the APT lines. This tool is found under the "Edit" menu in the Ubuntu Software Center. In the Synaptic package manager this tool is called "Repositories" and it is located under the "Settings" menu. After launching the tool choose the "Other Software" tab, click on the "Add..." button and paste in the APT line (once for each of the two lines).
With the key and the APT lines in place you can now run:
sudo apt-get update
...to download the information apt needs to know to install MariaDB.
MariaDB can then be installed with your favorite package manager, for example:
sudo apt-get install mariadb-server-5.2
Installing the .deb Files Manually
While it is not recommended, it is possible to download and install the
packages manually (i.e. without a package manager like apt-get). Browse the
directories below the repo/ directory on your closest mirror. The .deb files
are in debian/pool/
and ubuntu/pool/
, respectively.
Here are the commands we used on a Debian 5 amd64 box to install MariaDB 5.1.42 (other Debian-based distributions should be similar):
sudo apt-get update sudo apt-get install libdbi-perl libdbd-mysql-perl psmisc sudo dpkg --install mysql-common_5.1.42-mariadb73_all.deb sudo dpkg --install libmariadbclient16_5.1.42-mariadb73_amd64.deb libmysqlclient16_5.1.42-mariadb73_amd64.deb \ mariadb-client_5.1.42-mariadb73_all.deb mariadb-client-5.1_5.1.42-mariadb73_amd64.deb mariadb-server_5.1.42-mariadb73_all.deb \ mariadb-server-5.1_5.1.42-mariadb73_amd64.deb