Posts Tagged ‘ubuntu’

Configure Ubuntu Server with static IP

January 13th, 2010

It’s not recommended to assign IP address to servers using DHCP since the IP address can change after the lease expires. Just imagine having all the users or devices that need access to the server stopping because the server changed IP address.

In Ubuntu/Linux the process of assigning a static IP to the server is an easy task that only requires the modification of one file and issuing a few commands.

Using you favorite text editor open the file /etc/network/interfaces.

sudo nano /etc/network/interfaces

This is how the the /etc/network/interfaces file looks like.

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
 
# The loopback network interface
auto lo
iface lo inet loopback
 
# The primary network interface
auto eth0
iface eth0 inet dhcp

You can safely erase all the information for eth0 and add the information below. Make sure to change the information in order to meet your networking requirements.

auto eth0
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

After adding the appropriate networking information you can restart the networking service for the new changes to take effect.

sudo /etc/init.d/networking restart

Ubuntu installation on a USB flash drive

January 13th, 2010

Installing Linux on a USB flash drive is no longer complex process thanks to a tool called UNetbooting which is free of cost. UNetbootin takes care of mostly everything for the user, it can use ISOs already in the system or download them over the Internet for the user. It can’t get any easier than that.

Get UNetbootin

You can download UNetbooting from http://unetbootin.sourceforge.net/ , you have the option of choosing between Windows and Linux. For the purpose of this tutorial I will be using the Windows download.

How To

After clicking on the executable you will be presented with several options. You can either download the distribution of your choice over the Internet and have UNetbooting install it.

Or use an ISO file you already have.

  • Click on Diskimage to select and then browse for the ISO you wish to install on the USB drive.

  • With the ISO selected you can move on to select the drive letter you wish to use. By default UNetbootin will only show the drive letter for removable devices and not permanent storage devices. This is meant to prevent accidental damage to internal drives.
  • My USB drive uses the drive letter G, with that in mind I can click on OK to start the installation process.

  • Give the process some time to complete.

  • After the installation is done you can safely reboot the system and boot from the USB drive. Remember to set the BIOS to USB boot.

  • System booting from USB flash drive.

Bandwidth limiting in Apache2

July 16th, 2009

Serving large files from a web server can be a pain, specially if you have limited bandwidth. The ultimate goal is to offer the best service to each user, that’s why it’s a good idea to sometimes limit or throttle the available bandwidth for each user.

In the Ubuntu repositories you can find the modules libapache2-mod-bw for Apache which will help you manage the the available bandwidth each user gets when downloading a file from Apache web server.

This article assumes you already have a functional Apache installation

Install mod_bw using apt-get.

sudo apt-get install libapache2-mod-bw

And enable the module using a2enmod bw.

sudo a2enmod bw

Now add the following to /etc/apache2/sites-available/default. The intention is to limit the bandwidth available to every user to 10Kb/s. Double the value in Bandwidth all if you wish to increase the rate.

ServerAdmin webmaster@localhost
 
        BandwidthModule On
        ForceBandWidthModule On
        Bandwidth all 10240
        MinBandwidth all -1

Restart Apache web server for the changes to take effect.

sudo /etc/init.d/apache restart

VMware Converter installation on Ubuntu Linux

April 4th, 2009

Linux users will be pleased to discover that VMware Converter is now available on Linux free of charge. As a user of VMware products this makes me very happy, meaning I do not have to be booting the Windows machine just to use VMware Converter. For those not aware of what Converter can do, it can convert multiple virtual machines simultaneously, modify, resize and hot clone existing bare metal installations just to mention a few.

The installation of VMware Converter on Linux is simple. This tutorial uses Ubuntu Linux as the installation system.

Download VMware Converter

First download VMware Converter free of charge from the VMware web site, you will need an account.

http://www.vmware.com/products/converter/overview.html

After you are granted access to the download page select Converter Installer for Linux.

Installation

After the download is complete move to the directory where the file is located and untar the file. The version of VMware Converter may vary.

tar xvzf VMware-converter-4.x.x-xxxx.tar.gz

Now move to the new directory.

cd vmware-converter-distrib

And execute the installation script.

sudo ./vmware-install.pl

License agreement

You will be asked to accept the license agreement in order to continue, press enter until reach the end of the agreement and answer yes to accept.

Press enter, all the way

Its ok accept the default installation options when installing VMware software, unless you want specific changes. This is not the case. Pay attention to the questions below, accept the defaults.

Do you want to install Converter Standalone Client? [yes]
 
Do you want to install Converter Standalone Server? [yes]

Now you are asked whether you want to enable remote access for Converter Standalone Server for security reasons I decided not to. This is installation is for personal use.

Do you want to enable remote access in Converter Standalone Server? [no] no

And keep pressing enter.

Installation complete

Allow some time for the installation to finalize, after the installation is successful you can find VMware Converter on System Tools > VMware Standalone Client.

Un-install ?

If for some reason you decided to un-install VMware Converter navigate to /usr/bin and execute the un-install script.

cd /usr/bin
sudo ./vmware-uninstall-conveter.pl

References