Skip to content

Instantly share code, notes, and snippets.

@drewlander
Created July 21, 2017 17:57
Show Gist options
  • Save drewlander/02a5dcc67de7fef3f46ca35614bab85b to your computer and use it in GitHub Desktop.
Save drewlander/02a5dcc67de7fef3f46ca35614bab85b to your computer and use it in GitHub Desktop.
install_mysql.sh
#!/bin/bash
yum -y upgrade
cat <<EOF | sudo tee -a /etc/yum.repos.d/MariaDB.repo
# MariaDB 10.1 CentOS repository list
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOF
yum install MariaDB-server MariaDB-client -y
systemctl start mariadb.service
systemctl enable mariadb.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment