1. Apache server installation
Bash
sudo apt update # Update Ubuntu system
sudo apt install apache2 # Install Apache server
sudo ufw app list # Allow firewall
sudo ufw allow in "Apache" # Allow Apache
sudo systemctl reload apache2 # Reload or restart Apache Server2. My SQL installation
Bash
sudo apt install mysql-server # Install MySQLAfter installation
Bash
sudo mysql # Run this command on the terminal
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'admin123'; # Set root user password
exitMy SQL secure installation
Bash
sudo mysql_secure_installation # MySQL Secure InstallationTwo times press enter then Y press
3. PHP installation
Bash
sudo apt install php libapache2-mod-php php-mysql # php installationSite enable command
Bash
sudo a2ensite your_domain # Site enable commandSite disable command
Bash
sudo a2dissite 000-default # Site disable commandPHP MyAdmin installs Ubuntu
If you need a UI database you can use phpmyadmin.
Bash
sudo apt update # Firstly update system
sudo apt install phpmyadmin php-mbstring php-zip php-gd php-json php-curl # Install PHPMyAdmin and set password
sudo apt install phpmyadmin # Install PHPMyAdmin

Join the conversation! Your thoughts help the community grow.