• Ranger (三) --------- 安装 RangerUsersync



    一、RangerUsersync 简介

    RangerUsersync 作为 Ranger 提供的一个管理模块,可以将 Linux 机器上的用户和组信息同步到 RangerAdmin 的数据库中进行管理。

    二、RangerUsersync 安装

    A、解压软件

    [root@hadoop102 software]# tar -zxvf ranger-2.0.0-usersync.tar.gz -C /opt/module/ranger/
    
    • 1

    B、配置软件

    /opt/module/ranger/ranger-2.0.0-usersync 目录下修改以下文件

    [root@hadoop102 ranger-2.0.0-usersync]# vim install.properties
    修改以下配置信息
    #rangeradmin的url
    POLICY_MGR_URL =http://hadoop102:6080
    
    #同步间隔时间,单位(分钟)
    SYNC_INTERVAL = 1
    
    #运行此进程的linux用户
    unix_user=ranger
    unix_group=ranger
    
    #rangerUserSync用户的密码,参考rangeradmin中install.properties的配置
    rangerUsersync_password=fancy123
    
    #Kerberos相关配置
    usersync_principal=rangerusersync/hadoop102@EXAMPLE.COM
    usersync_keytab=/etc/security/keytab/rangerusersync.keytab
    hadoop_conf=/opt/module/hadoop-3.1.3/etc/hadoop
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19

    C、在/opt/module/ranger/ranger-2.0.0-usersync 目录下执行安装脚本

    [root@hadoop102 ranger-2.0.0-usersync]# ./setup.sh
    出现以下信息,说明安装完成
    ranger.usersync.policymgr.password has been successfully created.
    Provider jceks://file/etc/ranger/usersync/conf/rangerusersync.jceks was updated.
    [I] Successfully updated password of rangerusersync user
    
    • 1
    • 2
    • 3
    • 4
    • 5

    D、修改 /opt/module/ranger/ranger-2.0.0-usersync/conf/ranger-ugsync-site.xml 配置文件中的以下参数

    <property>
        <name>ranger.usersync.enabledname>
        <value>truevalue>
    property>
    
    • 1
    • 2
    • 3
    • 4

    三、RangerUsersync 启动

    A、启动之前,在 ranger admin 的 web-UI 界面,查看用户信息如下
    在这里插入图片描述

    B、启动RangerUserSync (使用ranger用户启动)

    [root@hadoop102 ranger-2.0.0-usersync]# sudo -i -u ranger ranger-usersync start
    Starting Apache Ranger Usersync Service
    Apache Ranger Usersync Service with pid 7510 has started.
    
    • 1
    • 2
    • 3

    C、启动后,再次查看用户信息

    在这里插入图片描述
    说明 ranger-usersync 工作正常 !

    ranger-usersync 服务也是开机自启动的,因此之后不需要手动启动。

  • 相关阅读:
    java毕业设计单车商城Mybatis+系统+数据库+调试部署
    Elasticsearch中使用join来进行父子关联
    fission使用指南
    php练习04
    mybatis初体验(细节满满)
    【趣味随笔】移动机器人基础(导航方式、自主导航、硬件系统结构分布)
    【JS】BMI身体质量指数计算工具
    【Leetcode刷题Python】300. 最长递增子序列
    【MySQL】约束
    洛谷千题详解 | P1006 [NOIP2008 提高组] 传纸条【C++、 Java、Python语言】
  • 原文地址:https://blog.csdn.net/m0_51111980/article/details/127660776