3. How to Install Apache, MySQL and PHP in Ubuntu 18.04 LTS Part 2
How to Install Apache, MySQL and PHP in Ubuntu 18.04 LTS Part 1

3. How to Install Apache, MySQL and PHP in Ubuntu 18.04 LTS Part 2

This article is a continuation of the previous article about How to Install Apache, MySQL and PHP in Ubuntu 18.04 LTS Part 1. For those who have not read the article, you must first read the previous article. Because for the smooth running of this tutorial, a lot has to do with the article.

Let’s just go straight to the tutorial continued.

Table of Contents

3. Install PHP

To install PHP on Ubuntu 18.04, please open a terminal and run the following syntax:

After installing PHP, create the info.php file in the Apache root document folder. Typically, the apache root document folder is /var/www/html/ or /var/www/ on most Debian-based Linux distributions. On Ubuntu 18.04 LTS, it is /var/www/html/.

Let’s create the info.php file by running the following syntax in the terminal:

Add the following syntax in it:

Press the ESC key and type :wq to save and exit the file. Restart the apache service to apply the changes.

Now try accessing the info.php file by typing the url http://localhost/info.php in your browser. Then it will appear as shown below:

PHP-Demo
If successful it will appear as shown above

Congratulations, your installation is complete. If you still don’t understand, or have questions that you want to ask, please leave your comments below. May be useful… 🙂

[Total: 2    Average: 5/5]
Recommended  2. How to Install Apache, MySQL and PHP in Ubuntu 18.04 LTS Part 1

Detri Amelia Chandra

Hello, I introduce myself Detri Amelia Chandra. Some of my expertise is in System Analysis, Database Design, Artificial Neural Networks and a little in Programming. Check out my thoughts about the world on my blog. I updated this blog a bit rarely, so please keep visit my blog here often ...

This Post Has One Comment

Leave a Reply

Close Menu