美文网首页
artifactory安装

artifactory安装

作者: 技术进阶在路上 | 来源:发表于2020-08-07 18:38 被阅读0次

在你开始之前,请确定你现在已经安装了Java 8,否则Artifactory将无法运行。你可以通过java -version这个命令获取Java的版本:

$ java -version

java version "1.8.0_101"

Java(TM) SE Runtime Environment (build 1.8.0_101-b13)

Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

下载artifactory将zip包解压后移动某个目录下, 例如:

/Users/shiqiao/jfrog/jfrog-artifactory-pro-6.18.1 (2).zip

/Users/shiqiao/jfrog/artifactory-injector-1.1.jar

解压zip压缩包:jfrog-artifactory-pro-6.18.1 (2).zip 为  artifactory-pro-6.18.1

绿化处理:

$ java -jar artifactory-injector-1.1.jar

What do you want to do?

1 - generate License String

2 - inject artifactory

exit - exit

2

where is artifactory home? ("back" for back)

D:\artifactory\artifactory-pro-6.6.0/

artifactory detected. continue? (yes/no)

yes

putting another WEB-INF/lib/artifactory-addons-manager-6.6.0.jar

META-INF/

org/

org/jfrog/

...

生成授权License,选择1,记录生成的license,然后exit退出

What do you want to do?

1 - generate License String

2 - inject artifactory

exit - exit

1

eyJhcnRpZmFjdG9yeSI6eyJpZ......llcyI6e319fQ==

配置JAVA_OPTIONS ,目录$ARTIFACTORY_HOME/bin/artifactory.default

#!/bin/sh

#Default values

#export ARTIFACTORY_HOME=/var/opt/jfrog/artifactory

#export ARTIFACTORY_USER=artifactory

#export JAVA_HOME=/opt/java/1.8.0

#export START_LOCAL_REPLICATOR=true

#export START_LOCAL_MDS=true

#export START_LOCAL_ROUTER=true

export TOMCAT_HOME=$ARTIFACTORY_HOME/tomcat

export ARTIFACTORY_PID=$ARTIFACTORY_HOME/run/artifactory.pid

export JAVA_OPTIONS="-server -Xms512m -Xmx4g -Xss256k -XX:+UseG1GC -XX:OnOutOfMemoryError=\"kill -9 %p\""

export JAVA_OPTIONS="$JAVA_OPTIONS -Djruby.compile.invokedynamic=false -Dfile.encoding=UTF8 -Dartdist=zip -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Djava.security.egd=file:/dev/./urandom"

# Timeout waiting for artifactory to start

# START_TMO=60

命令行到bin目录下

$ cd /Users/shiqiao/jfrog/artifactory-pro-6.18.1/bin


直接运行Artifactory process,但这种方式会阻塞console,不过你可以通过Ctrl+C命令退出

 $ sudo ./artifactory.sh


以后台服务的方式运行Artifactory

$ sudo ./artifactoryctl start

出现 Artifactory successfully started表示启动成功


显示当前服务的进程状态

$ sudo ./artifactoryctl check


停止Artifactory服务

sudo ./artifactoryctl  stop

浏览器打开 http://127.0.0.1:8081进行相应的配置,包含输入上面步骤生成的license

设置完之后,点击左边最下面的小人图标 Admin  , 弹出页面点击 General Configuration

Custom Base URL 输入:http://127.0.0.1:8081/artifactory或者公司服务器端配置:http://部署ip:8081/artifactory


验证配置有效性:

打开设置–》Remote 设置页面

点击Test按钮,页面等待并弹出Successfully connected to server 即成功

-----------------------------------------我是分割线-------------------------------------------------------------

记录遇到的问题,点击Test弹出报错:

实际情况是Remote索引成功瞬间建立,但pod install的时候,会提示404错误或者401权限错误,总之pod install不成功,JFrog Artifactory 的 remote 服务也没有新的库和索引信息变化。

提示是HTTP证书 的问题,实际是本地域名重复的问题,联系运维解决即可;

参考链接:

artifactory安装和使用:https://www.jianshu.com/p/ba57e23ddc1d

Mac下安装artifactory的正确姿势:https://blog.csdn.net/lyric_315/article/details/60583410

Jfrog官方文档:https://www.jfrog.com/confluence/display/JFROG/Installing+Artifactory#InstallingonLinuxSolarisorMacOS-SettingJavaMemoryParameters

相关文章

网友评论

      本文标题:artifactory安装

      本文链接:https://www.haomeiwen.com/subject/qokqdktx.html