Posts Tagged ‘Linux’

We need:

  1. One Vanilla Installation of Ubuntu 10.0 (any version should still work fine)
  2. Machine with enough hard disk space (i used about 10gb for a NON-production testing only machine)
  3. A working internet connection

Lets get started.

*quick note, i have a GUI installed in this box (XFCE) this is absolutly NOT necessary (and most of the time NOT recommended for actual servers)

Set up your Server’s Hostname properly:

to view your current hostname: cat /etc/hostname

cat is a util used to print text out to standard out from a text file. /etc/hostname is where the hostname of the computer is stored.

Viewing Hostname

How to View your Hostname

To set a Host-name simply:

echo “YOUR-HOST-NAME-HERE” > /etc/hostname

echo is a program to repeat what you types into standard out. The “>” sign is for porting information in linux. Here we port that information into the file “/etc/hostname”

How to set the Host-name in your Computer

Setting a custom host-name in your Computer

Set your Domain preferences:

to view your current settings:    cat /etc/resolv.conf

to set a new domain:    echo “domain geek.local” > /etc/resolv.conf

Viewing and Setting your Resolv.Conf

Setting up your Network Settings:

Now normally, in a real life situation you’d have a Static IP for your DNS server (this isnt a recommendation this is a MUST). However, personally i’m setting this up on a Vritual Machine, which means i have to switch between  connecting the server to my REAL network and to my virtual network. What does this mean for us? We basically need to be a wizzz at changing your network settings on the fly!

Here’s the quick Run down:

Viewing your Current Network Settings:

ifconfig -a

This will basically show you all your currently set network settings. Dont get confused by the “lo” interface. That’s the local loop interface in Linux.

Viewing your Network configurations

To set a static IP on your network interface:

ifconfig <interfacename> <ip-address> netmask <network-mask/subnet mask>

eg. ifconfig eth0 netmask

Setting a Static IP for a selected Network Interface

To get IP settings automatically from a DHCP server

dhclient <interface-name>

e.g. dhclient eth0

Getting down Network Configuration settings from a DHCP server

Installing BIND9 and other Necessary Tools

1. Make sure your server is connected to the internet

2. sudo apt-get update

sudo apt-get update

3. sudo apt-get install bind9 dnsutils

Installing BIND9 & DNSUTILS

If everything went well, you should see this message:


Setting up Forward-look-up files and reverse look-up files will be posted shortly!


Ok so you set up your Linux distro on your Box properly.. but you dont want to always use your root account? So lets create a new account just for you! I understand that this post might look a bit redundant because almost all Linux Distros these days come with a very simple, straight forward GUI solutions to create and manage users and groups. I just think knowing how to do it through bash can sometimes be useful, plus it’s a hell of alot faster!

Step 1 Create the Account

Creating a New user Account:

Default Syntax:

useradd [-c comments]

[-d home_directory]

[-e expire_date]

[-g initial_group]

[-G group1,group2,….]

[-s shell]

[-u uid]

Ok so all these different arguments can be typed in one line, dont try to type them out in different lines… Almost all of them are pretty self explanatory. You’ll see that -g and -G are two different arguments, yes linux makes a huge fuss about capital and simple letters ( geekdomain and Geekdomain and two different user accounts in linux).

Please realize that UID is NOT the user name.. that’s the User ID, which is a numerical value.
Examples :

useradd -c test_account -g users geek   (Here the comment is “test_account” the account has a initial group of “users” and username of geek)

useradd -g root geek (here a new user is added, with a initial group of “root” and username of geek”)

By now you must have noticed that you DONT need to actually type out ALL the arguments, linux will use the default value if you dont type them in.

Step 2 Set a password for the account


passwd user_name

Type this out, press enter and when prompted for, enter the new password for that account!


passwd geek

(press enter)

(type in new password)

Ok so your a Newbie/Noob/beginner/amature in the linux scene.

Ok so you got your OS installed with the step by step wizard and now you try to install your Programs.

See Installing Programs in Linux.

But then ! you get your first error message. Trust me, being a kind of new guy to linux my self i KNOW how frustrating it is to get your programs installed in linux with it’s rather un-understandable error messages.

A very common error most people get when trying to install a new program in the NEW linux installation is

bash: make: command not found

Ok you can stop your uncontrollable fit form anger form this point on wards. 🙂

Because, Well it’s actually a simple error that can be fixed easily!


Ok here’s a Quick Guide on How to Install and get Compiz Up and Running On Your New Ubuntu 8.10 Intrepid Ibex Machine!

STEP 1 (Graphics Cards) – Installing Graphics Card Drivers, Activating Them…

Ok First off we need to get your Graphics cards up and Running! Install Graphics Card drivers in Linux and Activate them! It’s really not that hard now with the New ubuntu release

1. Goto Add/Remove Applications from yours Applications Menu

2. Searching :

2.1 If You have an ATI Card Search for “ATI graphics”

Tick The Packages

  • ATI Binary Driver
  • ATI Catalyst Control Center

Click Apply Changes!

2.1 If You Have an Nvidia Card Search For “Nvidia”

Tick the Packages

  • Hardware drivers
  • Nvidia X Server Settings
  • Nvidia binary driver (version 177 driver)
  • NTv Tv Out

Click Apply Changes!

This step should install your Graphics Drivers Without any problems….

3. Autharizing Drivers

After You install the drivers you have to enable them for them to be used by Ubuntu.. This can be done very Easily!

Goto System>Administration>Hardware Drivers

From There, If Your Using an Nvidia Card Select the “Nvidia Accelerated Graphics Driver (Version 177) and click Activate

If your Using an ATI card, Select the ATi Driver and Click Activate!

STEP 2 Installing Compiz!- Downloading and installing compiz,

1. Goto Applications> Add/Remove Applications

2. Search For “Compiz”

3. Tick

  • Advanced Desktop Effects Settings (ccsm)
  • Compiz Fusion Icon
  • Screenlets (Optional)

4. Click Apply Changes!

Side Note : You Can Make Compiz Start Automatically With Ubuntu on Start up Through the Compiz Fusion Icon Program…..