PHP Developers’ Environment setup on Ubuntu

LAMP Dev Environment Setup

PHP & MySQL works better on Linux environment than the WIndows. Here is a video tutorial on how to setup LAMP environment on Ubuntu Linux. (L-Linux, A- Apache, M – MySQL, P – PHP)

Updating apt cache and installed packages:

sudo apt update

sudo apt upgrade

Installing Apache 2

sudo apt install apache2

Installing Mysql s

sudo apt install mysql-server

Securing MySQL Installation

sudo mysql_secure_installation

Installing PHP

sudo apt install php libapache2-mod-php php-mysql

Check PHP version

php -v

Setting up local domain

Add your host

sudo nano /etc/hosts

Configure apache to run on your directory

sudo nano /etc/apache2/apache.conf

Add virtual hosts for your local domain

sudo nano /etc/apache2/sites-available/your_domain.local.conf

Enable your local doman

sudo a2ensite your_domain.local.conf

Please follow and like us:

Recommended Articles

Leave a Reply

Your email address will not be published. Required fields are marked *