下载nexus oss免费版本基于jetty的压缩包并解压
tar -zxvf nexus-3.0.1-01-unix.tar.gz
进入nexus目录,更改端口号
cd nexus-3.0.1-01 vim /etc/org.sonatype.nexus.cfg # Jetty section application-port=8081 application-host=0.0.0.0 nexus-args=${karaf.etc}/jetty.xml,${karaf.etc}/jetty-http.xml,${karaf.etc}/jetty-requestlog.xml nexus-context-path=/ # Nexus section nexus-edition=nexus-oss-edition nexus-features=\ nexus-oss-feature
更改端口后,修改Centos防火墙配置,开通对应端口
vim /etc/sysconfig/iptables # Generated by iptables-save v1.4.7 on Sun Feb 19 16:43:59 2017 *filter :INPUT DROP [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] :syn-flood - [0:0] -A INPUT -i lo -j ACCEPT -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 2000:3000 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 8081 -j ACCEPT -A INPUT -f icmp -m limit --limit 1/sec --limit-burst 10 -j ACCEPT -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j syn-flood -A INPUT -j REJECT --reject-with icmp-host-prohibited -A syn-flood -p tcp -m limit --limit 3/sec --limit-burst 6 -j RETURN -A syn-flood -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Sun Feb 19 16:43:59 2017
重启iptables服务
service iptables restart
启动nexus服务
nexus start
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。