cd /home/software
wget http://www.sonatype.org/downloads/nexus-2.1.2-bundle.tar.gz
tar zxvf nexus-2.1.2-bundle.tar.gz
cp /home/software/nexus-2.1.2/bin/jsw/linux-x86-64/nexus /etc/init.d/nexus
编辑/etc/init.d/nexus文件,添加以下变量定义:
修改以下变量:
1 WRAPPER_CMD="${PLATFORM_DIR}/wrapper"
2 WRAPPER_CONF="${PLATFORM_DIR}/../conf/wrapper.conf"
3 PIDDIR="${NEXUS_HOME}"
修改如下变量,设置启动用户为root:
1 RUN_AS_USER=root
执行命令添加nexus自启动服务
1 # chkconfig –add nexus
2 # chkconfig –levels 345 nexus on
执行如下命令启动、停止nexus服务
1 # service nexus start
2 # service nexus stop
测试:http:localhost:8081:nexus