how to enable ranger in HDP 3.1 steps and procedure ?.
Following doc talks about installing and setting up Ranger via Ambari.
Once the setup is done then you can enable ranger plugins for various services as mentioned in :
You can also refer to Hortonworks Youtube Channel:
Comprehensive Hadoop Security with Apache Ranger and Apache Knox (it is for HDP 2.2 however it will give a good QuickStart)