Now, point your web browser to your new LAMP install using the following URL: http://<YOUR SERVER DOMAIN OR IP ADDRESS HERE>/phpinfo.php:
Install LAMP Ubuntu 18.04: Confirm Setup Page
All done. Below you can find some optional tasks to further configure your LAMP stack server.
SUBSCRIBE TO NEWSLETTER Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.
Optional LAMP Setup
MySQL Secure Installation
It is recommended to secure your MySQL installation before using your LAMP stack server in production. To do so execute:
The following firewall configuration allows incoming traffic on TCP ports 80 and 443:
$ sudo ufw allow in "Apache Full"
Install PHP Modules
The default LAMP stack comes pre-installed with basic PHP modules. There are many additional PHP modules available $ apt-cache search ^php- | grep module. First, obtain a PHP module package name and then install it using:
$ sudo apt install MODULE_NAME_HERE
Appendix: LAMP install error messages
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Solution: Open /etc/apache2/apache2.conf and insert the following directive at the end of the file:
ServerName <YOUR SERVER DOMAIN OR IP ADDRESS HERE>
Alternatively, use the echo command. This example will be used for a server with the IP address 10.1.1.4. Change your server IP or Domain name accordingly: