Comment installer MariaDB

Voici les commandes à faire en ssh (clic) pour installer mariadb (mysql) sur centos, debian et ubuntu.

Ubuntu 20.04

LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php

curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash

apt -y install mariadb-server

Ubuntu 22.04

LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php

apt -y install mariadb-server

Debian 11 - 12

curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash

apt install -y mariadb-server nginx tar unzip git redis-server

Centos 7

Install Repos

cat < /etc/yum.repos.d/mariadb.repo

MariaDB 10.5 CentOS repository list - created 2017-07-14 12:40 UTC

Download MariaDB Server - MariaDB.org

[mariadb]

name = MariaDB

baseurl = Index of /yum/10.5/centos7-amd64/

gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB

gpgcheck=1

EOF

Get yum updates

yum update -y

Install MariaDB 10.5

yum install -y MariaDB-common MariaDB-server

Start maraidb

systemctl start mariadb

systemctl enable mariadb