Ubuntu下面的操作如下:
$cd ~
$wget https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.12.0-01-bundle.tar.gz
$sudo mkdir /var/opt/nexus-2.12.0-01
$sudo tar -zxvf nexus-latest-bundle.tar.gz -C /var/opt/nexus-2.12.0-01
$sudo ln -s /var/opt/nexus-2.12.0-01/nexus-2.12.0-01/ /var/opt/nexus
$whereis java
java: /usr/bin/java /usr/share/java /usr/share/man/man1/java.1.gz
$sudo vim /var/opt/nexus/bin/jsw/conf/wrapper.conf
修改后的内容如下:
..........
wrapper.java.command=/root/software/jdk1.8.0_60/bin/java
..........
设置目录的权限
$chmod -R 777 /var/opt/nexus-2.12.0-01/sonatype-work
$chmod -R 777 /var/opt/nexus/logs
$chmod -R 777 /var/opt/nexus/tmp
$chmod -R 777 /var/opt/nexus/bin/jsw/linux-x86-64
$chmod -R 777 /var/opt/nexus/bin/jsw/linux-x86-32
启动服务
$/var/opt/nexus/bin/nexus start
Starting Nexus OSS...
Started Nexus OSS.