首页 > 代码库 > centos7 nexus maven私服搭建

centos7 nexus maven私服搭建

[root@i-pua208dt vhost]# uname -r
3.10.0-229.4.2.el7.x86_64

1 安装maven
# yum install maven
2 下载nexus
Nexus下载地址:http://www.sonatype.org/nexus/archived/#step2top

# wget http://download.sonatype.com/nexus/oss/nexus-2.11.3-01-bundle.tar.gz
# tar -zxvf nexus-2.11.3-01-bundle.tar.gz
# cd nexus-2.11.3-01
# vim conf/nexus.properties(修改以下俩项配置)
    application-port=8081
    application-host=192.168.100.7

# cd bin/
# vim nexus(修改启动脚本里的服务运行目录以及服务运行的用户)
    NEXUS_HOME="/usr/local/nexus"
    RUN_AS_USER=root

# mv nexus-2.11.3-01/ /usr/local/nexus
# echo "export PATH=/usr/local/nexus/bin:$PATH" >> /etc/profile
# source /etc/profile  
# nexus start
# tailf /usr/local/nexus/logs/wrapper.log


nginx反向代理配置

 #maven
 location  ^~ /nexus {
    proxy_pass http://192.168.100.7:8081/nexus;
    proxy_set_header Host $http_host;
 }

centos7 nexus maven私服搭建