- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Created on 09-07-2016 11:00 PM - edited 08-17-2019 10:18 AM
Ranger installation is not as simple as Adding Service on Ambari.
Ranger also requires DB and Solr for audit.
In this tutorial we will go through installing Ranger or default postgres DB installed during Ambari Server installation.
If you did a vanilla Ambari-server Install (HDP 2.4) you should have postgres running.
- Verify Default Post gresql running on Ambari-Server
On the Ambari-Server if you run "ps -eaf | grep ambari | grep postgres" you should be able to verify postgres db running.
We can see the process id is 9595. Running "netstat -anp | grep 9595" gives you the port number postgres DB is running on. We can try connecting using psql command. In our case it is running on default installation port 5432.
Now Let's create DB for ranger and give it permissions. If you have sudo you can log into postgres with postgres user. For reference please take a look at (https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.0/bk_security/content/configuring_postgresql_...)
Confirm by running "\l" command
Create Database ranger with user rangerdba.
Create Database ranger_audit, with user ranger_logger.
Verify Users via "/du"
Verify databases with "/dt"
Grant rangerlogger privileges
The postgres database should have following databases ranger, ranger_audit created and users rangerdba and ranger_logger created.
Install HDP search so Ranger Audit will work. (
run setup and start solr
Add Allow Access details for Ranger users: change listen_addresses='localhost'
to listen_addresses='*' ('*' = any)
to listen from all IPs in postgresql.conf
. (You can find files by find ~name postgresql.conf)
ake the following changes to the Ranger db user and Ranger audit db user in the pg_hba.conf
file. after editing the pg_hba.conf
file, run the following command to restart the PostgreSQL database.
Below are my configuration screen captures(note I changed the user from ranger_admin to ranger_dba)
Created on 09-12-2016 08:34 PM
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@John Park just a comment that using the built in Ambari Infra SolrCloud deployment is likely simplest for using Solr to index the Ranger audit data. See https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.0/bk_security/content/using_apache_solr_for_r...