artifactory maven仓库安装
相关站点
- artifactory
- 说明文档:http://wiki.jfrog.org/confluence/display/RTF/Artifactory+User+Guide
-
JDK 7:下载 jdk-7u65-linux-x64.tar.gz
- http://www.oracle.com/technetwork/java/javase/downloads/index.html
- http://ghaffarian.net/downloads/Java/JDK/
-
You must run Artifactory with JDK 7 and above, preferably JDK 7 update 21 and above.
[root@FTP-Maven bin]# /maven/jdk/jre/bin/java -version java version "1.7.0_65" Java(TM) SE Runtime Environment (build 1.7.0_65-b17) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
安装
将下载的artifactory-3.3.0.zip解包放至规划的工作目录中,然后进入artifactory/bin目录,执行installService.sh脚本来安装成一个系统服务,包括设置conf目录、基本配置文件、启动脚本等。
cd /maven/artifactory/bin ./installService.sh
Installing artifactory as a Unix service that will run as user artifactory Installing artifactory with home /maven/artifactory Creating user artifactory...creating... DONE Checking configuration link and files in /etc/opt/jfrog/artifactory... Moving configuration dir /maven/artifactory/etc /maven/artifactory/etc.original...creating the link and updating dir... DONE Creating environment file /etc/opt/jfrog/artifactory/default...creating... DONE ** INFO: Please edit the files in /etc/opt/jfrog/artifactory to set the correct environment Especially /etc/opt/jfrog/artifactory/default that defines ARTIFACTORY_HOME, JAVA_HOME and JAVA_OPTIONS Initializing artifactory service with chkconfig...artifactory 0:off 1:off 2:on 3:on 4:on 5:on 6:off DONE Setting file permissions... DONE ************ SUCCESS **************** Installation of Artifactory completed Please check /etc/opt/jfrog/artifactory, /maven/artifactory/tomcat and /maven/artifactory folders Please check /etc/init.d/artifactory startup script you can now check installation by running: > service artifactory check (or /etc/init.d/artifactory check) Then activate artifactory with: > service artifactory start (or /etc/init.d/artifactory start)
配置修改
-
设置JAVA_HOME
#/etc/opt/jfrog/artifactory/default #!/bin/sh #Default values export ARTIFACTORY_HOME=/maven/artifactory export ARTIFACTORY_USER=artifactory #export JAVA_HOME=/opt/java/1.7.0 #添加下面这三行指定版本正确的JDK目录 export JAVA_HOME=/maven/jdk echo "$PATH"|grep "${JAVA_HOME}/bin" > /dev/null || export PATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin:$PATH" export CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar export TOMCAT_HOME=/maven/artifactory/tomcat export ARTIFACTORY_PID=$ARTIFACTORY_HOME/run/artifactory.pid export JAVA_OPTIONS="-server -Xms512m -Xmx2g -Xss256k -XX:PermSize=128m -XX:MaxPermSize=256m -XX:+UseG1GC"
-
数据存储方式设置
# /maven/artifactory/misc/db/mysql.properties # 我注释了MySQL的参数设置,因为选择用filesystem方式,应该用不到mysql #type=mysql #driver=com.mysql.jdbc.Driver #url=jdbc:mysql://localhost:3306/artdb?characterEncoding=UTF-8&elideSetAutoCommits=true #username=artifactory #password=password ## Determines where the actual artifacts binaries are stored. Available options: ## filesystem - binaries are stored in the filesystem (recommended, default) ## fullDb - binaries are stored as blobs in the db, filesystem is used for caching ## cachedFS - binaries are stored in the filesystem, but a front cache (with faster access) is added ## IMPORTANT NOTE: This property should not be change after the initial setup. To change binaries storage you have to export and import #binary.provider.type=filesystem binary.provider.type=filesystem #启用了这一行采集文件系统来存储,这是缺省的 ## Determines the maximum filesystem cache size in bytes when using binary provider type fullDb or cachedFS. Default is 5GB ## Supported units are GB (gigabytes), MB (megabytes) and KB (kilobytes) #binary.provider.cache.maxSize=5GB