1,keytab⽂件及验证
[root@luban01 ~]# ll /etc/security/keytabs/
-r--------. 1 atlas atlas 666 7⽉ 4 19:28 atlas.keytab
-r--------. 1 hbase hbase 666 7⽉ 4 20:38 hbase.keytab
-r--------. 1 hdfs hdfs 658 6⽉ 27 16:20 hdfs.keytab
-rw-r--r--. 1 hive hive 658 6⽉ 27 16:22 hive.keytab
-r--------. 1 spark spark 666 6⽉ 27 16:22 spark.keytab
-r--------. 1 yarn yarn 658 6⽉ 27 16:20 yarn.keytab
[root@luban01 ~]# klist -kt /etc/security/keytabs/atlas.keytab
Keytab name: FILE:/etc/security/keytabs/atlas.keytab
KVNO Timestamp Principal
---- ------------------- ---------------------------------------------------
---
1 2022-07-04T19:30:04 atlas/luban01@xxxxx
[root@luban01 ~]# kinit -kt /etc/security/keytabs/atlas.keytab
atlas/luban01@xxxxx
[root@luban01 ~]# klist
Ticket cache: FILE:/tmp/krb5cc_0
Default principal: atlas/luban01@xxxxx
Valid starting Expires Service principal
2022-07-04T20:22:36 2022-07-05T20:22:36
krbtgt/.....
renew until 2022-07-11T20:22:36
2,hbase客户端验证及授权
[root@luban01 ~]# which hbase
/usr/local/hbase/bin/hbase
[root@luban01 ~]# ll /usr/local/hbase/conf/hbase-site.xml
-rw-r--r--. 1 root root 3299 7⽉ 4 19:22 /usr/local/hbase/conf/hbase-site.xml
-----先kinit hbase的keytab,保证hbase shell有相关权限
[root@luban01 ~]# klist -kt /etc/security/keytabs/hbase.keytab
Keytab name: FILE:/etc/security/keytabs/hbase.keytab
KVNO Timestamp Principal
---- ------------------- ---------------------------------------------------
---
1 2022-07-04T20:39:36 hbase/luban01@xxxxx
2[root@luban01 ~]# kinit -kt /etc/security/keytabs/hbase.keytab
hbase/luban01@xxxxx
-----在hbase中给atlas⽤户授予建表权限:grant 'atlas','RWXCA'
[root@luban01 ~]# hbase shell
hbase(main):001:0> status
1 active master, 1 backup masters, 6 servers, 0 dead, 0.5000 average load
hbase(main):002:0> scan 'hbase:meta'
hbase(main):003:0> grant 'atlas','RWXCA'
Took 0.5299 seconds
3,kafka客户端验证及授权
如果kafka集群配置中开启了禁⽌⽤户程序创建Topic主题的功能,则需要⼿⼯先创建
ATLAS_HOOK、ATLAS_ENTITIES;
-------auto.create.topics.enable=true ⽤户程序可以创建Topic主题,⽆需⼿⼯预先创建
[root@yyyyy~]# more /usr/local/kafka/config/server.properties | grep -i
"auto.create.topics.enable"
auto.create.topics.enable=true
[root@yyyyy~]# more /usr/local/kafka/config/server.properties | grep -i "zookeeper.connect="
zookeeper.connect=cth01:2181,cth02:2181,cth03:2181/kafka_2.0.1
4,ElasticSearch服务验证
curl yyyyy:9200
5,java环境及部署⽬录
[root@luban01 ~]# which java
/usr/jdk64/current/bin/java
[root@luban01 ~]# echo $JAVA_HOME
/usr/jdk64/current
[root@luban01 ~]# java -version
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)
6,atlas部署
(1)部署⽬录
[root@luban01 ~]# df -lh
⽂件系统 容量 已⽤ 可⽤ 已⽤% 挂载点
/dev/vdb1 1008G 4.0G 953G 1% /usr/local/luban
[root@luban01 ~]# cd /usr/local/luban
[root@luban01 luban]# pwd
/usr/local/luban
[root@luban01 luban]# ll | grep -i atlas
-rw-r--r--. 1 root root 365238762 7⽉ 4 20:17 apache-atlas-2.2.0-server.tar.gz
[root@luban01 luban]# tar -zxvf apache-atlas-2.2.0-server.tar.gz
[root@luban01 luban]# ln -s apache-atlas-2.2.0 atlas
[root@luban01 luban]# ls -l | grep -i atlas
drwxr-xr-x. 7 root root 4096 7⽉ 5 09:24 apache-atlas-2.2.0
-rw-r--r--. 1 root root 365238762 7⽉ 4 20:17 apache-atlas-2.2.0-server.tar.gz
lrwxrwxrwx. 1 root root 18 7⽉ 5 09:26 atlas -> apache-atlas-2.2.0
(2)配置⽂件
外置HBase集群的配置⽂件hbase-site.xml
-------确保atlas-env.sh中export HBASE_CONF_DIR=/usr/local/hbase/conf配置正确
[root@luban01 luban]# which hbase
/usr/local/hbase/bin/hbase
[root@luban01 luban]# ll /usr/local/hbase/conf/
......
-rw-r--r--. 1 root root 3299 7⽉ 4 19:22 hbase-site.xml
重点有两个配置⽂件:atlas-env.sh和atlas-application.properties
[root@luban01 atlas]# ll conf/
-rw-r--r--. 1 root root 12266 7⽉ 5 10:51 atlas-application.properties
-rw-r--r--. 1 root root 3444 7⽉ 5 09:56 atlas-env.sh
-rw-r--r--. 1 root root 5729 7⽉ 5 09:56 atlas-log4j.xml
-rw-r--r--. 1 root root 2543 7⽉ 5 09:56 atlas-simple-authz-policy.json
-rw-r--r--. 1 root root 31403 7⽉ 5 09:56 cassandra.yml.template
-rw-r--r--. 1 root root 237 7⽉ 5 09:56 users-credentials.properties
(3)atlas服务启动及验证
----停⽌atlas服务
[root@luban01 atlas]# python bin/atlas_stop.py
stopping atlas.
Apache Atlas Server stopped!!!
----启动atlas服务
[root@luban01 atlas]# python bin/atlas_start.py
Starting Atlas server on host: localhost
Starting Atlas server on port: 21000
...............
Apache Atlas Server started!!!
----验证atlas服务
[root@luban01 atlas]# lsof -i:21000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 223652 root 657u IPv4 20179247 0t0 TCP *:irtrans (LISTEN)
[root@luban01 atlas]# curl http://localhost:21000/api/atlas/admin/status
{"Status":"ACTIVE"}