Nexus 私服安装配置(一) - 浮塵的博客

mavenCentral 是最早的 maven 中央仓库,Nexus 是常用的私用 Maven 服务器, Nexus 被超过10万个开发团队所使用。
下载Nexus-3.16.1 unix

准备工作

  • java 环境(最好yum,不用自己配置java HOME),不详细说google
  • Nexus 安装目录及用户
  • Nexus tar [curl or wget]

Nexus 目录及用户

  • Folder
	cd /opt
	wget https://*/**/nexus-3.16-*.tar.gz
	mkdir nexus
	tar -zxvf nexus-3.16-*.tar.gz
	mv nexus-3.16-* nexus/nexus-3.16
	cd nexus
	ln -s nexus-3.16 nexus3 //最好建软链接,方便管理
	mv sonatype-work /work/nexus/sonatype-work //移到较大的挂载盘上
  • user
sudo useradd nexus
sudo chown -R /opt/nexus
sudo chown -R /work/nexus

修改配置

  • nexus.rc

run_as_user="nexus"

  • nexus.vmoptions


-Xms1200M
-Xmx1200M
-XX:MaxDirectMemorySize=2G
-XX:+UnlockDiagnosticVMOptions
-XX:+UnsyncloadClass
-XX:+LogVMOutput
-XX:LogFile=/work/nexus-data/sonatype-work/nexus3/log/jvm.log
-XX:-OmitStackTraceInFastThrow
-Djava.net.preferIPv4Stack=true
-Dkaraf.home=.
-Dkaraf.base=.
-Dkaraf.etc=etc/karaf
-Djava.util.logging.config.file=etc/karaf/java.util.logging.properties
-Dkaraf.data=/work/nexus-data/sonatype-work/nexus3
-Djava.io.tmpdir=/work/nexus-data/sonatype-work/nexus3/tmp
-Dkaraf.startLocalConsole=false

  • 修改端口 etc/nexus.properties


application-port=8964
application-host=0.0.0.0

编写Nexus 服务

nexus.service

[Unit]
Description=Nexus3
After=network.target

[Service]
Type=forking
User=nexus
ExecStart=/opt/nexus/nexus3/bin/nexus start
ExecReload=/opt/nexus/nexus3/bin/nexus force-reload
ExecStop=/opt/nexus/nexus3/bin/nexus stop
ExecRestart=/opt/nexus/nexus3/bin/nexus restart

[Install]
WantedBy=multi-user.target

</code>

  • 建立软链接
    ln -s /opt/nexus/nexus.service /usr/lib/systemd/system/nexus.service

安装启动

sudo systemctl enable nexus.service

关于配置过程中的问题

  • File Descriptiors

在 /etc/security/lim its.conf 中增加
nexus hard nofile 65536

nexus soft nofile 65536
nexus 为用户name,可以用 * 代表所有人

检测设置多大合适的命令:
grep -r MemTotal /proc/meminfo | awk '{printf("%d",$2/10)}'
然后,编辑 nexus-sysctl.conf,内容为: vm.max_map_count=65536
在 /etc/sysctl.d 建立软链接

重启 reboot 或 sysctl -p

查看验证:

su - httpd
sysctl fs.file-max
  • database frozen 问题解决

删除工作目录(sonatype-work/nexus3/)中生成文件【原始文件:log,orient,tmp,clean_cache】之外其他文件和目录,重启解决。



sublime 小福利


原文:大专栏  Nexus 私服安装配置(一) - 浮塵的博客

原文地址:https://www.cnblogs.com/wangziqiang123/p/11618192.html

时间: 2024-08-29 02:02:18

Nexus 私服安装配置(一) - 浮塵的博客的相关文章

Nexus私服安装配置常用问题

maven私服安装配置 软件安装及基本配置 安装配置 # 安装jdk,参考其他教程 mkdir -p /app/nexus2 # 创建目录 wget https://download.sonatype.com/nexus/oss/nexus-2.14.8-01-bundle.tar.gz # 解压 tar -zxvf nexus-2.14.8-01-bundle.tar.gz # 修改配置, 在头部添加配置"export RUN_AS_USER=root" vim /etc/profi

9.Nexus私服安装配置

第一步:下载nexus-webapp-1.9.2.4.war包,然后拷贝到tomcat下的webapps目录中 第二步:启动tomcat 第三步:访问http://localhost:8080/nexus/显示如下: 第四步:点击右上角"log in"  ,输入username:admin和Password:admin123登录 第五步:登录成功 第六步:点击Views/Repositories中Repositories Nexus内置仓库说明: (1)Maven Central:该仓

centos7.3编译安装LAMP环境并搭建WordPress博客

centos7.3编译安装LAMP环境并搭建WordPress博客 日期:2017年8月6日 软件版本: apr-1.5.2.tar.bz2 apr-util-1.5.4.tar.bz2 httpd-2.4.27.tar.bz2 mariadb-10.2.7-linux-x86_64.tar.gz php-7.1.7.tar.bz2 wordpress-4.8-zh_CN.tar.gz xcache-3.2.0.tar.gz 1.编译安装apache2.4 yum groupinstall de

Maven使用Nexus私服的配置

工作记录 —————————————————————————————— 配置文件 apache-maven-3.3.3\conf\settings.xml 在mirrors(镜像)之间配置. url为私服地址 <!-- 配置maven只使用私服时,第一个mirrorOf之间写*就行.osgeo和geosolutions不能使用nexus,必须绕过--> <mirror> <id>nexus</id> <mirrorOf>external:*,!o

nexus私服安装

一.搭建nexus私服.当前服务器版本是jdk1.8    . nexus安装包下载:http://www.sonatype.org/nexus/archived 先是下载目前最新的版本 Nexus 2.11.1-01 2014-12-22 有提供zip和tar.gz格式,随便下哪种都可以. 二.解压之后会有两个文件夹,nexus-2.11.1-01和sonatype-work,我们进入第一个文件夹的bin目录来启动nexus . 1.进入启动目录,启动 cd /home/nexus/nexus

Ubuntu14.04LTS下安装Node.js&amp;NPM以及个人博客hexo的初始化配置

什么是hexo Hexo 是一款基于node 的静态博客网站生成器作者 :tommy351是一个台湾的在校大学生...相比其他的静态网页生成器而言有着,生成静态网页最快,插件丰富(已经移植了大量Octopress插件).同其他很多轻量级博客如jekyll.octopress.jekyllbootstrap等一样,也是 使用Markdown语法进行编辑博文,关于Markdown不用怕,推荐搜索维基上面的语法示例,有中文版本http://zh.wikipedia.org/wiki/Markdown,

centos7.3 编译安装lamp,利用wordpress实现个人博客搭建

软件环境:centos7.3 软件包: apr-1.5.2.tar.bz2 apr-util-1.5.4.tar.bz2 httpd-2.4.27.tar.bz2 mariadb-10.2.7-linux-x86_64.tar.gz php-7.1.7.tar.bz2 wordpress-4.8-zh_CN.tar.gz xcache-3.2.0.tar.gz 准备工作: [[email protected] ~]# mkdir /app                      #创建/app

linux 搭建 nexus 私服及配置

安装篇 1.tar -zxvf nexus-latest-bundle.tar.gz 2.cd nexus-2.13.0-01/bin 3../nexus start 这时可能提示 ****************************************WARNING – NOT RECOMMENDED TO RUN AS ROOT****************************************If you insist running as root, then set

HtmlCleaner CleanerProperties 参数配置(转自macken博客,链接:http://macken.iteye.com/blog/1579809)

HtmlCleaner CleanerProperties 参数配置 Parameter Default Explanation advancedXmlEscape true If this parameter is set to true, ampersand sign (&) that proceeds valid XML character sequences (&XXX;) will not be escaped with &XXX; transResCharsToNCR