wget https://raw.githubusercontent.com/serverok/server-setup/master/ubuntu/2-apache-php56-mysql.sh
chmod 755 2-apache-php56-mysql.sh
sudo ./2-apache-php56-mysql.sh
sudo apachectl status apache
And received: sudo apachectl command not found.. sudo apachectl command not found....
I need to install PHP 5.6, curl and all related libraries etc because it matches most of what my clients are using.sudo apt install apache2
sudo add-apt-repository ppa:ondrej/php
sudo apt -y upgrade
sudo apt -y install php5.6-bcmath php5.6-bz2 php5.6-cgi php5.6-cli php5.6-common php5.6-curl php5.6-dba php5.6-dev php5.6-enchant php5.6-gd php5.6-gmp php5.6-imap php5.6-intl php5.6-json php5.6-mbstring php5.6-mysql php5.6-opcache php5.6-pgsql php5.6-pspell php5.6-readline php5.6-soap php5.6-sqlite3 php5.6-sybase php5.6-tidy php5.6-xml php5.6-xmlrpc php5.6-zip php5.6-xsl php5.6-mcrypt
sudo apt -y install libapache2-mod-php5.6.
sudo sudo update-alternatives --config php
sudo a2dismod php7.x
sudo a2enmod php5.6
1) Use Ubuntu Focal (LTS version - 20.04) providing 5+ years of updates.
2) If you use Xenial (16.04), standard support has already ended, with EOL in 2ish years.
3) Use latest LAMP Stack, today's latest stable versions...
Open in new window
Otherwise... running old Linux + Apache + PHP == Hacker's Paradise.