Archive for the ‘Ubuntu’ Category

How to install Virtualbox guest additions on Xubuntu 14.04

October 13, 2014 1 comment

Note: The following instructions are tested in windows 7. Virtualbox installed in windows 7 and xubuntu 14.04 installed in virtualbox .

After installing xubuntu 14.04 we need enable the virtualbox guest additions to get the full screen other features like folder sharing. Following are the steps to installing Guest Additions.

Step 1: Install kernel headers and build tools.

Virtualbox guest additions are compiled for the target system, so it needs the necessary kernel headers and related programs. Install the following 2 packages.

sudo apt-get install build-essential module-assistant

Step 2: Now run following command

sudo m-a prepare

Step 3: Compile virtualbox guest additions

Now click “Devices > Insert guest additions CD image” in the virtualbox window. This will insert the guest additions cd image into the guest OS (xubuntu here). The cd should get mounted automatically inside the /media directory.

The path should be similar to something like this

Mount manually, If it does not mount by itself, then you can manually mount it. Find out the device using blkid and then use the mount command to mount it somewhere in.


Installing Mono 2.4 in Ubuntu

February 15, 2010 2 comments

This is a step by step guide to installing Mono 2.4 and mod_mono on a

fresh Ubuntu Server install. Let’s begin.

1) Logon to machine so you see a command prompt.

Type: sudo bash

Enter your password, you should now be root. This will allow you to do

whatever you want without typing “sudo” in front of every command.

2) Install all prequisits for Mono. Note you can put all packages on a

single line, but if you’re just starting out, you might want to install

each one just to make sure it all goes well. If any package is already

installed, just continue on. Depending on your system, you might already

have some of these.

Type: apt-get install build-essential

Type: apt-get install pkg-config

Type: apt-get install bison

Type: apt-get install libglib2.0-0 libglib2.0-dev

Type: apt-get install libpng12-dev

Type: apt-get install libx11-dev

Type: apt-get install libfontconfig1-dev

Type: apt-get install libfreetype6-dev

Type: apt-get install apache2

Type: apt-get install apache2-threaded-dev

Type: apt-get install gettext

3) Download and build libgdiplus which is required for Mono to build.

Type: cd ~

Type: wget

You should now have the file libgdiplus-2.4.tar.bz2 in your ~/ directory

Type: tar -xpjf libgdiplus-2.4.tar.bz2

This will decompress the tar file into its own directory, note you won’t

see any output)

You should now have a directory called libgdiplus-2.4

Type: cd libgdiplus-2.4/

Type: ./configure

You should not see any errors, but if you’re missing any packages please

install them and run “./configure” again.

Type: make

Sometimes here I see some error about “link is not a valid
libtool object” and Error 1. I have no idea what causes this, but I can
usually work around it by running “apt-get update” and “./configure” again.

Type: make install

4) Build Mono:

Type: cd ~
Type: wget
Type: tar -xpjf mono-2.4.tar.bz2

This will take a minute or so because it’s a big file and you won’t see
anything on the screen because stuff isn’t too chatty in the UNIX world.

Type: cd mono-2.4/
Type: ./configure
Type: make

This will take a while – probably about 15 minutes or so.

Type: make install

When this is done, you should be able to type “mono” from the prompt and
see mono options. This is a good sign.

5) Build xsp (this also includes mono-server which is used for Apache

Type: cd ~
Type: wget
Type: tar -xpjf xsp-2.4.tar.bz2
Type: cd xsp-2.4/
Type: ./configure
Type: make
Type: make install

6) Build mod_mono so you can run Mono web sites on Apache

Type: cd ~
Type: wget
Type: tar -xpjf mod_mono-2.4.tar.bz2
Type: cd mod_mono-2.4/
Type: ./configure
Type: make
Type: make install

7) Configure Mod_Mono with Apache

Type: cd /etc/apache2
Type: pico apache2.conf

Search for this section:
# Include module configuration:
Include /etc/apache2/mods-enabled/*.


Include /etc/apache2/mods-enabled/*.conf

Add the following line under the above lines:

Include /etc/apache2/mod_mono.conf

At the end of this file, add the following line:

MonoServerPath /usr/local/bin/mod-mono-server2

Press CTRL+X to exit Pico, answer “Yes” to save your changes and press

enter to use the same file name.

Restart Apache by typing: /etc/init.d/apache2 restart

8) Make sure it all works!

Type: cd /var/www

This is your default website directory. By default there’s just a

temporary index.html file that says “It works!”, you can remove this.

Type: rm *

Now let’s create a test ASPX page.

Type: pico default.aspx

If you know ASP.NET, you can write some code here. But for something

dirt simple, just use:

Save the file and exit Pico (CTRL+X)

In your web browser, you should now be able to browse to the site and

see “Hello World!” on your screen. From this point on, you should be good

to go and develop a much more complex application 🙂

Categories: Mono, Ubuntu Tags: , ,

Setup easy web development environment (XAMPP)

May 7, 2009 Leave a comment

This is a how-to for setting up a web development environment easily. This guide will install the XAMPP lampp stack into /opt, setup an easy way to start it up and shut it down, and link a folder in your home directory to the webserver.

This guide is aimed at a development environment only and should not be used as a public webserver. To setup a public webserver follow the directions on the Ubuntu wiki

As this is Ubuntu, all the major parts of a typical web server are included (in the main repo, or on the Ubuntu Server CD) and this is a great way to setup a server. The ubuntu developers have prepared a great web server and have made the process as seemless as possible.

But what if even the official way is still to complicated? What if you just want a quick web server for development?

Fortunately there is the XAMPP project: The XAMPP project bundles Apache, PHP4 & 5, Perl, mySQL, and a bunch of other utilities/applications into an simple package for Mac OSX, Windows, Solaris, and Linux. Obviously this HOWTO only deals with the linux version.

For those of you with already existing Apache/mySQL/php installations it installs everything into /opt so it doesn’t conflict with any other installation, and it is completely setup and ready to run.

Install XAMPP

Two easy steps:

  1. Download the most recent version of XAMPP: (at time of writing 1.5.3a)…ar.gz?download
    (Source URL:
  2. Extract the archive to /opt using sudo: (make sure you are in the directory that you downloaded the archive to)
    sudo tar xvfz xampp-linux-1.5.3a.tar.gz -C /opt


To start it up, open a terminal and type this:

sudo /opt/lampp/lampp start


To stop it, open a terminal and type this:

sudo /opt/lampp/lampp stop

Additional XAMPP commands

To see additional commands, open a terminal and type this:

sudo /opt/lampp/lampp

Sweet XAMPP Control Panel

To use the sweet gtk/python control panel:

Run in a terminal:

gedit ~/.local/share/applications/xampp-control-panel.desktop

Paste the following into the open file and save and exit.

[Desktop Entry]
Comment=Start/Stop XAMPP
Name=XAMPP Control Panel
Exec=gksudo "python /opt/lampp/share/xampp-control-panel/"
Name[en_CA]=XAMPP Control Panel
Comment[en_CA]=Start/Stop XAMPP

“XAMPP Control Panel” will show up in your applications menu under Internet. Use the Alacarte Menu Editor to move it around.

Test to see if XAMPP is running

Once XAMPP is up and running open firefox and go to: http://localhost/

You should see the XAMPP test page:

Location of files and uploading

XAMPP by default uses /opt/lampp/htdocs as the root web directory. The easiest way to start working on files is to link a folder in your home directory into this directory.
My user name is peter so I have /home/peter/public_html linked to /opt/lampp/htdocs/peter. So if I navigate to http://localhost/peter/ I get a listing of all the files/folders in that directory. (As long is there isn’t a index.php/html/etc file)
To set this up, run in a terminal:

  1. Make public_html directory in home directory:
    mkdir ~/public_html
  2. Link to /opt/lampp/htdocs
    sudo ln -s ~/public_html /opt/lampp/htdocs/$USER

Now any files and folders you place in ~/public_html will be published to your personal webserver.

Bookmark http://localhost/username to make this easy to access.

Open holes:

  1. The MySQL administrator (root) has no password.
  2. The MySQL daemon is accessible via network.
  3. ProFTPD uses the password “lampp” for user “nobody”.
  4. PhpMyAdmin is accessible via network.
  5. Examples are accessible via network.
  6. MySQL and Apache running under the same user (nobody).

This doesn’t leave your whole system wide open, but someone could hack your XAMPP installation, so be wary.
To fix most of the security weaknesses open a terminal and run:

sudo /opt/lampp/lampp security

Installing Flash 10 Under Ubuntu 64 bit Edition

March 25, 2009 Leave a comment

This small post will cover flash 10 Ubuntu Linux 64 bit installation.

Alejandro has published a shell script to automate entire process. Open terminal and type the following command to install Flash 10 under 64 bit edition (please exit any browsers you may have running).

$ wget

$ sudo bash ./

A(Apache),M(MySql),P(PHP) Installation Steps

June 3, 2008 Leave a comment

LAMP Installation

The Below Steps Showing the installation of the Apache,MySql and PHP in your ubuntu 7.10 machine.

Installing Apache

Now we can get started installing. This will take a few minutes, so grab a beer (or your favorite beverage,) and off we go. To install Apache, type or paste this into your terminal:

sudo apt-get install apache2

Testing Apache

Once apache2 is done installing, you can go ahead and test it by using:

sudo /etc/init.d/apache2 start

If you get a message that it’s already running, you’re good to go. Now, open up your browser and navigate to:


You should see a page just like this. As long as you do,

we’re ready to install PHP.

Installing PHP

Again, to install PHP, type or paste this into your terminal:

sudo apt-get install php5 libapache2-mod-php5

Once it’s finished installing, restart apache, using:

sudo /etc/init.d/apache2 restart

Testing PHP

Now, let’s make sure that PHP is working properly. To do this, we’re going to run phpinfo(). You can, of course, swap out gedit with your editor of choice.

sudo gedit /var/www/phpinfo.php

Type or paste the following into the document, and save it. (remove the space before the ‘?php’)

<?php phpinfo(); ?>

Now we can test PHP by browsing to:


You should see all of the info about your PHP installation listed on the page, like so. For security reasons, you should remove this page when you’re sure that PHP works.

Installing MySQL

Now we can conquer MySQL

sudo apt-get install mysql-server

As MySQL is installing, it will ask you to configure your root password. Make sure that you type it correctly, as it will only ask you once.

Testing MySQL

After that is finished, you can test MySQL by running this, where zzzz is your password. -p is must needed

mysql -uroot -pzzzz

If it brings you to a MySQL prompt, you’re done! You can type exit to get out of MySQL.

Installing phpMyAdmin

Now, if you want to install phpMyAdmin to have a front end for MySQL, you can use the following.

sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

then it shows the window in terminal in that select highlighted option apache


[ ] apache

[ ] apache-ssl

[ ] apache-perl

It will ask you to choose a webserver to configure automatically, you can use the space bar to select Apache2. And after that’s finished, restart one last time.

sudo /etc/init.d/apache2 restart


Now you have your own LAMP (Linux Apache MySQL PHP) server, with phpMyAdmin.

In PhpMyAdmin give username and password

Useful Commands and Default Locations

To Save yourself some time, you can make launchers for Apache or MySQL start, stop, and restart if you feel the need.


sudo /etc/init.d/apache2 start

sudo /etc/init.d/apache2 stop

sudo /etc/init.d/apache2 restart


sudo /etc/init.d/mysql start

sudo /etc/init.d/mysql stop

sudo /etc/init.d/mysql restart


/var/www/ — Document Root

http://localhost/phpmyadmin — phpMyAdmin

/usr/share — phpMyAdmin local location

%d bloggers like this: