Tuesday, February 19, 2013

VIM Quick Tips : Show tab number

Quick tips
:set guitablabel=%N/\ %t\ %M
Show tab number.


References:
http://vim.wikia.com/wiki/Show_tab_number_in_your_tab_line
Show tab number

Monday, February 18, 2013

apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

When I try to restart Apache using sudo service apache2 restart I am getting the following message:

 * Restarting web server apache2                                                    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
 ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

To get rid of it, I have to add the following in my /etc/hosts file:

127.0.1.1 ubu1210minib.com ubu1210minib


Where ubun1210minib.com ubun1210minib is an arbitrary name I selected. Of course this is not the proper way to fix it as the above information does not properly resolve.  Also need to modify /etc/apache2/sites-enabled/000-default to have a line like:


<VirtualHost *:80>
 ServerAdmin webmaster@localhost
 ServerName ubu1210minib.com

 DocumentRoot /var/www


Note the line that contains ServerName, that should match with the name provided above.

Wednesday, February 13, 2013

Cleanup or purge configuration files from packages

When removing packages, like sudo apt-get remove virtualbox-guest-utils, it may leave configuration files in the system. This can be verified by running dpkg -l | grep 'virtualbox' for example. If the first string shows rc (removed, configuration files present) then purging is necessary, like so:

$: sudo lshw -class memory

List installed package(s) in Debian based distro

Show installed package that has a string 'virtualbox'

$: dpkg -l | grep 'virtualbox'