wgethttp://mirror.bjtu.edu.cn/apache/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
vim /etc/profile
export M2_HOME=/opt/apache-maven-3.3.9
export M2=$M2_HOME/bin
export M2_OPTS="-Xms256m -Xmx512m"
export PATH=$M2:$PATH
source /etc/profile
mvn-version
lisa@ubuntu:~$ mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T08:41:47-08:00)
Maven home: /opt/apache-maven-3.3.9
Java version: 1.8.0_71, vendor: Oracle Corporation
Java home: /opt/jdk1.8.0_71/jre
Default locale: en_US, platform. encoding: UTF-8
OS name: "linux", version: "3.5.0-23-generic", arch: "i386", family: "unix"
三install nexus
wget http://download.sonatype.com/nexus/oss/nexus-nexus-2.5.1-01-bundle.tar.gz
tar -zxvf nexus-2.5.1-01-bundle.tar.gz
vim /etc/profile
export NEXUS_HOME=/opt/nexus-2.5.1-01
source /etc/profile
在有nexus.bat的目录下运行 ./nexus start
Starting Nexus OSS.
Started Nexus OSS.
Q1.start nexus 出错
Failed to start Nexus OSS.
A:cause previlege of nexus directory,you have to use command:
sudo chown -R lisa:lisa nexus-2.5.1-01
lisa is user
Q2.使用浏览器访问:http://ip:8081/nexus 出错
vi opt//opt/nexus-2.5.1-01/logs/wrapper.log
出现:
2014-10-24 12:06:50 ERROR [WrapperListener_start_runner] - org.sonatype.nexus.bootstrap.jsw.JswLauncher - Failed to start
jvm 1 | java.io.IOException: No such file or directory
jvm 1 | at java.io.UnixFileSystem.createFileExclusively(Native Method) ~[na:1.7.0_79]
jvm 1 | at java.io.File.createTempFile(File.java:2001) ~[na:1.7.0_79]
jvm 1 | at java.io.File.createTempFile(File.java:2047) ~[na:1.7.0_79]
jvm 1 | at org.sonatype.nexus.bootstrap.Launcher.ensureTmpDirSanity(Launcher.java:251) ~[nexus-bootstrap-2.5.1-01.jar:2.5.1-01]
jvm 1 | at org.sonatype.nexus.bootstrap.Launcher.start(Launcher.java:92) ~[nexus-bootstrap-2.5.1-01.jar:2.5.1-01]
jvm 1 | at org.sonatype.nexus.bootstrap.jsw.JswLauncher.doStart(JswLauncher.java:56) ~[nexus-bootstrap-2.5.1-01.jar:2.5.1-01]
jvm 1 | at org.sonatype.nexus.bootstrap.jsw.WrapperListenerSupport.start(WrapperListenerSupport.java:36) ~[nexus-bootstrap-2.5.1-01.jar:2.5.1-01]
jvm 1 | at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788) [wrapper-3.2.3.jar:3.2.3]
wrapper | <-- Wrapper Stopped
A2:use root user to run the nexus service ,the problem is solved.