Wednesday, September 7, 2011

Adding UUID generation support in Postgresql (uuid_ossp)

UUID generation support can be added in postgres by adding the third party module called 'uuid_ossp'.  I will explain the step to follow in ubuntu 10.04 LTS with postgres 9.0.4.

1) Add the uuid_ossp library to your system (If it is not there). This can be done by downloading the latest source from 'http://www.ossp.org/pkg/lib/uuid/.

2)  Check the postgres version by psql -V
3) Check whether the contrib support is there in postgres installation.

This can be done by checking for the "contrib" directory in /usr/share/postgresql/9.0

If it is not there add the contrib support by using the following command.

apt-get install postgresql-contrib-9.0

Now check for the contrib directory.

The UUID_OSSP support can be added to each database using the following command.

psql -d <database> -U <user> -f /usr/share/postgresql/9.0/contrib/uuid-ossp.sql

You can verify the UUID support by running the following query.


select uuid_generate_v1mc()

Enjoy the time with postgres :)

Tuesday, August 30, 2011

Enable secure browsing in facebook.

You can enable the secure browsing (https) in facebook by using the following steps.

Go to Account settings >> Security >> Enable Secure browsing.

Enable it and have a safe timeout in facebook :)

Monday, August 29, 2011

Version Update in Ubuntu.

1) From upgrading from 8.04 and 9.10 to latest LTS (10.04).

Check the current version by cat /etc/issue

Run apt-get update

Upgrade the current installations to latest release in the current version, for that Run apt-get upgrade

Set the upgrade file to check for latest LTS version, for that set PROMPT=lts in /etc/update-manager/release-upgrades

Then perform the upgrade by running d0-release-upgrade

This will update the OS version to latest LTS version.

Confirm by checking /etc/issue


Upgrade procedure for the versions in which the direct upgrade will not work (Eg : 9.04 to 10.04)

Check the current version by cat /etc/issue

Run apt-get update

Upgrade the current installations to latest release in the current version, for that Run apt-get upgrade

Then comes the tricky step, Edit the /etc/apt/sources.list file and replace the current repo name with the repo to which you need to be upgraded. In the case of 9.04 to 10.04 updgrade replace jaunty with lucid and save the file.

Then run apt-get update and apt-get upgrade

This will update the ubuntu to the new version.

Enjoy and have a nice time with ubuntu :)



Some tips in Windows.

This is very simple tips. Anyway might me helpful to somebody :)

1) How to list the environmental variables in Windows?

SET command displays all the Environmental variables.

2) How do you know if a windows file in your path is executable?

We can check this by checking the extension of the file. The extensions which one system considers as executable can be found out from the environment variable PATHEXT. We can get the list of executable extensions by echo %PATHEXT%.

3) How do you determine if a windows program is in your path?

We can check this by checking the PATH environment variable of the program. echo %PATH% with give the path of that program.

Idea behind this Blog!

The idea behind this blog is very simple. Just to have a mark of technical things which I go through everyday and a platform for sharing my knowledge. Most of the work did in this field (sysadmin) is with the help of Google! So I thought of something giving back to the community. I will do it as goos as I can.