Monday, March 7, 2016

Step by Step Setup Ubuntu Server and LAMP Workstation Package

Chapter 1: How to Create Bootable Ubuntu USB Flash Drive 

  1. Prepare a USB Flash Drive at least 2GB free space. 
  2. Download Universal-USB-Installer
  3. Go to and download latest version of Ubuntu iso file.
  4. Go to this guide and install image into USB Flash Drive.
  5. Once finished loaded the image, you can use it as bootable drive.
Chapter 2: How to Setup LAMP Workstation Package

1. To install LAMP, run this command at a terminal:
sudo apt-get install apache2 php5 php5-mysql php5-gd mysql-server

2. To install optional extensions, run this command at a terminal:
sudo apt-get install php5-curl php5-imagick phpmyadmin mysql-workbench php5-cli php5-mcrypt php5-ffmpeg

3. Enable apache modules:
sudo a2enmod vhost_alias rewrite

4. To enable openSSH (allowed putty access from other terminal)
sudo apt-get install openssh-server

5. To Share Folder Between Windows and Ubuntu
You may follow this guide:

You will find directory path /mnt/hgfs if successfully mount, otherwise you have to follow below command to resolved the issue.



$ git clone
$ cd vmware-tools-patches
$ ./

Chapter 3: How to Configure Vhost

1. Configure apache webserver access to your workspace and a catch-all vhost by adding the following to /etc/apache2/httpd.conf:
Copy the following snippet into httpd.conf

<Directory "/var/www/vhosts/">
        Options FollowSymLinks
        AllowOverride All

        Order allow,deny
        Allow from all

NameVirtualHost *
ServerName localhost

Create vhosts folder:
sudo mkdir /var/www/vhosts

If you can't save the httpd.conf, you should be editing it as a user with root permissions - i.e. something like

sudo nano /etc/apache2/httpd.conf

Chapter 4: How to Setup Multisite in Vhost

1. Configure a vhost for each sites by creating a file in /etc/apache2/sites-available as shown below and by updating the file /etc/hosts

Save the following as /etc/apache2/sites-available/001-site1.conf:

<VirtualHost *>
        DocumentRoot /var/www/vhosts/

Then edit the file /etc/hosts and add this line at the top:

2. Enable each vhosts site as needed (definitely the first three lines):
sudo a2dissite default
sudo a2ensite

3. Restart Apache:
sudo service apache2 restart

4. Check your ubuntu IP with following comand

4. Go back to window and edit file C:\Windows\System32\drivers\etc\hosts with following line


No comments:

Post a Comment