Archive | January, 2010

CPAN automatically follow dependencies

22 Jan

$> cpan
cpan> o conf prerequisites_policy follow
cpan> o conf commit
cpan> quit


7 Jan

Install Postgresql on CentOS:

yum install postgresql postgresql-server

Need to edit: /var/lib/pgsql/data/pg_hba.conf, change the file so it looks like:

# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all trust
# IPv6 local connections:
host all all ::1/128 trust

host all all md5 all

host all all trust

To dump a database:
pg_dump -Fc my_database > hmm.sql

To restore it:
pg_restore -c -U postgres -d new_database /tmp/hmm.sql