sudo apt update
sudo apt install apache2
sudo ufw app list
sudo ufw allow in “Apache”
sudo systemctl start apache2 // to start apache server
sudo systemctl status apache2 // to know the status
sudo systemctl stop apache2 // to stop the server
sudo systemctl restart apache2 // to restart the server
sudo apt install mysql-server
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '12345';
sudo mysql_secure_installation
remove anonymous users - y
disallow remote login - y
sudo systemctl enable --now mysql.service // to enable mysql
systemctl status mysql.service // to check the status
sudo ufw allow mysql
sudo ufw enable // to enable the ufw status
sudo apt install php libapache2-mod-php php-mysql
sudo apt update
sudo apt install phpmyadmin php-mbstring php-zip php-gd php-json php-curl
Troubleshooting Phpmyadmin & mysql-workbench If you get blowfish_secret error: Choose and set a phrase for cryptography in the file /etc/phpmyadmin/blowfish_secret.inc.php and copy the line (not the php tags) into the file /etc/phpmyadmin/config.inc.php or you will receive an error.
If you get a 404 error upon visiting http://localhost/phpmyadmin: You will need to configure apache2.conf to work with Phpmyadmin.
$ sudo gedit /etc/apache2/apache2.conf
Include the following line at the bottom of the file, save and quit.
$ Include /etc/phpmyadmin/apache.conf