Home‎ > ‎

VirtualBox Install Ubuntu Desktop14.04.3 LTS under Windows 7

During the installation, I selected LAMP Server, OpenSSH Server and Samba Server.

Installation reference videos:
1) https://www.youtube.com/watch?v=JH29ALyraG4
2) https://www.youtube.com/watch?v=QkJmahizwO4

Recommended VirtualBox Settings:
1) Create a fixed size disk for efficiency if you have the space.
2) Under System options, remove the Floppy disk as a boot device option
3) Allocate about half of your physical RAM to Ubuntu Desktop virtual machine
4) If you're going to play with packet sniffers, under Network options, change the default "NAT" to "Bridged" and select the adapter that you're normally going to use to connect to the LAN - e.g. on a laptop, use the wireless adapter.

After you get Ubuntu Desktop installed, run the following after it boots up for the first time so that your system is up to date:

sudo apt-get update
This downloads the package lists from the repositories and "updates" them to get information on the newest versions of packages and their dependencies. It will do this for all repositories and PPAs.

sudo apt-get upgrade
Upgrades currently installed packages to latest version.

sudo apt-get dist-upgrade
Installs updates (new ones)

Or use the GUI package update manager.

Your display will be 640 x 480.  To fix that, you have to install virtualbox guest utilites:
Under Devices in the virtual machine menu, select Insert Guest Additions CD Image...
When you do this, Ubuntu desktop responds with a GUI for installing the Guest Additions.
After installing them, restart the Ubuntu virtual machine.  When it boots back up you will
find that the Ubuntu window now resizes every time you resize the virtual machine window
and puting it into full screen mode works correctly.

Now to get the sound working:
By default, the VirtualBox virtual machine will have ICH AC97 audio controller selected under the Audio settings.  With a Windows 7 host, you have to change it to Intel HD Audio while the Ubuntu virtual machine is powered down.  You can test if the sound is working through the Ubuntu settings > Sound configuration utility.  I had to allow the volume output to "louder than 100%" to be able to hear it on my Toshiba Satellite Pro. :P


...

Notes:

Installed packages:

C programming IDE:
sudo apt-get install geany

tshark network packet sniffer:
sudo apt-get install tshark

Gui based man page viewer (requires man2html)
To use it, type gman at a terminal prompt.  See the view menu, change to Navigator to browse the man pages via Firefox.
sudo apt-get install gman

For converting man pages to html.  Advisory: This also installs Apache2 and a bunch of other requirements.
sudo apt-get install man2html

Now that apache2 is installed, you can install mysql + php command line client + apache2 php5 mod in one foul swoop with this:
sudo apt-get install libapache2-mod-php5

After installing php, make sure that the php5 module is enabled in apache (probably already is) with this:
sudo a2enmod php5

I had to install the following in order to get pdo connections to mysql to work correctly (was getting no driver error):
sudo apt-get install php5-mysql


MySQL
If you want the mysql client to log in automatically when you type "mysql" at the command prompt:
Edit the /etc/mysql/my.cnf file and in the [client] section toward the top, add a line password = <root password>

After you change the config file, restart:
/etc/init.d/mysql restart

Then test automatic root login:
sudo mysql

Sharing folders from VirtualBox machine to host:

1) Set up Guest Additions if you haven't done it yet.

2) Create a folder on the host that you want to share with the virtual machine
My Documents\c_programming
Absolute Path: C:\Users\Administrador\Documents\c_programming

3) Make sure the VirtualBox Ubuntu server is running and open this from its menu:
Devices > Shared Folders > Shared Folder Settings...

4) Click the add new shared folder button (folder with a plus sign) and add the folder you created on the host.  Select the [x] make permanent option if you want to maintain it between sessions.

5) On the Ubuntu server machine, create the mount point as follows:
    a) create a folder to act as the mount point under your home directory
    b) chmod 777 the folder
    c) sudo mount -t vboxsf -o rw,uid=1000,gid=1000 <name of host shared folder without path> ~/<mount point folder>
    More information: https://forums.virtualbox.org/viewtopic.php?f=3&t=15868

6) To mount the shared folder automatically on boot, you should put the mount command in the /etc/rc.local file but this is executed as root so you get rid of sudo and must specify the full path for the mount point like this for example:
mount -t vboxsf -o rw,uid=1000,gid=1000 php_programming /home/<username>/php_programming



Online documentation:

Bash for beginners, Bash advanced, Introduction to Linux Hands On, Command-Line Tools Summary, Linux Sys Admin Guide, Kernel Programming, Pocket Linux Guide, Securing and Optimizing Linux and more...
Linux User's Guide and Programmer's Guide Man Pages Online...
http://man7.org/linux/man-pages/index.html
see the intro pages for documentation section descriptions.
Comments