Would you like to learn how to install Apache, PHP, and MySQL? In this tutorial, we are going to install the Apache server, the MySQL server and configure the PHP support on a computer running Ubuntu Linux.
• Ubuntu 20
• Ubuntu 19
• Ubuntu 18
• Apache 2.4.41
• PHP 7.4.31
• MySQL 8.0.22
Copyright © 2018-2021 by Techexpert.tips.
All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form or by any means without the prior written permission of the publisher.
Equipment list
The following section presents the list of equipment used to create this tutorial.
As an Amazon Associate, I earn from qualifying purchases.
Apache – Related Tutorial:
On this page, we offer quick access to a list of tutorials related to Apache.
Tutorial – Apache, PHP, and MYSQL installation
Install the Apache server.
Install the PHP and MYSQL support on the Apache server.
Edit the Apache configuration file.
Here is the file, before our configuration.
Here is the file, after our configuration.
Restart the Apache service.
In our example, the PHP version 7.4 was installed on the Apache server.
Create a file to test the PHP installation.
Here is the file content.
Open the browser and access the PHP test page.
In our example, the following URL was entered in the Browser:
• http://192.168.2.222/test.php
The Apache server will display the PHP information.
Congratulations! You installed Apache and PHP on Ubuntu Linux.
Tutorial Apache – MYSQL installation
Install the MYSQL server.
Access the MySQL command-line.
The MySQL ROOT account has no password configured.
Configure the ROOT account to use the plugin named MYSQL_NATIVE_PASSWORD.
Configure a password to the ROOT account of the MySQL service.
In our example, the password configured was KAMISAMA123.
Save your configuration and exit.
Try to access the MySQL service using the ROOT account and the new password.
Verify the authentication plugin and the password configured to the ROOT user account.
Here is the command output:
Congratulations! You successfully installed the MySQL service on the Apache server.