Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Check if postgresql is running
- ===
- /etc/rc.d/init.d/postgresql status
- /etc/rc.d/init.d/postgresql-9.3 status
- Find all processes running under postgres user
- ===
- ps -f -u postgres
- ps auxw | grep post
- Show the TCP/IP addresses and ports PostgreSQL is listening on
- ===
- lsof -n -u posgres | grep LISTEN
- netstat -ltnp | grep postgres
- A failure message suggesting that another postmaster is already running should be checked carefully, for example by using the command
- ===
- ps ax | grep postmaster
- ps -ef | grep postmaster
- Grand sudo access
- ===
- visudo
- Secure access by disabling root and giving your Linux user account an ssh key
- ===
- On remote terminal:
- cd (homedir)
- mkdir .ssh
- touch .ssh/authorized_keys
- on remote machine:
- cat .ssh/id_rsa.pub
- copy
- On remote terminal:
- paste key into .ssh/authorized_keys
- Logon as root:
- sudo su -
- mv .ssh/authorized_keys .ssh/authorized_keys_OLD
- Edit pg_hba.conf
- ===
- vi /etc/postgresql/9.3/pg_hba.conf
Advertisement
Add Comment
Please, Sign In to add comment