|
|
@ -98,6 +98,67 @@ install_Debian9(){ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
install_debian8() { |
|
|
|
|
|
|
|
apt-get install --yes --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" sudo |
|
|
|
|
|
|
|
echo -e "\n\e[92mFixing Source list...\e[39m" |
|
|
|
|
|
|
|
echo "deb http://deb.debian.org/debian jessie main |
|
|
|
|
|
|
|
deb-src http://deb.debian.org/debian jessie main |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Major bug fix updates produced after the final release of the |
|
|
|
|
|
|
|
## distribution. |
|
|
|
|
|
|
|
deb http://security.debian.org/ jessie/updates main |
|
|
|
|
|
|
|
deb-src http://security.debian.org/ jessie/updates main |
|
|
|
|
|
|
|
deb http://deb.debian.org/debian jessie-updates main |
|
|
|
|
|
|
|
deb-src http://deb.debian.org/debian jessie-updates main |
|
|
|
|
|
|
|
" > /etc/apt/sources.list |
|
|
|
|
|
|
|
echo 'deb http://packages.dotdeb.org jessie all' >> /etc/apt/sources.list |
|
|
|
|
|
|
|
echo 'deb-src http://packages.dotdeb.org jessie all' >> /etc/apt/sources.list |
|
|
|
|
|
|
|
cd /tmp |
|
|
|
|
|
|
|
wget https://www.dotdeb.org/dotdeb.gpg |
|
|
|
|
|
|
|
apt-key add dotdeb.gpg |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
apt-get update |
|
|
|
|
|
|
|
apt-get install --yes --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" php7.0-common php7.0-fpm php7.0-cli php7.0-json php7.0-imap php7.0-mysql php7.0-curl php7.0-imap php7.0-intl php7.0-mcrypt php-pear php7.0-gd php7.0-zip php7.0-xml php7.0-mbstring |
|
|
|
|
|
|
|
apt-get install --yes --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" apache2 libapache2-mod-php7.0 mysql-server |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo -e "\n\e[92mDownloading PHPMyAdmin..\e[39m" |
|
|
|
|
|
|
|
wget -q -N "https://files.phpmyadmin.net/phpMyAdmin/$PHPMYADMINV/phpMyAdmin-$PHPMYADMINV-all-languages.zip" >/dev/null & |
|
|
|
|
|
|
|
show_spinner $! |
|
|
|
|
|
|
|
unzip -o phpMyAdmin-$PHPMYADMINV-all-languages.zip >/dev/null & |
|
|
|
|
|
|
|
show_spinner $! |
|
|
|
|
|
|
|
mv phpMyAdmin-$PHPMYADMINV-all-languages /usr/share/phpmyadmin |
|
|
|
|
|
|
|
chmod -R 0755 /usr/share/phpmyadmin |
|
|
|
|
|
|
|
wget -q -N "https://backup.mirror3.deinserverhost.icu/OneClick/phpmyadmin.conf" |
|
|
|
|
|
|
|
mv phpmyadmin.conf /etc/apache2/conf-available/ |
|
|
|
|
|
|
|
a2enconf phpmyadmin |
|
|
|
|
|
|
|
systemctl reload apache2 |
|
|
|
|
|
|
|
mkdir -p /usr/share/phpmyadmin/tmp/ |
|
|
|
|
|
|
|
chown -R www-data:www-data /usr/share/phpmyadmin/tmp/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo -e "\n\e[92mConfiguring MariaDB...\e[39m" |
|
|
|
|
|
|
|
echo "CREATE USER '$DBUSER'@'localhost' IDENTIFIED BY '$DBPASS'; |
|
|
|
|
|
|
|
GRANT ALL PRIVILEGES ON *.* TO '$DBUSER'@'localhost' WITH GRANT OPTION; |
|
|
|
|
|
|
|
FLUSH PRIVILEGES;" > /home/LAMP.sql |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mysql -u root < /home/LAMP.sql |
|
|
|
|
|
|
|
rm /home/LAMP.sql |
|
|
|
|
|
|
|
service apache2 restart |
|
|
|
|
|
|
|
OWNIP=`curl ifconfig.me` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo -e "\n\e[92mWriting login details into file...\e[39m" |
|
|
|
|
|
|
|
echo -e "\n |
|
|
|
|
|
|
|
########## Phpmyadmin ##########\n |
|
|
|
|
|
|
|
# http://$OWNIP/phpmyadmin/ |
|
|
|
|
|
|
|
# Username: $DBUSER \n |
|
|
|
|
|
|
|
# Password: $DBPASS \n |
|
|
|
|
|
|
|
########## ## END ## ##########\n |
|
|
|
|
|
|
|
\n" > /home/LAMP-Login-Details-README.txt |
|
|
|
|
|
|
|
echo -e "\n\e[92mLogin details written to \e[93m/home/LAMP-Login-Details-README.txt \e[39m" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -131,13 +192,13 @@ if [ "$VAR_A" = "x86_64" ]; then |
|
|
|
|
|
|
|
|
|
|
|
if [ $version -eq 10 ]; then |
|
|
|
if [ $version -eq 10 ]; then |
|
|
|
#Debian 10 |
|
|
|
#Debian 10 |
|
|
|
echo -e "\nDebian $version\e[39m" |
|
|
|
echo -e "\nDebian $version \e[39m" |
|
|
|
install_Debian9 # Currently it also works for Debian 10 |
|
|
|
install_Debian9 # Currently it also works for Debian 10 |
|
|
|
clean_up |
|
|
|
clean_up |
|
|
|
|
|
|
|
|
|
|
|
elif [ $version -eq 9 ]; then |
|
|
|
elif [ $version -eq 9 ]; then |
|
|
|
#Debian 9 Check |
|
|
|
#Debian 9 Check |
|
|
|
echo -e "\nDebian $version\e[39m" |
|
|
|
echo -e "\nDebian $version \e[39m" |
|
|
|
install_Debian9 |
|
|
|
install_Debian9 |
|
|
|
clean_up |
|
|
|
clean_up |
|
|
|
|
|
|
|
|
|
|
@ -145,7 +206,9 @@ if [ "$VAR_A" = "x86_64" ]; then |
|
|
|
|
|
|
|
|
|
|
|
elif [ $version -eq 8 ]; then |
|
|
|
elif [ $version -eq 8 ]; then |
|
|
|
#Debian 8 Check |
|
|
|
#Debian 8 Check |
|
|
|
echo "Debian $version\e[39m" |
|
|
|
echo "Debian $version \e[39m" |
|
|
|
|
|
|
|
install_debian8 |
|
|
|
|
|
|
|
clean_up |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fi |
|
|
|
fi |
|
|
|