下载安装
下载地址: (目前最新版本是2.12.0-01)
解压后会在同级目录中,出现两个文件夹: nexus-2.12.0-01
和sonatype-work
,前者包含了nexus的运行环境和应用程序,后者包含了你自己的配置和数据。
解压命令:
tar zxvf nexus-2.12.0-01-bundle.tar.gz
启动Nexus
cd /nexus-2.12.0-01/bin./nexusUsage: ./nexus { console | start | stop | restart | status | dump }# ./nexus start****************************************If you insist running as root, then set theenvironment variable RUN_AS_USER=root before running this script.****************************************Starting Nexus OSS...Started Nexus OSS.
如果出现 If you insist running as root, then set theenvironment variable RUN_AS_USER=root before running this script.
解决方法
关于这个问题共有两种解决方法,一种是临时解决,一种是永久的解决。
临时解决
export RUN_AS_USER=root ./nexus start
永久方法
vi /etc/profile添加到文件最后一行export RUN_AS_USER=root
修改保存即可!
启动nexus即可
cd /nexus-2.12.0-01/bin ./nexus start
Apache 域名代理配置
<VirtualHost *:80>
ServerAdmin 127.0.0.1DocumentRoot "/mnt/soft/nexus/nexus-2.12.0-01/nexus" ---nexus 安装目录ServerName 127.0.0.1ServerName 域名(例如: test.nexus.org)ProxyPass / 8998 为nexus配置端口号 ServerAlias 127.0.0.1</VirtualHost>