第一步 确认自己的JDK版本(7以上),然后去 http://nexus.sonatype.org/downloads/ 下载 nexus-2.14.3-02-bundle.tar.gz 或者 nexus-2.14.3-02-bundle.zip
第二步 解压安装包 tar xvzf nexus-2.14.3-02-bundle.tar.gz 或者 unzip nexus-2.14.3-02-bundle.zip
具体终端命令如下:
sudo cp nexus-2.14.3-02-bundle.tar.gz /usr/local
cd /usr/local
sudo tar xvzf nexus-2.14.3-02-bundle.tar.gz
sudo ln -s nexus-2.14.3-02 nexus
第三步 启动nexus
命令如下:
cd /usr/local/nexus
./bin/nexus start 或者 ./bin/nexus console #启动nexus
tail -f logs/wrapper.log #查看日志信息
---------------------------------------------------------------------
访问浏览器 http://localhost:8081/nexus
该页面默认的登入时 默认的用户名是admin,密码是admin123
The default administrator username and password combination is admin and admin123
也可以自己更改
先用默认用户名和密码登入,然后在网页的右上角的用户名下菜单栏点击profile,然后就可以修改个人信息了。
---------------------------------------------------------------------
高级应用
---------------------------------------------------------------------
---------------------------------------------------------------------
更改配置文件wrapper.conf ,该文件位于nexus/bin/jsw/conf 目录下
----jvm设置-------------------
wrapper.java.maxmemory=2000 #jvm的大小设置MB
wrapper.java.initmemory=256
---日志配置-------
wrapper.logfile=logs/wrapper.log
wrapper.logfile.format=PM
wrapper.logfile.loglevel=INFO
wrapper.logfile.maxsize=10m
wrapper.logfile.maxfiles=10
等等参数配置
------------------------------
------------------------------
更新配置文件nexus.properties,该文件位于 nexus/conf 目录下
application-port=8081 #设置项目端口
application-host=0.0.0.0
nexus-webapp=${bundleBasedir}/nexus #nexus的webapp目录设置
nexus-webapp-context-path=/nexus #项目上下文路径
# Nexus section
nexus-work=${bundleBasedir}/../sonatype-work/nexus
runtime=${bundleBasedir}/nexus/WEB-INF
# orientdb buffer size in megabytes
storage.diskCache.bufferSize=4096
一般运行就可以了,想要了解更深。
http://books.sonatype.com/nexus-book/2.14/pdf/nxbook-pdf.pdf。