Centos+Sonatype Nexus 搭建Maven私有库
2017-07-27 10:08
453 查看
必要环境:Centos,JDK7,Maven,Sonatype Nexus
IP:192.168.25.135 /root 确保JDK已经成功安装并且配置好环境变量
1.下载Sonatype Nexus:
https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.11.2-03-bundle.tar.gz
2.解压:
- 创建解压文件所需要的目录并解压文件到该目录
# mkdir nexus
# tar -zxvf nexus-2.11.2-03-bundle.tar.gz -C nexus
# cd nexus
# ls (可以看到有两个目录)
nexus-2.11.2-03(存放nexus服务目录) sonatype-work(存放私有库目录)
- 编辑nexus-2.11.2-03的nexus.properties文件
# cd nexus-2.11.2-03/conf
# vi nexus.properties
编辑 nexus 脚本, 配置 RUN_AS_USER 参数
#RUN_AS_USER=
改为:
RUN_AS_USER=root
打开防火墙的8081端口,与上面所修改的一致
# vi /etc/sysconfig/iptables
启动nexus:
进入到nexus的bin目录:cd /root/nexus/nexus-2.11.2-03/bin
启动: ./nexus start
[b]******************************[/b]
WARNING - NOT RECOMMENDED TO RUN AS ROOT
[b]******************************[/b]
Starting Nexus OSS…
Started Nexus OSS.
访问nexus http://192.168.25.135:8081/nexus
此时,一个Maven的私有库就搭建完成了。下一篇将说一下如何通过在IDE中配置和访问私有库
IP:192.168.25.135 /root 确保JDK已经成功安装并且配置好环境变量
1.下载Sonatype Nexus:
https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.11.2-03-bundle.tar.gz
2.解压:
- 创建解压文件所需要的目录并解压文件到该目录
# mkdir nexus
# tar -zxvf nexus-2.11.2-03-bundle.tar.gz -C nexus
# cd nexus
# ls (可以看到有两个目录)
nexus-2.11.2-03(存放nexus服务目录) sonatype-work(存放私有库目录)
- 编辑nexus-2.11.2-03的nexus.properties文件
# cd nexus-2.11.2-03/conf
# vi nexus.properties
# Sonatype Nexus # ============== # This is the most basic configuration of Nexus. # Jetty section # 在这里修改端口,一般不做修改 application-port=**8081** application-host=0.0.0.0 nexus-webapp=${bundleBasedir}/nexus nexus-webapp-context-path=/nexus # Nexus section nexus-work=${bundleBasedir}/../sonatype-work/nexus runtime=${bundleBasedir}/nexus/WEB-INF
编辑 nexus 脚本, 配置 RUN_AS_USER 参数
#RUN_AS_USER=
改为:
RUN_AS_USER=root
打开防火墙的8081端口,与上面所修改的一致
# vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT # 打开8081端口 -A INPUT -m state --state NEW -m tcp -p tcp --dport 8081 -j ACCEPT
启动nexus:
进入到nexus的bin目录:cd /root/nexus/nexus-2.11.2-03/bin
启动: ./nexus start
[b]******************************[/b]
WARNING - NOT RECOMMENDED TO RUN AS ROOT
[b]******************************[/b]
Starting Nexus OSS…
Started Nexus OSS.
访问nexus http://192.168.25.135:8081/nexus
此时,一个Maven的私有库就搭建完成了。下一篇将说一下如何通过在IDE中配置和访问私有库
相关文章推荐
- 使用Gradle和Sonatype Nexus 搭建私有maven仓库
- 使用Gradle和Sonatype Nexus 搭建私有maven仓库
- [Sonatype Nexus]Ubuntu、Nexus搭建Maven私有仓库
- CentOS 初体验十六:阿里云安装Nexus搭建Maven私有仓库
- Sonatype Nexus 搭建Maven 私服
- Sonatype Nexus 搭建Maven 私服
- Sonatype Nexus 搭建Maven 私服
- [Sonatype Nexus]Nexus配置私有Maven库引入自定义jar包
- Android业务组件化之Gradle和Sonatype Nexus搭建私有maven仓库
- Maven私有库和本地库的安装与配置 Sonatype Nexus + Maven
- Sonatype Nexus 搭建Maven 私服
- Maven 私有库和本地的安装与配置 Sonatype Nexus + Maven
- Maven 私有库和本地库的安装与配置 Sonatype Nexus + Maven
- Sonatype Nexus 搭建Maven 私服
- Sonatype Nexus 搭建Maven 私服
- Maven使用笔记(四)Sonatype Nexus 搭建Maven 私服
- sonatype nexus 搭建maven服务器二
- Android业务组件化之Gradle和Sonatype Nexus搭建私有maven仓库
- CentOS 安装 SonaType Nexus Maven Repository以及旧库迁移
- Sonatype Nexus 搭建Maven 私服