# nexus搭建
# 1、 下载最新版的压缩包
# 官网下载要翻墙,这里直接拿我下好了的目录在repo服务器下的 /data0/nexus/nexus-3.60.0-02-unix.tar.gz
# 2、备份原有版本的blob文件
cd /opt/sonatype-work/nexus3/
tar -zcvf blobs.tar.gz blob
# 3、解压下载好的压缩包
cd /data0/nexus/
tar -zxvf nexus-3.60.0-02-unix.tar.gz
# 4、把备份好的Blob文件解压到目录 /data0/nexus/sonatype-work/nexus3/
下
cd /opt/sonatype-work/nexus3/
mv blobs.tar.gz /data0/nexus/sonatype-work/nexus3/
tar -zxvf blobs.tar.gz
# 5、修改配置文件
# 5.1、 修改默认端口 vi /data0/nexus/nexus-3.60.0-02/etc/nexus-default.properties
## DO NOT EDIT - CUSTOMIZATIONS BELONG IN $data-dir/etc/nexus.properties
##
# Jetty section
application-port=6091
application-host=0.0.0.0
nexus-args=${jetty.etc}/jetty.xml,${jetty.etc}/jetty-http.xml,${jetty.etc}/jetty-requestlog.xml
nexus-context-path=/
# Nexus section
nexus-edition=nexus-pro-edition
nexus-features=\
nexus-pro-feature
nexus.hazelcast.discovery.isEnabled=true
# 6、启动nexus
cd /data0/nexus/nexus-3.60.0-02/bin
#启动命令
./nexus run &
#停止命令
./nexus stop &
#重启命令
./nexus restart &