jgyhuzhou 发表于 2013-1-15 14:22:56

ubuntu server上安装maven repository manager nexus

nexus是sonatype公司开发的一个maven仓库管理器,sonatype就是maven背后的公司,专门做maven相关的咨询业务,同时也开发了一些非常好的工具,nexus和m2eclise都是。
    首先下载nexus webapp,可以使用wget来下载:
wget http://nexus.sonatype.org/downloads/nexus-webapp-1.2.1-bundle.tar.gz
    默认保存在用户的主目录下,然后解压缩:
sudo cp nexus-webapp-1.2.1-bundle.tar.gz /usr/localcd /usr/localtar xvzf nexus-webapp-1.2.1-bundle.tar.gzln -s nexus-webapp-1.2.1 nexus

    这时候就可以启动了,当然前提是你已经安装了java:
cd nexusls ./bin/jsw/./bin/jsw/linux-x86-32/nexus starttail -f logs/wrapper.log

   为了将nexus注册为linux service,随系统启动而启动:

cp ./bin/jsw/linux-x86-32/nexus /etc/init.d/nexuschmod 755 /etc/init.d/nexus
      编辑nexus文件,增加修改如下变量:
APP_NAME="nexus"APP_LONG_NAME="Sonatype Nexus"NEXUS_HOME=/usr/local/nexusPLATFORM=linux-x86-32WRAPPER_CMD="${NEXUS_HOME}/bin/jsw/${PLATFORM}/wrapper"WRAPPER_CONF="${NEXUS_HOME}/conf/wrapper.conf"PRIORITY=PIDDIR="/var/run"

      保存后:
cd /etc/init.dupdate-rc.d nexus defaultssudo service nexus starttail -f /usr/local/nexus/logs/wrapper.log

      可能需要安装:sudo apt-get install sysvconfig,这样nexus就可以正常使用了,默认地址为:http://localhost:8081/nexus/index.html,管理员用户名密码为:admin/admin123。
页: [1]
查看完整版本: ubuntu server上安装maven repository manager nexus