forked from Sophia/thelinuxlist
added pma update
This commit is contained in:
parent
151880e03c
commit
81c1ce08a9
|
@ -48,6 +48,9 @@
|
||||||
|
|
||||||
### `wget -O pmauninstall.sh https://sop.wtf/sh/pmauninstall && bash pmauninstall.sh`
|
### `wget -O pmauninstall.sh https://sop.wtf/sh/pmauninstall && bash pmauninstall.sh`
|
||||||
|
|
||||||
|
### ✔️ Update
|
||||||
|
|
||||||
|
### `wget -O pmaupdate.sh https://sop.wtf/sh/pmaupdate && bash pmaupdate.sh`
|
||||||
---
|
---
|
||||||
|
|
||||||
## MongoDB
|
## MongoDB
|
||||||
|
|
|
@ -19,7 +19,6 @@ done
|
||||||
GITEA_VER="1.18.0"
|
GITEA_VER="1.18.0"
|
||||||
sudo systemctl stop gitea
|
sudo systemctl stop gitea
|
||||||
sudo apt-get install git -y
|
sudo apt-get install git -y
|
||||||
sudo ufw allow 3000
|
|
||||||
sudo wget -O /usr/local/bin/gitea https://dl.gitea.io/gitea/$GITEA_VER/gitea-"$GITEA_VER"-linux-amd64
|
sudo wget -O /usr/local/bin/gitea https://dl.gitea.io/gitea/$GITEA_VER/gitea-"$GITEA_VER"-linux-amd64
|
||||||
sudo chmod +x /usr/local/bin/gitea
|
sudo chmod +x /usr/local/bin/gitea
|
||||||
sudo adduser --system --shell /bin/bash --gecos 'Git Version Control' --group --disabled-password --home /home/git git
|
sudo adduser --system --shell /bin/bash --gecos 'Git Version Control' --group --disabled-password --home /home/git git
|
||||||
|
@ -33,6 +32,7 @@ sudo wget -O /etc/systemd/system/gitea.service https://git.oldgate.org/Sophia/th
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
sudo systemctl enable --now gitea
|
sudo systemctl enable --now gitea
|
||||||
sudo systemctl start gitea
|
sudo systemctl start gitea
|
||||||
|
sudo ufw allow 3000
|
||||||
|
|
||||||
echo -e "=================================================================="
|
echo -e "=================================================================="
|
||||||
publicipaddress=$(curl -sS --connect-timeout 10 -m 60 https://ipv4.icanhazip.com/ || curl -sS --connect-timeout 10 -m 60 https://api.ipify.org )
|
publicipaddress=$(curl -sS --connect-timeout 10 -m 60 https://ipv4.icanhazip.com/ || curl -sS --connect-timeout 10 -m 60 https://api.ipify.org )
|
||||||
|
|
|
@ -27,7 +27,6 @@ sudo echo "Include /etc/phpmyadmin/apache.conf" >> /etc/apache2/apache2.conf
|
||||||
sudo phpenmod mbstring
|
sudo phpenmod mbstring
|
||||||
sudo a2dismod php8.2
|
sudo a2dismod php8.2
|
||||||
sudo a2dismod mpm_prefork
|
sudo a2dismod mpm_prefork
|
||||||
sudo a2disconf php7.4-fpm
|
|
||||||
sudo a2enmod mpm_event
|
sudo a2enmod mpm_event
|
||||||
sudo a2enmod proxy
|
sudo a2enmod proxy
|
||||||
sudo a2enmod proxy_fcgi
|
sudo a2enmod proxy_fcgi
|
||||||
|
@ -35,6 +34,7 @@ sudo a2enconf php8.2-fpm
|
||||||
sudo systemctl restart php8.2-fpm
|
sudo systemctl restart php8.2-fpm
|
||||||
systemctl reload apache2
|
systemctl reload apache2
|
||||||
sudo systemctl enable apache2
|
sudo systemctl enable apache2
|
||||||
|
sudo apt autoremove -y
|
||||||
## Updating phpMyAdmin.
|
## Updating phpMyAdmin.
|
||||||
PMA_VER="5.2.0"
|
PMA_VER="5.2.0"
|
||||||
sudo rm -rf /usr/share/phpmyadmin.bak
|
sudo rm -rf /usr/share/phpmyadmin.bak
|
||||||
|
|
59
scripts/pmaupdate.sh
Normal file
59
scripts/pmaupdate.sh
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
read -r -p "Would you like to Update phpMyAdmin? [Y/n] " input
|
||||||
|
|
||||||
|
case $input in
|
||||||
|
[yY][eE][sS]|[yY])
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
[nN][oO]|[nN])
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "That wasn't an option..."
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
sudo apt update && apt upgrade -y
|
||||||
|
sudo add-apt-repository --yes ppa:ondrej/php && apt install libapache2-mod-php8.2 php8.2-fpm -y
|
||||||
|
sudo systemtl stop apache2
|
||||||
|
sudo apt install apache2 -y
|
||||||
|
sudo apt install phpmyadmin php-mbstring php-zip php-gd php-json php-curl -y
|
||||||
|
sudo phpenmod mbstring
|
||||||
|
sudo a2dismod php8.2
|
||||||
|
sudo a2dismod mpm_prefork
|
||||||
|
sudo a2enmod mpm_event
|
||||||
|
sudo a2enmod proxy
|
||||||
|
sudo a2enmod proxy_fcgi
|
||||||
|
sudo a2enconf php8.2-fpm
|
||||||
|
sudo systemctl restart php8.2-fpm
|
||||||
|
systemctl reload apache2
|
||||||
|
sudo systemctl enable apache2
|
||||||
|
sudo apt autoremove -y
|
||||||
|
PMA_VER="5.2.0"
|
||||||
|
sudo rm -rf /usr/share/phpmyadmin.bak
|
||||||
|
sudo mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak
|
||||||
|
sudo mkdir /usr/share/phpmyadmin/
|
||||||
|
sudo wget https://files.phpmyadmin.net/phpMyAdmin/$PMA_VER/phpMyAdmin-"$PMA_VER"-all-languages.tar.gz -P /usr/share/phpmyadmin/
|
||||||
|
sudo tar xzf /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages.tar.gz -C /usr/share/phpmyadmin/
|
||||||
|
sudo mv /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages/* /usr/share/phpmyadmin
|
||||||
|
sudo mkdir /usr/share/phpmyadmin/tmp/ && chmod -R 777 /usr/share/phpmyadmin/tmp/
|
||||||
|
sudo rm -rf /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages.tar.gz
|
||||||
|
sudo systemctl restart apache2
|
||||||
|
echo -e "=================================================================="
|
||||||
|
publicipaddress=$(curl -sS --connect-timeout 10 -m 60 https://ipv4.icanhazip.com/ || curl -sS --connect-timeout 10 -m 60 https://api.ipify.org )
|
||||||
|
intenalip=$(ip addr | grep -E -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -E -v "^127\.|^255\.|^0\." | head -n 1)
|
||||||
|
echo "phpMyAdmin Should be available at http://${intenalip}/phpmyadmin"
|
||||||
|
echo "Or If you are using a VPS at http://${publicipaddress}/phpmyadmin"
|
||||||
|
echo -e "=================================================================="
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user