元数据与数据治理|Apache Atlas安装过程详解(初步版本)

版权声明:更多信息请关注 wwws.shinians.com 官网 https://blog.csdn.net/zzhuan_1/article/details/86170955

                                  Apache Atlas安装过程详解

一  安装Apache Atlas

1.下载安装包执行以下命令

tar xvfz apache-atlas-1.1.0-sources.tar.gz
cd apache-atlas-sources-1.1.0/
export MAVEN_OPTS="-Xms2g -Xmx4g"
mvn clean -DskipTests install

服务器内存至少要4G(参考别人的博客,要是服务器够就按照上面来吧)

官方下载地址https://atlas.apache.org/InstallationSteps.html

或者采用git方式下载:git clone https://git-wip-us.apache.org/repos/asf/atlas.git atlas

执行命令出现问题,参考文末的异常汇总(感触:当时遇到maven版本的问题解决的了一段时间,现在共享出来 ,避免入坑,参看  问题1(文末)

2)打包atlas

(机器上已经装有hbase和solr)

mvn clean -DskipTests package -Pdist

(机器上没有装hbase和solr,atlas自带hbase和solr)

mvn clean -DskipTests package -Pdist,embedded-hbase-solr

(备注:mvn clean package -DskipTests -Pdist,external-hbase-solr  使用外部的hbase)

刚开始没有安装这两个,所以选择的这种(安装用的时间挺长1-2个小时)。

如下是遇到的部分问题

....  一直卡在这,索性就停止了 ctrl+c


在重复执行命令:如下错误 

[INFO] Apache Atlas Web Application 1.1.0 ................. SUCCESS [ 26.122 s]
[INFO] Apache Atlas Documentation 1.1.0 ................... SUCCESS [  7.169 s]
[INFO] Apache Atlas FileSystem Model 1.1.0 ................ SUCCESS [  4.408 s]
[INFO] Apache Atlas Plugin Classloader 1.1.0 .............. SUCCESS [  1.483 s]
[INFO] Apache Atlas Hive Bridge Shim 1.1.0 ................ SUCCESS [  1.752 s]
[INFO] Apache Atlas Hive Bridge 1.1.0 ..................... SUCCESS [  6.862 s]
[INFO] Apache Atlas Falcon Bridge Shim 1.1.0 .............. SUCCESS [  1.826 s]
[INFO] Apache Atlas Falcon Bridge 1.1.0 ................... SUCCESS [  5.559 s]
[INFO] Apache Atlas Sqoop Bridge Shim 1.1.0 ............... SUCCESS [  1.065 s]
[INFO] Apache Atlas Sqoop Bridge 1.1.0 .................... SUCCESS [  7.324 s]
[INFO] Apache Atlas Storm Bridge Shim 1.1.0 ............... SUCCESS [  0.897 s]
[INFO] Apache Atlas Storm Bridge 1.1.0 .................... SUCCESS [  4.324 s]
[INFO] Apache Atlas Hbase Bridge Shim 1.1.0 ............... SUCCESS [  3.118 s]
[INFO] Apache Atlas Hbase Bridge 1.1.0 .................... SUCCESS [  8.481 s]
[INFO] Apache Atlas Kafka Bridge 1.1.0 .................... SUCCESS [  2.915 s]
[INFO] Apache Atlas Distribution 1.1.0 .................... FAILURE [  4.330 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  06:17 min
[INFO] Finished at: 2019-01-10T13:46:03+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (hbase) on project atlas-distro: An Ant BuildException has occured: Error while expanding /u01/apache-atlas-sources-1.1.0/distro/hbase/hbase-1.1.2.tar.gz
[ERROR] java.io.EOFException: Unexpected end of ZLIB input stream
[ERROR] around Ant part ...<untar src="/u01/apache-atlas-sources-1.1.0/distro/hbase/hbase-1.1.2.tar.gz" dest="/u01/apache-atlas-sources-1.1.0/distro/target/hbase.temp" compression="gzip"/>... @ 7:164 in /u01/apache-atlas-sources-1.1.0/distro/target/antrun/build-Download HBase.xml
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :atlas-distro
[root@bogon apache-atlas-sources-1.1.0]# 
[root@bogon apache-atlas-sources-1.1.0]# 
[root@bogon apache-atlas-sources-1.1.0]# 
[root@bogon apache-atlas-sources-1.1.0]# pwd
/u01/apache-atlas-sources-1.1.0
[root@bogon apache-atlas-sources-1.1.0]# ls

大概意思是hbase-1.1.2-bin.tar.gz没有下载完导致的,可是下载特别慢,所以重新在csdn上找了一个上传到了服务器上 

重新执行打包命令(注意路径哈:apache-atlas-sources-1.1.0目录下)

 mvn clean -DskipTests package -Pdist,embedded-hbase-solr

上个问题解决了,下载开始下 在solr呢,版本5.51(等着吧)

有出现下载 缓慢的问题了,索性也停止了,下载solr,重新执行命令

 

最后不可思议的居然成功了,如下图(纪念下)

3.atlas配置启动(目录如下)

命令:

cd  /u01/apache-atlas-sources-1.1.0/distro/target/apache-atlas-1.1.0-bin/apache-atlas-1.1.0/bin
./atlas_start.py

看到这个是无比喜悦呀,正式开启下一 步骤操作 

(遗留问题:要是内网无法联网如何安装?要是自定义的hbase和 solr如何配置?在初步了解atlas后在来晚上此篇)

4.  测试环节 

 curl -v http://127.0.0.1:21000/api/atlas/admin/version

如提示没有权限 ,则需要带上用户名和密码,命令如下: 

curl -v -u admin:admin http://127.0.0.1:21000/api/atlas/admin/version

命令参数解释

curl -v -u username:password http://127.0.0.1:21000/api/atlas/admin/version

username:默认admin 
password:默认admin 

成功

5.页面访问

用户账号/密码:admin/admin


问题汇总

问题1 :mvn clean -DskipTests install报错

Maven版本的原因?

--- maven-enforcer-plugin:3.0.0-M1:enforce (enforce-versions) @ apache-atlas ---
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireMavenVersion failed with message:
** MAVEN VERSION ERROR ** Maven 3.5.0 or above is required. See https://maven.apache.org/install.html
 

[INFO] Apache Atlas Server Build Tools ................... SUCCESS [2.385s]
[INFO] apache-atlas ...................................... FAILURE [1.548s]
[INFO] Apache Atlas Test Utility Tools ................... SKIPPED
[INFO] Apache Atlas Integration .......................... SKIPPED
[INFO] Apache Atlas Common ............................... SKIPPED
[INFO] Apache Atlas Client ............................... SKIPPED
[INFO] atlas-client-common ............................... SKIPPED
[INFO] atlas-client-v1 ................................... SKIPPED
[INFO] Apache Atlas Server API ........................... SKIPPED
[INFO] Apache Atlas Notification ......................... SKIPPED
[INFO] atlas-client-v2 ................................... SKIPPED
[INFO] Apache Atlas Graph Database Projects .............. SKIPPED
[INFO] Apache Atlas Graph Database API ................... SKIPPED
[INFO] Graph Database Common Code ........................ SKIPPED
....
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.184s
[INFO] Finished at: Wed Jan 09 14:25:34 CST 2019
[INFO] Final Memory: 48M/1979M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce (enforce-versions) on project apache-atlas: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command

解决方案 下载高版本的maven

下载最新版的Maven程序:https://maven.apache.org/download.cgi

注意配置maven变量

vi /etc/profile

source /etc/profile

注意验证下版本

版本解决完后回到apache-atlas-sources-1.1.0继续执行mvn clean -DskipTests install

这边报错是这个 原因造成的

猜你喜欢

转载自blog.csdn.net/zzhuan_1/article/details/86170955