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
网友评论