Virtualmin

apt-get update --allow-releaseinfo-change  
apt-get install --reinstall ca-certificates  
apt-get upgrade --fix-missing
apt-get install nano wget perl sudo -y

sudo apt dist-upgrade -y
sudo apt --purge autoremove
sudo apt update && sudo apt upgrade
apt -y purge Apache2* bind* exim* ufw* firewalld*

wget http://software.virtualmin.com/gpl/scripts/install.sh
chmod +x install.sh
sudo /bin/sh install.sh --minimal
sudo /bin/sh install.sh --bundle LEMP --minimal
apt -y remove fail2ban* clamav* firewalld* proftpd* spamassassin* usermin* Quota* ufw
➔iptables -A INPUT -p tcp -d 0/0 -s 0/0 --dport 10000 -j ACCEPT
dpkg --get-selections | grep -i php //important!!
(see if php8.2-mysql is installed, if not sudo apt -y install php8.2-mysql)    
==========Install PHP==================
$ sudo apt -y install php libmcrypt-dev libreadline-dev mcrypt
$ sudo apt -y install php-common php-mysql php-xml php-xmlrpc php-curl php-gd php-imagick php-cli php-fpm php-json php-mbstring php-opcache php-soap php-dev php-cgi php-zip php-intl php-bcmath php-pear

========Install Webmin=============== 
$ curl -o setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh 
$ sh setup-repos.sh 
$ apt -y install webmin --install-recommends 
( change port: $ sudo nano -w /etc/webmin/miniserv.conf ) 
apt -y update && apt -y upgrade
apt -y autoremove
sudo a2enmod rewrite or
sudo a2dismod rewrite
systemctl restart apache2
Install php5.6 among other versions

apt -y install apt-transport-https lsb-release ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | 
sudo tee /etc/apt/sources.list.d/php.list

in Ubuntu: LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
apt -y update && apt -y upgrade
pecl install timezonedb zip
apt -y install libmcrypt-dev libreadline-dev mcrypt php-pear libapache2-mod-fcgid

//"! Very Important"
apt -y install php5.6 php5.6-cgi php5.6-mysql php5.6-mbstring php5.6-gd php5.6-dom php5.6-common
apt -y install php5.6-json php5.6-curl libapache2-mod-php5.6

sudo apt -y install php5.6-cli php5.6-pdo php5.6-fpm php5.6-mcrypt php5.6-imap php5.6-intl 
sudo apt -y install php5.6-recode php5.6-sqlite3 php5.6-tidy php5.6-xmlrpc php5.6-xsl php5.6-zip
sudo apt -y install php5.6-opcache php5.6-readline php5.6-xml php5.6-imagick php5.6-pspell 
php5.6-soap

systemctl restart apache2
sudo systemctl start php5.6-fpm
sudo systemctl status php5.6-fpm
systemctl restart apache2
sudo apt-get -y purge php8.*
sudo apt-get -y purge php7.3*
sudo apt-get -y autoclean
sudo apt-get -y autoremove   
systemctl restart apache2
php5.6 is a metapackage that can be used to run PHP applications.
php5.6-fpm provides the Fast Process Manager interpreter receives Fast/CGI requests.
php5.6-mysql connects PHP to the MySQL database.
libapahce2-mod-php5.6 provides the PHP module for the Apache webserver.
libapache2-mod-fcgid contains a mod_fcgid starts CGI programs to handle concurrent requests.
Set Default PHP Version

sudo update-alternatives --set php /usr/bin/php5.6 
sudo update-alternatives --set php /usr/bin/php7.4
php -v

php -i | grep "Loaded Configuration File"

a2dismod php5.6
a2enmod php5.6
systemctl restart apache2
Install Node.js via Debian Repository

apt show nodejs
apt-get update -y
apt-get install nodejs npm -y
node --version
v12.22.5
uninstall the Node.js:

apt-get remove nodejs npm --purge
apt-get autoremove
apt-get clean
Upgrade Ubuntu 20 to 22

sudo apt update -y && sudo apt upgrade -y && sudo apt dist-upgrade -y
sudo apt autoremove -y && sudo apt autoclean -y
sudo reboot
apt install update-manager-core
do-release-upgrade -d
reboot

sudo apt autoremove --purge


Posted : Sunday 14th of September 2025 @ 03:19 AM— Tags : virtualmin