connect: Network is unreachable

So suddenly I was getting this weird error. Don’t know the exact reason. But some forum says it may happens because of having multiple NICs.

Anyway, then I checked $ sudo netstat -nr

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface   U         0 0          0 eth0

then run the following command

$ /sbin/route add -net gw eth0

and this time the result was different

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface         UG        0 0          0 eth0   U         0 0          0 eth0

….tada!!! It started working!

Installing Vim from source in Ubuntu

Vim can be easily found in Synaptic Package Manager. But sometimes that is the oder version. Like I need Vim 7.3 where the available version in synaptic package manager is 7.2. Then I thought I should go for the source file available on the site. I downloaded the file and tried to run as the site said. But it was showing some errors. Then I googled again to get some more idea. I found a simple process. Which says four steps after going to the vim directory:
1. ./configure
2. make
3. sudo make install
4. sudo ln -s /usr/local/bin/vim /usr/bin/vim (process 4 is optional)
But then I got a new error message telling me something like these You need to install a terminal library: for example ncurses. Or specify the name of the library with –with-tlib
This particular error informs us that we need an additional dev library to compile the file.
To get the library simply type:

sudo apt-get install libncurses5-dev

Then follow the four simple steps mentioned earlier in the post.
Now new version of Vim should be installed in your system.

Install phpmyadmin in ubuntu

In the previous article you’ve seen how to setup a LAMP server. Now if you want to install phpmyadmin open your terminal and type
sudo apt-get install phpmyadmin
follow the screen.

Now, open browser go to http://localhost/phpmyadmin/

you are done with your phpmyadmin installation. now, login with the password you provided earlier.

Install LAMP on ubuntu

Installing LAMP(Linux, Apache, MySQL, PHP) is not that tough now-a-days.

The easiest way
First open the synaptic manager with sudo synapti
then Edit ==> Mark Packages by Task
select LAMP server from the list and click OK.

Another easy way
go to terminal and type
sudo tasksel

press space bar to select and then tab to <ok>
Follow the screen.

One line command setup
go to terminal and type
sudo apt-get install lamp-server^
N. B the character ‘^’ is not a typo
Follow the screen, it’ll ask to change password for the root user of MySQL database.

Now. test Apache. Open a browser and type http://localhost/

if you see this, you are done with you apache installation.

test PHP installation. open terminal and type
sudo vim /var/www/test.php
save the file.
again, sudo /etc/init.d/apache2restart
now, open browser and try http://localhost/test.php

you see this, means your PHP installation is completed.

Test MySQL setup
go to terminal and type
mysql -u root -p

you see this, ahhhh….you are done with the famous LAMP installation 😀

For phpmyadmin setup try this

gnome-keyring password ubuntu

After my latest setup of ubuntu 10.04, I was facing problem with the keyring password access whenever I was accessing yahoo on Empathy.

To change gnome-keyring password graphically

Places ==> Home Folder

then, ctrl+h to view the hidden files.

.gnome2 ==> keyrings

delete the the file default.keyring
next time when you’ll try anything like that, it’ll ask for new password.

To change gnome-keyring password for CLI
rm ~/.gnome2/keyrings/default.keyring

to keep backup of the original file
mv ~/.gnome2/keyrings/default.keyring ~/.gnome2/keyrings/default.keyring.bak