CentOS7 Nexus安装步骤详细介绍

(编辑:jimmy 日期: 2024/9/21 浏览:2)

CentOS7 Nexus安装

CentOS7

Download

Nexus安装下载nexus-2.11.2-03-bundle.tar.gz

Install

安装

上传RPM文件到/tmp目录下

mkdir /opt/nexus
cd /opt/nexus
tar -zxvf /tmp/nexus-2.11.2-03-bundle.tar.gz
ln -sf /opt/nexus/nexus-2.11.2-03/opt/nexus/latest
ln -sf /opt/nexus/latest /opt/nexus/default

新建用户

useradd -r nexus --shell /bin/false
chown -hR nexus:/opt/nexus

开机启动

新建/etc/init.d/nexus

#!/bin/sh

# chkconfig: - 80 20
# Description: Nexus OSS

NEXUS_HOME=/opt/nexus/default
RUN_AS_USER=nexus
JAVA_HOME=/usr/java/default

export NEXUS_HOME RUN_AS_USER JAVA_HOME

"$NEXUS_HOME/bin/nexus"$1
exit $"color: #0000ff">chmod +x /etc/init.d/nexus

设定

/opt/nexus/default/conf/nexus.properties

application-port=9083
nexus-webapp-context-path=/

设置开机启动

chkconfig nexus on

防火墙

新建文件/usr/lib/firewalld/services/jenkins.xml

<"1.0" encoding="utf-8"?>
<service>
    <short>Nexus</short>
    <description>Nexus OSS</description>
    <portprotocol="tcp"port="9083"/>
</service>

修改防火墙设定

firewall-cmd --permanent --add-service=nexus
firewall-cmd --reload

感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!

一句话新闻

微软与英特尔等合作伙伴联合定义“AI PC”:键盘需配有Copilot物理按键
几个月来,英特尔、微软、AMD和其它厂商都在共同推动“AI PC”的想法,朝着更多的AI功能迈进。在近日,英特尔在台北举行的开发者活动中,也宣布了关于AI PC加速计划、新的PC开发者计划和独立硬件供应商计划。
在此次发布会上,英特尔还发布了全新的全新的酷睿Ultra Meteor Lake NUC开发套件,以及联合微软等合作伙伴联合定义“AI PC”的定义标准。