Pages

Wednesday, June 30, 2010

Install GUI in Ubuntu Server

We have disccued how to install Ubuntu web server , if you are not familiar with using command prompt, you can GUI for Ubuntu server using 2 options :
  1. Install desktop environment
  2. Install Webmin
Now I will take about installing desktop environment, and later I will describe how to istall Webmin:

First you nee to make sure you have enabled Universe and multiverse repositories in /etc/apt/sources.list file :

how to enable Universe and multiverse repositories ?
Ubuntu uses apt for package management. Apt stores a list of repositories or software channels in the file,
/etc/apt/sources.list

By editing this file from the command line, we can add, remove, or temporarily disable software repositories,

Note: It's always a good idea to backup a configuration file like sources.list before you edit it. To do so, issue the following command:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

after backing up the file, you can edit the original file, the contents will have lines which is commend - have a # sign at the beginning of the line .

To add Universe and Multiverse Repositories you have to uncomment the corresponding apt line (i.e. delete the '#' at the beginning of the line), in this case you have to uncomment hte following lines :

deb http://us.archive.ubuntu.com/ubuntu/ hardy universe

deb-src http://us.archive.ubuntu.com/ubuntu/ hardy universe

deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe

deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe

After that you have to save the modifications and update the this packages from the newly added repositories by typing the following command in command prompt :

sudo apt-get update

now we wil start intsalling GNOME desktop, by typing the following command :

sudo apt-get install ubuntu-desktop

but if you want to install a graphical desktop manger without some of the desktop addons like Evolution and OpenOffice, but continue to use the server flavor kernel use the following command

sudo aptitude install -- no-install-recommends ubuntu-desktop

If you want to install light weight desktop install xfce using the following command

sudo apt-get install xubuntu-desktop

if you want to install KDE desktop use the following command

sudo apt-get install kubuntu-desktop


Have a fun :) , Later I will take about the second option for using GUI in Ubuntu :)

Step By Step Ubuntu LAMP Server Setup



Automatic LAMP (Linux, Apache, MySQL and PHP) In about 15 minutes, the time it takes to install Ubuntu Server Edition, you can have a LAMP server up and ready to go. This feature, exclusive to Ubuntu Server Edition, is available at the time of installation.

The LAMP option saves the trouble of installing and integrating each of the four separate LAMP components, process which can take hours and requires someone who is skilled in the installation and configuration of the individual applications. You get increased security, reduced time to install, and reduced risk of misconfiguration, all of which results in a lower cost of ownership.

Ubuntu LAMP server Install the following Versions

Ubuntu Dapper drake 6.06
Apache2
Mysql5
PHP5

First you need to download server version of Ubuntu version from here after that you create a CD and start booting with the CD Once it starts booting you should see the following screen in this you need to select second option “Install a LAMP Server Option” and press enter


Choose you language and press enter you can see we have selected english in the follwoing screen


Choose your location and press enter you can see we have have selected United Kingdom in the follwoing screen


Select keyboard layout and press enter


Detecting hardware to find CD-ROM Drivers in progress


Loading additional components progress bar


Configures the network with DHCP if there is a DHCP server in the network


Enter the Hostname of the system so in this example i enter here as lamp


Detecting Disks and Hardware in progress


Startingup the partitioner in progress


you have to partition your hard disk in this i have selected manually edit the partition table and press enter


It will show you the hard disk space and press enter here i am using vmware with 10.7GB of space


Create a New partition table on the device select yes and press enter


Now you can see the freespace and press enter


How to use this freespace select create a new partition and press enter

Enter the new patition size and press continue i have entered 100mb in this example

Select the type of the partition and press enter in this example i have selected primary

Location for the new partition as begining and press enter

Now you need to select the mount point with the following screen and press enter to change mount point

Now you can see the available mount points and here i have selected /boot mount point and press enter

Now you should see the following screen and here you need to select “Done Setting Up the Partition” option and press enter This will create the /boot mount point with 100mb of space and you can create the / mount point in the same way with the existing space.

you can see this in the following screen here you need to select “Finish partitioning and write changes to disk” option and press enter


Write the changes to disk option here you need to select yes and press enter

Creating ext3 filesystem in progress

Configuring the clock option here if you want to leave UTC Select yes otherwise no and press enter

You need enter the Full name of the user you want to create for your server in this example i have created test user select continue and press enter

username for your account in this i have entered test select continue and press enter

Entered the password for test user select continue and press enter

Confirm the password for test user select continue and press enter

Installing the base system in progress

Configuring package mirror this will be related to your country option

Selecting and Installing software in progress

Installing GRUB Boot loader in progress

Installation complete message here you need to remove your CD select continue and press enter it will reboot your server

After rebooting you can see the following screen prompt for username

This will complete the Ubuntu LAMP Server Installation and your server is ready for installing applications which supports apache,mysql and php.

Enable root Account in Ubuntu server (Not Recommended for security Reasons this is just Optional)

After the reboot you can login with your previously created username (test). Now we will enable the root account using the following command

sudo passwd root

and give root a password.

Now onwards we become root by running the following command

su

Configuring Static ip address in Ubuntu server

Ubuntu installer has configured our system to get its network settings via DHCP, Now we will change that to a static IP address for this you need to edit Edit /etc/network/interfaces and enter your ip address details (in this example setup I will use the IP address 172.19.0.10):

#vi /etc/network/interfaces

and enter the following save the file and exit

# The primary network interface

auto eth0
iface eth0 inet static
address 172.19.0.10
netmask 255.255.255.0
network 172.19.0.0
broadcast 172.19.0.255
gateway 172.19.0.1

Now you need to restart your network services using the following command

#/etc/init.d/networking restart

You need to setup manually DNS servers in resolv.conf file when you are not using DHCP.

#vi /etc/resolv.conf

You need to add look something like this

search domain.com

nameserver xxx.xxx.xxx.xxx

This is really simple and easy server installation for new users and who wants a quick server.

Friday, June 25, 2010

What is Ubuntu sever edition ?

Ubuntu is a complete Linux-based operating system containing the very best free and open source software applications you need to work and play. With Ubuntu you can surf the web, read email, create documents, presentations and spreadsheets, edit images and more.It is community developed. You can interact with the Ubuntu community including developers, translators and technical support activists through our mailing lists and IRC channel.
It is named after the Southern African ethical ideology Ubuntu ("humanity towards others") and is distributed as free and open source software with additional proprietary software available.


How to build DNS web server using Ubuntu

How to build mail server using Ubuntu

How to build dedicated web server using Ubuntu

vi editor

What is vi?
It's a text editor works under the command line environment in Linux OS, that is used to edit system files.

How to use vi?
can run vi editor in command line by typing vi them the name of file you want to edit.

Example :
vi new_file // to create new file with name new_file
vi existing_file // to edit exist file with name existing_file

How to use it ?
  1. After entering file editing mode, you can transfer between the lines of the file using keyboard arrows keys
  2. vi has two modes:(1)command mode (2)edit mode: when you enter the editor , the command mode is activated by default.
  3. To enter edit mode, you have to press i key from the keyboard , then a comment appears in the bottom of the window present the current mode. If you want to back to command mode you have to press "Esc" key.
  4. Before writing any command - such as edit or quit command- in the command line you need to press "shift" and ";" together.
  5. To save and edited or new created file you have to write this command (save file_name), where file_name is name of file your are working on, then press "Enter".It's important to remember that it saves the file in the current path !
  6. To exit you have to write "quit" and then press "Enter".
  7. To force the program to execute the command we need to add "!" mark, so the command will be like this : save! file_name.