1. 安装JDK 8,并配置环境变量
//配置 JAVA_HOME
//打开~/base_profile添加
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/
CLASSPAHT=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
PATH=$JAVA_HOME/bin:$PATH:
export JAVA_HOME
export CLASSPATH
export PATH
2. 下载artifactory,并解压到自己想要安装的位置
- 下载地址
- 找到解压的位置进入到bin目录,配置Artifactory启动文件,artifactory.default
#Default values
export ARTIFACTORY_HOME=/Users/zhengxs/software/artifactory-oss-7.17.5
export ARTIFACTORY_USER=artifactory
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home
export START_LOCAL_REPLICATOR=true
#export START_LOCAL_MDS=true
#export START_LOCAL_ROUTER=true
export TOMCAT_HOME=$ARTIFACTORY_HOME/app/artifactory/tomcat
export ARTIFACTORY_PID=$ARTIFACTORY_HOME/app/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
- 执行 ./installService.sh
- 接下来直接运行可以访问使用
# 直接运行(命令行会block)
sudo ./artifactory.sh
# 以服务的方式运行(命令行不会block)
sudo ./artifactoryctl start
# 显示当前服务状态
sudo ./artifactoryctl check
# 停止服务
sudo ./artifactoryctl stop
网友评论