UBUNTU下的apache的maven2私服搭建

UBUNTU下的apache的maven2私服搭建

1、下载解开压缩

首页     http://www.jfrog.org/sites/artifactory/latest/index.html

下载     http://sourceforge.net/project/showfiles.php?group_id=175347

文件     artifactory-1.3.0-beta-2.zip
unzip artifactory-1.3.0-beta-2.zip

2、放置到安装目录
mv artifactory-1.3.0-beta-2 /usr/local/artifactory

3、配置安装
bin/install.sh

After running the script successfully you can test the installation by running:
/etc/init.d/artifactory check

And if everything is OK, start artifactory with:
/etc/init.d/artifactory start

You can then check the Artifactory log with:
tail -f $ARTIFACTORY_HOME/logs/artifactory.log

Creates the file
/etc/artifactory/default
that contains the main environment variables needed for artifactory to run: JAVA_HOME,
JETTY_USER,
ARTIFACTORY_HOME,
JAVA_OPTIONS,...
The /etc/artifactory/default is included at the top of artifactoryctl and so can include whatever you wish.
NOTE: The default max memory is 1GB

修改这个文件为:
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
export JAVA_OPTIONS="-server -Xms300m -Xmx1g"
export ARTIFACTORY_HOME=/usr/local/artifactory
export ARTIFACTORY_CONSOLE=${ARTIFACTORY_HOME}/logs/consoleout.log
export JETTY_USER=jetty

启动JETTY服务
/etc/init.d/artifactory start

然后就按照WINDOWS下的操作就可以了

http://192.168.10.253:8081/artifactory/,用admin/password登录进管理界面看看。

修改项目POM.xml

<repositories>
   <repository>
    <id>central</id>
    <url>http://192.168.10.253:8081/artifactory/repo</url>
    <snapshots>
     <enabled>false</enabled>
    </snapshots>
   </repository>
   <repository>
    <id>snapshots</id>
    <url>http://192.168.10.253:8081/artifactory/repo</url>
    <releases>
     <enabled>false</enabled>
    </releases>
   </repository>
</repositories>
<pluginRepositories>
   <pluginRepository>
    <id>central</id>
    <url>
    http://192.168.10.253:8081/artifactory/plugins-releases
    </url>
    <snapshots>
     <enabled>false</enabled>
    </snapshots>
   </pluginRepository>
   <pluginRepository>
    <id>snapshots</id>
    <url>
    http://192.168.10.253:8081/artifactory/plugins-snapshots
    </url>
    <releases>
     <enabled>false</enabled>
    </releases>
   </pluginRepository>
</pluginRepositories>

mvn clean dependency:copy-dependencies

你可能感兴趣的:(java,apache,jvm,PHP,ubuntu)