Friday, October 10, 2008

how to remove autorun.inf virus

Tired from the autorun.inf virus from Removable disk and pen drives.

Here is the solution,

create a directory named "autorun.inf" in the root path of your removable disk,
so virus will never create that automatically and never executed automatically.....

enjoy !!!

be safe & keep others OS safe ;-)

Friday, October 03, 2008

How to change postgresql data directory

How to change postgresql data directory.
  1. vim /etc/postgresql/8.2/main/postgresql.conf
  2. set data directory path to the new directory path
  3. Create new Server Certificate
    1. openssl req -new -text -out server.req
    2. openssl rsa -in privkey.pem -out server.key
    3. rm privkey.pem
    4. openssl req -x509 -in server.req -text -key server.key -out server.crt
    5. chmod og-rwx server.key
    6. chown postgres:postgres server.key
  4. Stop and Restart Postgresql server
References:
  1. http://developer.postgresql.org/pgdocs/postgres/ssl-tcp.html
  2. http://www.linuxquestions.org/questions/linux-server-73/change-postgresql-data-directory-649911/
  3. http://www.postgresql.org/docs/8.3/static/runtime-config-file-locations.html