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