mirror of
https://github.com/MrUnknownDE/linux-script.git
synced 2026-04-09 01:43:46 +02:00
update 001
+ update python version + update some links + bugfix php (update debian11)
This commit is contained in:
25
sh_scripts/input.sh
Normal file
25
sh_scripts/input.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
# Make sure only root can run our script
|
||||
VERSION="Version: 0.1v"
|
||||
|
||||
clear
|
||||
echo "$VERSION"
|
||||
echo "################################################"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "# (L)inux #"
|
||||
echo "# (A)pache #"
|
||||
echo "# (M)ysql #"
|
||||
echo "# (P)HP #"
|
||||
echo "# #"
|
||||
echo "# by #"
|
||||
echo "# johanneskr.de #"
|
||||
echo "# #"
|
||||
echo "# #"
|
||||
echo "################################################"
|
||||
|
||||
|
||||
echo "Domain-Name [ENTER]:"
|
||||
|
||||
read domainname
|
||||
echo "This Domain is: $domainname"
|
||||
@@ -94,7 +94,7 @@ clear
|
||||
echo "start installer" # - start the normal installer
|
||||
sudo apt update
|
||||
sudo apt upgrade -y
|
||||
sudo apt install wget apache2 apache2-utils mariadb-server mariadb-client lsb-release ca-certificates apt-transport-https software-properties-common-y
|
||||
sudo apt install wget apache2 apache2-utils mariadb-server mariadb-client lsb-release ca-certificates apt-transport-https software-properties-common -y
|
||||
echo "$SECURE_MYSQL"
|
||||
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/sury-php.list
|
||||
wget -qO - https://packages.sury.org/php/apt.gpg | sudo apt-key add -
|
||||
@@ -108,25 +108,16 @@ clear
|
||||
mkdir /var/www/html/phpmyadmin
|
||||
sudo tar xvf ~/Downloads/phpMyAdmin-latest-all-languages.tar.gz --strip-components=1 -C /var/www/html/phpmyadmin
|
||||
sudo chown -R 33:33 /var/www/html/phpmyadmin
|
||||
echo "
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
$cfg['blowfish_secret'] = '$GEN_PASS'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
|
||||
$i = 0;
|
||||
$i++;
|
||||
$cfg['Servers'][$i]['auth_type'] = 'cookie';
|
||||
$cfg['Servers'][$i]['host'] = 'localhost';
|
||||
$cfg['Servers'][$i]['compress'] = false;
|
||||
$cfg['Servers'][$i]['AllowNoPassword'] = false;
|
||||
|
||||
$cfg['UploadDir'] = '';
|
||||
$cfg['SaveDir'] = '';" > /var/www/html/phpmyadmin/config.inc.php
|
||||
wget https://raw.githubusercontent.com/MrUnknownDE/linux-script/main/sh_scripts/res/phpmyadmin-config.inc.php > /var/www/html/phpmyadmin/config.inc.php
|
||||
row1=$(grep -n GEN_PASS /var/www/html/phpmyadmin/config.inc.php | sed 's/:.*//')
|
||||
row0=$(($GEN_PASS))
|
||||
sed "${row0},${row1}d" /var/www/html/phpmyadmin/config.inc.php
|
||||
sudo chmod 660 /var/www/html/phpmyadmin/config.inc.php
|
||||
sudo systemctl restart apache2
|
||||
echo "CREATE USER 'mysqladmin'@'localhost' IDENTIFIED BY '$MYSQL_MYSQLADMIN_PASSWORD'; GRANT ALL PRIVILEGES ON *.* TO 'mysqladmin'@'localhost'; FLUSH PRIVILEGES;" | mysql -u root -password="$MYSQL_ROOT_PASSWORD"
|
||||
echo "GRANT ALL PRIVILEGES ON *.* TO 'mysqladmin'@'localhost';" | mysql -u root -password="$MYSQL_ROOT_PASSWORD"
|
||||
rm -r /var/www/html/*
|
||||
wget -p /var/www/html/index.html https://static.syslul.de/src/johannes/
|
||||
wget -p /var/www/html/index.html https://raw.githubusercontent.com/MrUnknownDE/linux-script/main/sh_scripts/res/lamp.html
|
||||
clear
|
||||
echo "Do you want to have a domain certified by Let's Encrypt? (yes/no)"
|
||||
read answer
|
||||
|
||||
@@ -31,6 +31,13 @@ echo ""
|
||||
echo "LETS GO!"
|
||||
|
||||
case "$SYSTEM" in
|
||||
"Debian GNU/Linux 11 \n \l")
|
||||
apt-get update
|
||||
apt-get install curl wget apt-transport-https dirmngr neofetch htop nload git -y
|
||||
curl "https://raw.githubusercontent.com/MrUnknownDE/linux-script/main/sh_scripts/repos/debian-11.txt" -o /etc/apt/source.list
|
||||
apt-get update && apt-get upgrade -y
|
||||
echo "Have Fun with the Official Repos :)"
|
||||
;;
|
||||
"Debian GNU/Linux 10 \n \l")
|
||||
apt-get update
|
||||
apt-get install curl wget apt-transport-https dirmngr neofetch htop nload git -y
|
||||
@@ -45,13 +52,6 @@ case "$SYSTEM" in
|
||||
apt-get update && apt-get upgrade -y
|
||||
echo "Have Fun with the Official Repos :)"
|
||||
;;
|
||||
"Debian GNU/Linux 11 \n \l")
|
||||
apt-get update
|
||||
apt-get install curl wget apt-transport-https dirmngr neofetch htop nload git -y
|
||||
curl "https://raw.githubusercontent.com/MrUnknownDE/linux-script/main/sh_scripts/repos/debian-11.txt" -o /etc/apt/source.list
|
||||
apt-get update && apt-get upgrade -y
|
||||
echo "Have Fun with the Official Repos :)"
|
||||
;;
|
||||
"Ubuntu 18.04.5 LTS \n \l")
|
||||
apt-get update
|
||||
apt-get install curl wget apt-transport-https dirmngr neofetch htop nload git -y
|
||||
|
||||
@@ -7,7 +7,7 @@ if [ "$(id -u)" != "0" ]; then
|
||||
fi
|
||||
clear
|
||||
echo "################################################"
|
||||
echo "# Version: 0.1v #"
|
||||
echo "# Version: 1.0v #"
|
||||
echo "# #"
|
||||
echo "# Python3.9.2 #"
|
||||
echo "# Quick Build #"
|
||||
@@ -33,9 +33,9 @@ echo "LETS GO!"
|
||||
sudo apt update
|
||||
sudo apt -y upgrade
|
||||
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev -y
|
||||
wget https://www.python.org/ftp/python/3.9.2/Python-3.9.2.tgz
|
||||
tar -xf Python-3.9.2.tgz
|
||||
cd Python-3.9.2
|
||||
wget https://www.python.org/ftp/python/3.9.2/Python-3.9.9.tgz
|
||||
tar -xf Python-3.9.9.tgz
|
||||
cd Python-3.9.9
|
||||
./configure --enable-optimizations
|
||||
make -j $CPUCORES
|
||||
sudo make altinstall
|
||||
|
||||
11
sh_scripts/res/phpmyadmin-config.inc.php
Normal file
11
sh_scripts/res/phpmyadmin-config.inc.php
Normal file
@@ -0,0 +1,11 @@
|
||||
declare(strict_types=1);
|
||||
$cfg['blowfish_secret'] = 'GEN_PASS'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
|
||||
$i = 0;
|
||||
$i++;
|
||||
$cfg['Servers'][$i]['auth_type'] = 'cookie';
|
||||
$cfg['Servers'][$i]['host'] = 'localhost';
|
||||
$cfg['Servers'][$i]['compress'] = false;
|
||||
$cfg['Servers'][$i]['AllowNoPassword'] = false;
|
||||
|
||||
$cfg['UploadDir'] = '';
|
||||
$cfg['SaveDir'] = '';"
|
||||
Reference in New Issue
Block a user