cat /etc/issue* /etc/*release 2>/dev/null|grep -qE "debian|ubuntu|Ubuntu"&&OS="Debian" cat /etc/issue* /etc/*release 2>/dev/null|grep -qE "release|centos|CentOS"&&OS="RedHat" if [ "$OS" = "RedHat" ];then yum -y install yum-utils wget -q https://s.xabcloud.com/file/MariaDB.repo -O /etc/yum.repos.d/MariaDB.repo yum -y install mariadb mariadb-server systemctl start mariadb systemctl enable mariadb mysql_secure_installation fi if [ "$OS" = "Debian" ];then apt-get -y install mysql-server fi