Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Setup access to vCops(Analytics VM)
- #Grant access to the db from a ip subset
- vi /data/pgsql/data/pg_hba.conf
- Add line:
- host all all 192.168.0.0/24 md5
- #Open for port 5432 in the vCops firewall
- vi /usr/lib/vmware-vcops/user/conf/install/vcopsfirewall.conf
- Add lines:
- # postgres
- TCPPORTS="$TCPPORTS 5432"
- #Restart vCops firewall
- service vcopsfirewall restart
- #Restart vCops Postgres db
- sudo -u postgres /opt/vmware/vpostgres/9.0/bin/pg_ctl -D /data/pgsql/data -m immediate restart
- #Login access
- #Get db user list -
- #su postgres
- #psql
- #\du
- #Get password for the db user(alive) -
- #su admin
- #vcops-admin get_db_password
- #Create db user and assign "read only" rights
- su postgres
- psql alivevm
- CREATE USER USERNAME WITH PASSWORD 'PASSWORD';
- GRANT CONNECT ON DATABASE alivevm TO USERNAME;
- GRANT SELECT ON ALL TABLES IN SCHEMA public to USERNAME;
- User now has remote access to the vCops db
Advertisement
Add Comment
Please, Sign In to add comment