Centos基礎開発環境構築のMaven私服nexus
8681 ワード
1、
a) Nexus :http://www.sonatype.org/downloads/nexus-2.1.2-bundle.tar.gz
b) , nexus
c) nexus :admin/admin123
2、
a)
1 $ tar zxvf nexus-2.1.2-bundle.tar.gz
b)
1 $ mv nexus-2.1.2 /home/nexus/nexus
c) ( root )
1 # cd /etc/init.d/
2 # cp /home/nexus/nexus/bin/jsw/linux-x86-64/nexus nexus
/etc/init.d/nexus , :
1 NEXUS_HOME=/home/nexus/nexus
2 PLATFORM=linux-x86-64
3 PLATFORM_DIR="${NEXUS_HOME}/bin/jsw/${PLATFORM}"
:
1 WRAPPER_CMD="${PLATFORM_DIR}/wrapper"
2 WRAPPER_CONF="${PLATFORM_DIR}/../conf/wrapper.conf"
3 PIDDIR="${NEXUS_HOME}"
, nexus:
1 RUN_AS_USER=nexus
nexus
1 # chkconfig –add nexus
2 # chkconfig –levels 345 nexus on
、 nexus
1 # service nexus start
2 # service nexus stop
nexus-maven :
http://www.sonatype.org/downloads/nexus-latest-bundle.tar.gz
2 Maven
2.1 Maven nexus
centos6.3 ip:192.168.0.249
Jdk1.6
apache-maven-3.1.0-bin.tar.gz
nexus-2.6.0-05-bundle.tar.gz
2.2 jdk1.6
2.2.1 jdk1.6
Maven , jdk jre; jdk :
1) jdk1.6 gz
2)
2.2.2 jdk1.6
1)vi /etc/profile
2)
source
3) java javac , :
2.3 Maven
2.3.1 nexus-maven
http://www.sonatype.org/downloads/nexus-latest-bundle.tar.gz
:nexus-2.6.0-05-bundle.tar.gz
2.3.2 maven
1) ,
2)
mv –r nexus-2.5.1-01 /usr/maven
2.3.3
1) nexus
2) nexus
3) Nexus
./nexus stat nexus
2.3.4 nexus
nexus
vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8081 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 18080 -j ACCEPT
,Nexus-Maven , web
2.4 nexus-maven
1) URL:
http://192.168.0.249:8081/nexus ,
2) Log In
admin/admin123, :
3) Repositories
Repositories , nexus
web , , central
, , :
, ,
“Download Remote Indexes” True, update, , jar ; ;