How to install apache2, MySQL, php7.2, PHPMyAdmin, and composer in ubuntu
By Ubuntu Developer
2 min readAug 4, 2019
Here You understand, How to setup environment for PHP & Laravel projects in ubuntu server or also local follow below step.
Before start installation, you have to update your packages on ubuntu using below command
$ sudo apt-get update
Install apache2
$ sudo apt-get install apache2
go to the browser and enter http://localhost for checking apache2 installed successfully or not.
Install MySQL and secure installation
$ sudo apt-get install mysql-server$ mysql_secure_installation
Install PHP7.2 and important extension
$ sudo apt-get install software-properties-common python-software-properties$ sudo add-apt-repository -y ppa:ondrej/php$ sudo apt-get update$ sudo apt-get install php7.2 php7.2-cli php7.2-common$ sudo apt-get install php7.2-curl php7.2-gd php7.2-json php7.2-mbstring php7.2-intl php7.2-mysql php7.2-xml php7.2-zip
Install PHPMyAdmin
$ sudo apt-get install phpmyadmin
For editing apache file use vim
$ sudo apt-get install vim$ cd /etc/apache2/$ sudo vim apache2.conf
Add on the last line
Include /etc/phpmyadmin/apache.conf
Restart apache server
$ sudo service apache2 restart
Install composer
$ cd$ curl -sS https://getcomposer.org/installer -o composer-setup.php$ sudo php composer-setup.php — install-dir=bin — filename=composer
Happy Hacking………
More From Infinitbility