Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Tuesday, December 29, 2009

Install PostgreSQL on Ubuntu with python support

Recently I need it to install PostgreSQL for Django.
Here is how I did it.

$ sudo apt-get install postgresql python-psycopg pgadmin3
Note that pgadmin3 is a graphical app so unless you have Gnome or KDE installed you don't need it.

After you install everything you will need to set postgresql password.
$ sudo passwd postgres
$ su postgres
$ psql template1
Last command will open PostgreSQL shell where you can type:
ALTER USER postgres WITH ENCRYPTED PASSWORD 'password';
Thats all.

You can verify it by going to the python shell and importing it.
$ python
>>> import psycopg
>>> psycopg.apilevel
'2.0'
>>>

If you get this far than everything isup and running.

Thursday, December 17, 2009

Matrix in your terminal

This has to be the one thing all geeks(inluding me) want to do at some point. Turn your teminal into a Matrix terminal. Folks at commandlinefu.com submitting their own implementation. It's great to see how much you can accomplish with such a small amount of code. Whats even sweeter is that all that is done with tools all ready shippid with every linux or unix machine.

Go over there and try out the code samples or even submit your own.

Here is the link www.commandlinefu.com

Enjoy...

Wednesday, December 16, 2009

Synaptic search broken in Ubuntu 9.04

After doing a clean install of Ubuntu 9.04 desktop I fired up synaptic
and to my biggest surprise a quick search for apache2 did not show
any result. Google was bringing up mixed results so I just went strait
ahead to ubuntuforums.org. As always there was a fix listed there.

Here is how to fix it:
Open terminal and type in: sudo update-apt-xapian-index -f
This will force the index to be rebuild.
Now my synaptic works great!

Hope it helps... Good luck