Archive | January, 2010

CPAN automatically follow dependencies

22 Jan


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

Advertisements

Postgres

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 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust

host all all 10.0.0.0/8 md5 all

host all all 192.168.50.0/24 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