Nexus私服安装配置

2018-06-25  本文已影响0人  黑客不黑撒

1.下载nexus

wget http://219.238.7.66/files/5092000009344FE0/sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.12.0-01-bundle.tar.gz

2.打开8081端口号

vi /etc/sysconfig/iptables

-A INPUT -m state --state NEW -m udp -p udp --dport 8081 -j ACCEPT

service iptables restart

3.启动nexus

cd /home/Java/nexus-2.11.0-02/bin

./nexus start

如果出现下列问题

****************************************

WARNING - NOT RECOMMENDED TO RUN AS ROOT

****************************************

If you insist running as root, then set the environment variable RUN_AS_USER=root before running this script.

解决方法:

A.临时生效

export RUN_AS_USER=root

B.加入系统变量

vi /etc/profile加入export RUN_AS_USER=root

setting.xml

xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation=" http://maven.apache.org/SETTINGS/1.0.0  http://maven.apache.org/xsd/settings-1.0.0.xsd">

C:/Users/pzy/.m2/repository

releases

admin

admin123

snapshots

admin

admin123

public

*

nexus myself

http://124.192.148.3:8081/nexus/content/groups/public

releases

http://124.192.148.3:8081/nexus/content/repositories/releases/

true

true

snapshots

http://124.192.148.3:8081/nexus/content/repositories/snapshots/

true

true

downloadSources

true

true         

downloadSources  

Return code is: 401, ReasonPhrase: Unauthorized. -> [Help 1]

settings.xml需要配置用户名和密码

Return code is: 400, ReasonPhrase: Bad Request. -> [Help 1]

Views/Repositories--Repositories--Releases--Configuration--Deployment Policy--Allow Redeploy

参考:https://tianweili.github.io/2015/03/17/Linux%E4%B8%8B%E4%BD%BF%E7%94%A8nexus%E6%90%AD%E5%BB%BAmaven%E7%A7%81%E6%9C%8D/

上一篇 下一篇

猜你喜欢

热点阅读