UbuntuServer22.04.4安装Nexus

文章目录


一、安装步骤

官网先下载https://help.sonatype.com/en/download.html

c 复制代码
1.更新包列表
sudo apt update    
2.安装Java,因为Nexus需要Java运行环境:
sudo apt install openjdk-11-jdk
sudo java -version 查看jdk是否安装成功
sudo apt remove openjdk* 卸载jdk
3.解压下载下来的nexus
tar -zxvf nexus-3.69.0-02-java11-unix.tar.gz   
4.移动文件夹到opt目录
mv nexus-3.69.0-02 /opt/nexus
mv sonatype-work /opt/
5.设置启动用户将run_as_user修改为系统用户名,保存并退出  
sudo vi /opt/nexus/nexus-3.69.0-02/bin/nexus.rc
6.修改配置文件,根据实际需要修改Nexus的堆内存空间建议512m
sudo vi /opt/nexus/nexus-3.69.0-02/bin/nexus.vmoptions
7.设置Nexus服务IP地址和端口
sudo vi /opt/nexus/nexus-3.69.0-02/etc/nexus-default.properties 
8.设置系统服务开机启动
sudo vi /etc/systemd/system/nexus.service
[Unit]
Description=nexus service
After=network.target

[Service]
Type=forking
LimitNOFILE=65536
ExecStart=/opt/nexus/bin/nexus start
ExecStop=/opt/nexus/bin/nexus stop
User=lk

[Install]
WantedBy=multi-user.target
9.重新加载系统服务管理器,应用新服务
sudo systemctl daemon-reload
10.通过nexus.service启动Nexus服务
sudo systemctl start nexus.service
sudo systemctl enable nexus.service:
11.查看服务状态
sudo systemctl status nexus.service 查看nexus是否启动
sudo top  查看后台运行程序使用系统资源情况
sudo free -h 查看后台运行程序使用内存资源情况

二、登录Nexus设置系统参数

1.登录Nexus

登录管理器,默认用户名为admin,密码存储在/opt/sonatype-work/nexus3/admin.properties。如何没有用admin123试下

2.先进入Nexus首页

3.nexus3中央仓库改为阿里云


相关推荐
sunshine22 girl9 小时前
Java学习一 环境配置2 Idea的入门使用和maven配置,项目启动脚本配置
java·maven
sunshine22 girl2 天前
Java学习一 环境配置3 Idea中的maven仓库,pom.xml文件配置
学习·maven·intellij-idea
钱栈up2 天前
mvn compile卡住半小时:定位并修复隐藏的类型不匹配编译错误
java·后端·maven
谢亮_vipxieliang2 天前
ValidX与Maven/Gradle集成配置指南
java·spring boot·spring·maven·hibernate
砚底藏山河3 天前
存储选型实战:CSV-SQLite-MySQL同机基准(魔码量化实战 #02)
java·数据库·python·金融·maven
蚂蚁雅嘿4 天前
maven标签日常总结
java·maven
菠萝加点糖4 天前
Maven 坐标系统说明
java·maven
砚底藏山河4 天前
拉数管道设计:从一次性脚本到可重启的数据流水线(魔码量化实战 #01)
java·数据库·python·金融·maven
卓怡学长5 天前
w157基于springboot北部湾地区助农平台
java·spring boot·spring·maven·intellij-idea
IT界的老黄牛5 天前
Jenkins 构建卡了 23 天,abort 按钮点了没用
jenkins·maven·prometheus·告警·排查·ci-cd