Ubuntu PHP 7.2 install
apt-get update
apt-get upgrade
Step 2: Install a Web Server
To install the Apache web server, run the following command on your server:
sudo apt-get install apache2
After the installation is complete, you should start Apache:
systemctl start apache2
Also, you can enable Apache to start automatically on server boot:
systemctl enable apache2
To check the status of the Apache web server and make sure it is up and running, you can use the following command:
systemctl status apache2
To verify that Apache is running, you can also open your web browser and enter your server IP address, (e.g. http://your_server_ip_address). If Apache is successfully installed, you should see the Apache default welcome page.
Step 3: Install
sudo apt-get install software-properties-common python-software-properties
Read More: https://realprogrammer.in/ubuntu-php-7-2-install-in-ubuntu/