# tail /etc/profile PATH="$PATH":/usr/lib/postgresql/9.2/bin/ export PATH export PGDATA=/var/lib/postgresql/9.2/main export PGDATABASE=yun export PGUSER=chen export PGHOST=127.0.0.1
# su - postgres $ pg_ctl status pg_ctl: 正在运行服务器进程(PID: 4954) /usr/lib/postgresql/9.2/bin/postgres "-D" "/var/lib/postgresql/9.2/main" "-c" "config_file=/etc/postgresql/9.2/main/postgresql.conf"