linux 下搭建私服 nexus QA

上一篇 / 下一篇  2016-01-19 13:53:06

linux kernel version :ubuntu 3.5.0-23-generic
一设置java envirenment variables

Download address:http://www.oracle.com/technetwork/java/javase/downloads/ 

  jdk-8u21-linux-i586.tar.gz

1.Use Winscp tool to upload  /opt/java
2.tar -zxvf  jdk-8u21-linux-i586.tar.gz 
3.Update  /etc/profile 

export JAVA_HOME=/opt/jdk1.8.0_71

export CLASSPATH=./JAVA_HOME/lib:$JAVA_HOME/jre/lib

export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH


4. 设置完路径后,使用命令 source /etc/profile  
5.#java -version 
lisa@ubuntu:~$ java -version
java version "1.8.0_71"
Java(TM) SE Runtime Environment (build 1.8.0_71-b15)
Java HotSpot(TM) Client VM (build 25.71-b15, mixed mode)

Q1、由于文件设置错误,linux重启后出现错误变成

-bash-4.2$

,如何恢复到root用户?
A:在终端输入
PS1="[root@localhost ~]"
但是输入ifconfig 发现 ip地址已经改变
Q2、进入centOS桌面后,利用Gnome terminal 使用ifconfig command失败?报

bash:ifconfig command not found?

A:在终端执行命令:exportPATH="$PATH:/sbin"

二install maven

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.
















TAG: Linux linux Nexus

 

评分:0

我来说两句

日历

« 2024-05-02  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 2362
  • 日志数: 2
  • 建立时间: 2016-01-19
  • 更新时间: 2016-03-10

RSS订阅

Open Toolbar