1. Environment
CentOS 7.6
CDH 5.16.1
2. Install Sentry
1. Create a database
create database sentry default character set utf8;
CREATE USER 'sentry'@'%' IDENTIFIED BY 'admin';
GRANT ALL PRIVILEGES ON sentry. * TO 'sentry'@'%' IDENTIFIED BY 'admin';
FLUSH PRIVILEGES;
![](https://img2018.cnblogs.com/blog/1802007/201910/1802007-20191028222053785-1583489919.png)
2. Add Sentry Services
3. Configure permission by Sentry
1. Modify the configuration HiveServer2 Hive
![](https://img2018.cnblogs.com/blog/1802007/201910/1802007-20191028224954574-1171038409.png)
2. Configure Hive of Sentry Services
![](https://img2018.cnblogs.com/blog/1802007/201910/1802007-20191028225114308-1512085518.png)
3. Configure HDFS's Sentry, control user access HDFS directory
![](https://img2018.cnblogs.com/blog/1802007/201910/1802007-20191028225221951-303554304.png)
Configuring the Impala Sentry
![](https://img2018.cnblogs.com/blog/1802007/201910/1802007-20191028225457441-847986240.png)
The configuration of Hue Sentry
![](https://img2018.cnblogs.com/blog/1802007/201910/1802007-20191028225641473-194188423.png)
6. Turn mode hive testing services
![](https://img2018.cnblogs.com/blog/1802007/201910/1802007-20191028225936768-1800811657.png)