安装Nexus服务的文档可以参考官方站点:http://www.sonatype.com/books/nexus-book/reference/install-sect-install.html
1.下载并安装Nexus在Ubuntu 11.10 server上,下载Nexus最新版本。和官方文档不一样的地方是,我将nexus放在了/usr而不是/usr/local目录下。
wget http://nexus.sonatype.org/downloads/nexus-oss-webapp-1.9.2.4-bundle.tar.gz
mv nexus-oss-webapp-1.9.2.4-bundle.tar.gz /usr/
cd /usr
tar zxvf nexus-oss-webapp-1.9.2.4-bundle.tar.gz
ln -s nexus-oss-webapp-1.9.2.4 nexus
为了日后方便,按照官方文档的方式设置一个环境变量,将下面的脚本添加到~/.bashrc文件最后
export NEXUS_HOME=/usr/nexus
2.运行
进入/usr/nexus-oss-webapp-1.9.2.4/bin/jsw/linux-x86-64目录,运行下面的命令:
./nexus start
Starting Nexus OSS...
Started Nexus OSS.
默认nexus采用内置jetty作为web服务器,监听本地端口8081.通过打开网页
http://yourserver:8081/nexus进行测试,用户名和密码默认是:admin/admin123
3.创建系统服务
复制Nexus自带的脚本到/etc/init.d目录
root@ubuntu1110:/etc/init.d# cp $NEXUS_HOME/bin/jsw/linux-x86-64/nexus ./
添加几个变量到nexus脚本中NEXUS_HOME=/usr/nexusPLATFORM=linux-x86-64JAVA_HOME=/usr/jdk1.6.0_30PATH="$JAVA_HOME/bin:$PATH修改几个变量的值:APP_NAME=nexusAPP_LONG_NAME=Sonatype Nexus# WrapperWRAPPER_CMD=$NEXUS_HOME/bin/jsw/$PLATFORM/wrapperWRAPPER_CONF=$NEXUS_HOME/bin/jsw/conf/wrapper.conf
# Location of the pid file.
PIDDIR=/var/run
这个修改后的脚本要好好保存,这种事情再干一次很无聊。
之后,运行命令:
root@ubuntu1110:/etc/init.d# update-rc.d nexus defaults
update-rc.d: warning: /etc/init.d/nexus missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
Adding system startup for /etc/init.d/nexus ...
/etc/rc0.d/K20nexus -> ../init.d/nexus
/etc/rc1.d/K20nexus -> ../init.d/nexus
/etc/rc6.d/K20nexus -> ../init.d/nexus
/etc/rc2.d/S20nexus -> ../init.d/nexus
/etc/rc3.d/S20nexus -> ../init.d/nexus
/etc/rc4.d/S20nexus -> ../init.d/nexus
/etc/rc5.d/S20nexus -> ../init.d/nexus
Ok.现在可以通过service nexus start启动,
然后通过tail -f /usr/nexus/logs/wrapper.log 来检查启动状态。
分享到:
相关推荐
Windows 下Nexus搭建Maven私服 Windows 下Nexus搭建Maven私服
Nexus搭建Maven私服 +maven安装步骤
关于使用Nexus搭建Maven私服的开发文档。新手了解一下。
使用Nexus1.8搭建MAVEN私服详细步骤,以及在网页上上传JAR包
在CentOS7上用Nexus3搭建Maven私服。 一、需要的环境 CentOS 7里需要安装jdk8和Maven3,具体的安装步骤可以百度一下。 二、需要的包 需要nexus3的安装包,官网上https://www.sonatype.com/download-oss-sonatype...
提供了基于Nexus搭建Maven私服所需要的一切资源和个人经验,搭建后可maven deploy 上传自己的jar包。别人如何在自己的maven项目中引用我将单独再上传一份。
搭建maven私服的软件,包括maven版本3.5.3,nexus版本3.12.1
maven使用及Nexus搭建Maven私服
详细的使用Nexus搭建Maven私服的步骤指导
搭建Maven私服,并配置Nexus环境.rar
linux下搭建内网maven私服
操作步骤清晰 简单易懂,分分钟就完成搭建
使用nexus 可以搭建maven私服,如何使用nexus搭建maven 本地服务器呢?
nexus搭建maven私服1
nexus3搭建maven 私服资源
Maven Nexus 私服搭建 从零开始,资源下载、安装指导、开发配置说明
linux,搭建maven私服,nexus3.14+maven3.6.3.zip,apache-maven-3.6.3-bin.tar.gz,nexus-3.14.0-04-unix.tar.gz
nexus1.9_搭建maven私服,搭建项目管理方便开发