Setup of ubuntu server or ubuntu desktop on VirtualBox

This tutorial will guide you to install and configure things like ubuntu 14.04, virtualbox, putty, apache, php, mysql, tweaking apache and php. Also give a brief intro to server administration panel called webmin.

Download & Install VirtualBox and download Ubuntu 14.04.

Once you have downloaded VirtualBox and Ubuntu click “Insert Guest Additions CD Image” and install it. It will enable features like shared clipboard,

Open terminal in Ubuntu and check ifconfig for valid IP. If you don’t find it in a adaptor. open interface file and add adaptor.

Add lines in file

If you are running ubuntu 16.04, add these lines

Run the command in terminal to install ssh and aptitude. Remote access can only be possible via ssh.

Download Putty to access ubuntu server shell via windows machine by entering IP in putty.

Install apache, php, mysql, pear library,

For ubuntu 16.04

Install Mcrypt library for php7

Install Monitoring tools

Install Webmin for server management

Login via IP or domain with port mentioned while installation of webmin. Eg: Once you are logged in.

Update webmin, if you get error of “Net::SSLeay” run these commands to install ssleay

We will create a new user because in near future we would be disabling root user for ssh.

Or you can add a user with sudo privileges by this command and skip the below visudo step.

Give the user admin privileges and disable root user for ssh. Type command in terminal.

Add the line for the user you want to give admin privileges.

Go to webmin admin panel -> Server -> SSH Server -> Authentication -> Allow login by root? NO

You can check HostName of server.  Go to webmin admin panel ->  Networking -> Network Configuration -> Hostname and DNS Client -> Hostname = gumby

Apache configuration changes

Go to webmin admin panel -> Others -> PHP Configuration -> Edit Configuration Manually or edit file /etc/php5/apache2/php.ini
Change the following parameters

Restart Apache to see the affect. Please run the following command to restart apache

Go to webmin admin panel -> Servers -> Apache Webserver -> Global Configuration -> Configure Apache Modules or run the following command to enable modules

Run the following command to disbale the module

Now i would be installing recomened modules

Change the directives of www virtual host

Give permissions to web server main directory

Assign www-data user to web server main directory and root user group rights

Restart Apache to see the affect.