Setup Virtual Development Environment for PHP Project

To make development environment in programmers computer, There are so many applications which have to install.

But If we use Virtual development environment, we can install thoese applications to separeted operating system and also can manage per project.

1. Download and Install Vagrant

Vagrant is a tool for building complete developemnt environment.

Go to Download Page and install to your computer.

2. Download and Install VirtualBox

Go to Download Page and install to your computer.

3. Initialize Vagrant to Your Project

Scotch Box gives preconfigured Vigrant Box with a full array of LAMP Stack features. So we will use Scotch Box to prepare development environment.

3.1. Initialize Vagrant

Above command will make Vagrantfile file.

3.2. Setup `Vagrantfile’ file

You can edit Vagrantfile made by 3.1 by manual. Or just copy and pate from https://github.com/scotch-io/scotch-box.

Update ip address and synced_folder to matching your project. Basically scotch-box uses /var/www/public folder as a document root of web server. So if your root folder is the main of web page, you have to set synced_folder to /var/www/public.

4. Run Vagrant

Run vigrant using bellow command:

5. Connet SSH

Connect ssh using bellow command:

6. Adding MSSQL Connection Support

By default, scotch-box doesn’t support MSSQL connection. So, if you want to connect to MSSQL exeucte bellow command:

7. Enjoy Development

All done, You can connect virtual web server using ip address or hostname you defined in Vagrantfile.

Reference

zemna

Programmer/Web/Mobile/Desktop

You may also like...

Leave a Reply