In my last post i explain how to Installing XAMP server on Ubuntu. Now in this post i explain how we can install Apache, PHP, MySQL and phpMyadmin separately on Ubuntu.

Install Apache

Now first we can install Apache server open terminal or type ctrl+alt+t  to open terminal and run following commands.

After this command terminal download and install Apache packages and then you can type http://localhost if Apache is installed you can see default page of Apache.

Install Apache, PHP, MySql and phpMyAdmin on Ubuntu

Install PHP and MySql

Now run following commands in your terminal and install PHP and MySql.

after installing MySql you prompt to add your username and password for database set them and done, also run two more command to complete setup

Install PHP intl extension and other

Install ppa repository to server.

After PPA repo installed, update the local package cache

run following command to install intl & xsl extensions

check other php extensions

Install PHP 7 on Apache Ubuntu

Restart server

Check phpInfo go to /var/www/html/create_file_phpinfo.php . Open file in any editor and enter <?php echo phpinfo() ?> and go to browser and type http://localhost/phpinfo.php .

Install phpMyAdmin

Run bellow commands on terminal and install phpMyAdmin

After running command you need to configure your phpMyAdmin so follow step on screen and after this, you also need to include PHPMyAdmin to your Apache Config file type bellow command in terminal and add

At the end of file add below code

restart Apache server type

Now go to the browser and type http://localhost/phpmyadmin if everything go right you can see login screen of phpMyAdmin.

Install Apache, PHP, MySql and phpMyAdmin on Ubuntu

If you get 404 not found error then run below command in terminal to create sortlink

Done 🙂