Commit c288c4bc authored by Igor Pecovnik's avatar Igor Pecovnik
Browse files

Change mysql to maria

parent 8cbdb798
......@@ -5,7 +5,7 @@
# Very basic stuff
apt-get -y -qq install dialog whiptail lsb-release bc
apt-get -y -qq install dialog whiptail lsb-release bc expect --no-install-recommends
# gather some info
distribution=$(lsb_release -cs)
......@@ -405,7 +405,7 @@ install_packet "ntp ntpdate" "Install DASH and ntp service"
}
install_MySQL (){
install_MySQL_old (){
#--------------------------------------------------------------------------------------------------------------------------------
# MYSQL
#--------------------------------------------------------------------------------------------------------------------------------
......@@ -419,6 +419,43 @@ service mysql restart >> /dev/null
}
install_MySQL (){
#--------------------------------------------------------------------------------------------------------------------------------
# Maria SQL
#--------------------------------------------------------------------------------------------------------------------------------
install_packet "mariadb-client mariadb-server" "Install Mysql client / server"
#Allow MySQL to listen on all interfaces
cp /etc/mysql/my.cnf /etc/mysql/my.cnf.backup
sed -i 's|bind-address = 127.0.0.1|#bind-address = 127.0.0.1|' /etc/mysql/mariadb.conf.d/50-server.cnf
SECURE_MYSQL=$(expect -c "
set timeout 3
spawn mysql_secure_installation
expect \"Enter current password for root (enter for none):\"
send \"\r\"
expect \"root password?\"
send \"y\r\"
expect \"New password:\"
send \"$MYSQL_PASS\r\"
expect \"Re-enter new password:\"
send \"$MYSQL_PASS\r\"
expect \"Remove anonymous users?\"
send \"y\r\"
expect \"Disallow root login remotely?\"
send \"y\r\"
expect \"Remove test database and access to it?\"
send \"y\r\"
expect \"Reload privilege tables now?\"
send \"y\r\"
expect eof
")
#
# Execution mysql_secure_installation
#
echo "${SECURE_MYSQL}"
service mysql restart >> /dev/null
}
install_MySQLDovecot (){
#--------------------------------------------------------------------------------------------------------------------------------
# Install Postfix, Dovecot, Saslauthd, phpMyAdmin, rkhunter, binutils
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment