ubuntu22.04安装atlas2.0.0

这是本人《数据治理》课程的课程实验,对本人来说非常具有挑战性。
环境:
1、Apache Atlas 2.0
2、JDK 1.8.0_251
3、Maven 3.6.3
因为是课程作业,不用于生产。使用Atlas内嵌Hbase与Solr的部署方式。
在ubuntu裸机上安装,裸机未安装java,hadoop等环境。
jdk和maven都使用apt方式安装。

sudo apt install openjdk-8-jdk
sudo apt install maven

输入java --version和mvn --verision查验

maven需要换源,
使用apt方式安装的maven在/usr/share/maven路径下。

为settings.xml添加

    <!-- 中央仓库1 -->
    <mirror>
        <id>repo1</id>
        <mirrorOf>central</mirrorOf>
        <name>Human Readable Name for this Mirror.</name>
        <url>https://repo1.maven.org/maven2/</url>
    </mirror>

    <!-- 中央仓库2 -->
    <mirror>
        <id>repo2</id>
        <mirrorOf>central</mirrorOf>
        <name>Human Readable Name for this Mirror.</name>
        <url>https://repo2.maven.org/maven2/</url>
    </mirror>

然后去apache atlas官网http://atlas.apache.org/#/Downloads下载源代码,
在这里插入图片描述

由于在生产环境这个需要个性化配置,所以他们那里只提供代码,需要自行编译。可以在虚拟机下载,或者下载之后传上去。
进行解压

tar -zxf apache-atlas-2.0.0-sources.tar.gz

进入到解压后的 Atlas 的根目录下

执行Maven编译打包

export MAVEN_OPTS="-Xms2g -Xmx2g"
mvn clean -DskipTests package -Pdist,embedded-hbase-solr

maven耗时很长,大概40分钟。
这是编译途中。
在这里插入图片描述
中间过程
在这里插入图片描述
猜想一共分37节,不过我不熟悉maven,就不献丑了。
在这里插入图片描述
会发生报错,参考文献2,修改atlas文件夹中的pom.xml
在这里插入图片描述
其中,文献2中的setting.xml在atlas文件夹下找不到,
甚至集成了node.js,叹为观止
在这里插入图片描述
中途node.js出了问题,我忘了截图,但重新运行一边后,貌似没有了问题。
documentation处又产生了问题,参考参考文献3
在documentation处的报错信息如下
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.7:site (default) on project atlas-docs: SiteToolException: The site descriptor cannot be resolved from the repository: ArtifactResolutionException: Unable to locate site descriptor: Could not transfer artifact org.apache:apache:xml:site_en:17 from/to central (http://repo1.maven.org/maven2): Failed to transfer file: http://repo1.maven.org/maven2/org/apache/apache/17/apache-17-site_en.xml. Return code is: 501 , ReasonPhrase:HTTPS Required.
[ERROR] org.apache:apache:xml:17
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] central (http://repo1.maven.org/maven2, releases=true, snapshots=false),
[ERROR] hortonworks.repo (http://repo.hortonworks.com/content/repositories/releases, releases=true, snapshots=false),
[ERROR] apache.snapshots.repo (https://repository.apache.org/content/groups/snapshots, releases=true, snapshots=true),
[ERROR] apache-staging (https://repository.apache.org/content/groups/staging/, releases=true, snapshots=true),
[ERROR] default (https://repository.apache.org/content/groups/public/, releases=true, snapshots=true),
[ERROR] java.net-Public (https://maven.java.net/content/groups/public/, releases=true, snapshots=true),
[ERROR] repository.jboss.org-public (https://repository.jboss.org/nexus/content/groups/public, releases=true, snapshots=true),
[ERROR] typesafe (http://repo.typesafe.com/typesafe/releases/, releases=true, snapshots=true),
[ERROR] alimaven (http://maven.aliyun.com/nexus/content/groups/public/, releases=true, snapshots=true),
[ERROR] oracleReleases (http://download.oracle.com/maven, releases=true, snapshots=true),
[ERROR] apache.snapshots (http://repository.apache.org/snapshots, releases=false, snapshots=true)
[ERROR]
[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 -rf :atlas-docs
————————————————
版权声明:本文为CSDN博主「L13763338360」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/L13763338360/article/details/104053480
在这里插入图片描述
配置maven镜像
在这里插入图片描述
但参考文献3的方法没有解决这一问题。
看报错信息与typesafe有关,
在这里插入图片描述
使用参考文献4
在这里插入图片描述
还是不行,和刚才一样的报错,可能是这个typesafe出了问题,大概是参考文献4中的typesafe也出了问题。
在这里插入图片描述
再次修改pom.xml
从参考文献5处得到了typesafe的url
总体编译完成!
在这里插入图片描述
看他写了只花了29分钟,其实断断续续从下午1点弄到5点,整4个小时。
然后参考文献1,进入distro/target,运行atlas_start.py.但python命令不存在,只有python3命令,而这个又是用python2写的,python3不能执行,

$ sudo apt install python2

在这里插入图片描述
py2安装成功。
需要和参考文献1一样解压
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
如果没有问题。现在输入python2 bin/atlas_start.py应该就可以启动了,如果启动了之后,说atlas start,但无论localhost:21000还是curl都不能访问,就要查看log_dir里面的application.log,可能是zookeeper端口占用,kill掉占用端口的进程即可。第一次用的时候,不知道为什么被占用了,后来重启一遍,就神奇的好了。
整体工程量非常浩大,由于时间精力所限,后面写的非常简略,以后有时间可能会补。

参考文献
1.http://t.csdn.cn/m9tZb
2.http://t.csdn.cn/S1dh1
3.http://t.csdn.cn/B8d5C
4.http://t.csdn.cn/T2Ilh
5.http://t.csdn.cn/Drvid

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值