Brief guide to installing Apache and MySQL on Ubuntu 20.04

1.  Update Package Lists:

sudo apt update

2.  Install Apache:

sudo apt install apache2

3.  Check Apache Status:

sudo systemctl status apache2

4.  Install MySQL Server:

sudo apt install mysql-server

5.  Run MySQL Secure Installation to Set Up Password and Security Options:

sudo mysql_secure_installation

6.  Check MySQL Status:

sudo systemctl status mysql

7.  Install PHP (Optional - If needed for web development):

sudo apt install php libapache2-mod-php php-mysql

8.  Restart Apache to Apply Changes:

sudo systemctl restart apache2

9.  Verify Apache Installation: Open a web browser and enter http://localhost. You should see the Apache2 Ubuntu Default Page if the installation was successful.
10. Verify MySQL Installation: You can log in to MySQL to check if it’s working properly:

mysql -u root -p

That’s it! You now have Apache and MySQL installed on your Ubuntu 20.04 system.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *