How To Install Apache, MySQL & PHP On Ubuntu
How To Install Apache, MySQL & PHP On Ubuntu
This article will help you to Install Apache 2.4, MySQL 8.0 and PHP
7.4 on Ubuntu 20.04 LTS (Focal Fossa) system. Let’s begin the
installation of LAMP stack your Ubuntu machine.
Prerequisites
You must have root or sudo privileged user access to your Ubuntu
20.04 system. Login to your Ubuntu system using GUI for Desktop
and SSH for the server edition.
ssh ubuntu@remote.host
The installer will prompt for the root password, This password will
work for your MySQL root user. After installing MySQL execute the
following command for initial settings of MySQL server. You will see
that script will prompt for more settings than earlier MySQL versions
like password validation policy etc.
sudo mysql_secure_installation
New password:
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Disallow root login remotely? (Press y|Y for Yes, any other key for No)
: y
Remove test database and access to it? (Press y|Y for Yes, any other
key for No) : y
Reload privilege tables now? (Press y|Y for Yes, any other key for
No) : y
Now access this file in web browser. You will see the screen like
below with all details of PHP on server.