37 lines
1.3 KiB
Bash
37 lines
1.3 KiB
Bash
#!/bin/bash
|
|
|
|
while true
|
|
do
|
|
read -r -p "Would you like to install MariaDB? [Y/n] " input
|
|
|
|
case $input in
|
|
[yY][eE][sS]|[yY])
|
|
break
|
|
;;
|
|
[nN][oO]|[nN])
|
|
break
|
|
;;
|
|
*)
|
|
echo "That wasn't an option..."
|
|
;;
|
|
esac
|
|
done
|
|
|
|
apt update && apt upgrade -y
|
|
sudo apt install wget software-properties-common dirmngr ca-certificates apt-transport-https -y
|
|
sudo apt install mariadb-server mariadb-client -y
|
|
echo -e "=================================================================="
|
|
echo "Time to Configure MariaDB."
|
|
echo "Don't Know what to do? I can help!"
|
|
echo "1. Root password just click ENTER as there is no password"
|
|
echo "2. Switch to unix_socket authentication select. n"
|
|
echo "3. Change the root password? Y"
|
|
echo "4. Remove anonymous users? Y "
|
|
echo "5. Disallow root login remotely? y, But if it's local it's fine to say no."
|
|
echo "6. Remove test database and access to it? Y"
|
|
echo "7. Reload privilege tables now? Y"
|
|
echo -e "=================================================================="
|
|
sleep 5
|
|
sudo mysql_secure_installation
|
|
|
|
echo "If you want to install phpMyAdmin run wget -O pmainstall.sh https://sop.wtf/sh/pmainstall && bash pmainstall.sh" |