centos下安装nexus

1、创建文件夹:mkdir /usr/local/nexus
2、切换目录:cd /usr/local/nexus
3、下载nexus:wget "https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.14.3-02-bundle.tar.gz"
4、解压:tar xfvz nexus-2.14.3-02-bundle.tar.gz
这里写图片描述
解压之后就会看到两个目录:
 nexus-2.14.3-02:里面是nexus的运行环境和应用程序。
 sonatype-work:里面是我们后面要对nexus进行一些配置的地方,像索引和起始的仓库和端口等都可以在这里面配置。
5、添加环境变量
 在export处添加:export RUN_AS_USER=root
 修改export PATH处为:export PATH=.:$JAVA_HOME/bin:$RUN_AS_USER:$PATH
centos下安装nexus_第1张图片
6、刷新环境变量,使其立即生效:source /etc/profile
7、修改nexus.properties:vim /usr/local/nexus/nexus-2.14.3-02/conf/nexus.properties
 配置如下(无需修改): 可以修改 端口号 host地址等
centos下安装nexus_第2张图片
8、编辑:vim /usr/local/nexus/nexus-2.14.3-02/bin/nexus
 修改内容:RUN_AS_USER=root
centos下安装nexus_第3张图片
9、启动nexus:nexus-2.14.3-02/bin/nexus start
centos下安装nexus_第4张图片
10、安装成功后,在浏览器访问:http://192.168.106.130:8085/nexus
centos下安装nexus_第5张图片
11、用默认账户和密码登录
 账户:admin
 密码:admin123

基本命令:
nexus-2.14.3-02/bin/nexus start启动
nexus-2.14.3-02/bin/nexus stop停止
nexus-2.14.3-02/bin/nexus restart重启
nexus-2.14.3-02/bin/nexus status状态

你可能感兴趣的:(Nexus)