Skip to content

Commit

Permalink
2016-02-08补充nexus文章
Browse files Browse the repository at this point in the history
  • Loading branch information
judasn committed Feb 8, 2016
1 parent 181159a commit fa661f7
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 7 deletions.
44 changes: 42 additions & 2 deletions Nexus-Install-And-Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
export RUN_AS_USER
```
- 刷新配置:`source /etc/profile`
- 由于目录 `sonatype-work` 以后是做仓库用的,会存储很多 jar,所以这个目录一定要放在磁盘空间大的区内
- 由于目录 `sonatype-work` 以后是做仓库用的,会存储很多 jar,所以这个目录一定要放在磁盘空间大的区内,目前我们还没第一次启动 Nexus,所以这里还是空文件
- 我个人习惯把这类目录放在 `/opt` 下:`mv sonatype-work/ /opt`
- 设置配置文件:`vim /usr/program/nexus2.11.4/conf/nexus.properties`
- 把文件中该值:`nexus-work=${bundleBasedir}/../sonatype-work/nexus`
Expand All @@ -54,10 +54,50 @@
- 密码:**admin123**
<h2 id="nexus2">Nexus 配置</h2>
- 下载远程中央库的索引到服务器
- ![Nexus 配置](images/Nexus-Install-And-Settings-a-1.jpg)
- 如上图标注 4 所示,把默认是 `False` 改为 `True`
- ![Nexus 配置](images/Nexus-Install-And-Settings-a-2.gif)
- 如上图 gif 所示,创建任务开始进行索引下载。需要特别提醒的是,如果你的私服是虚拟机,那得保证你分配的硬盘足够大,别像我一样吝啬只给 10 G(现在还剩下 1.9 G),结果报:**设备上没有空间**
- 项目上配置链接连接私服(下面内容涉及到 maven 的基础知识,请自行私下学习):
- 对项目独立设置:
- 打开项目的 pom.xml 文件:
- 添加下面内容:
```
<repositories>
<repository>
<id>Nexus</id>
<name>虚拟机-192.168.0.110-Nexus</name>
<url>http://192.168.0.110:8081/nexus/content/groups/public/</url>
</repository>
</repositories>
```
- 对全局配置进行设置:
- 打开 maven 的 settings.xml 文件:
- 添加下面内容:
```
<mirrors>
<mirror>
<id>YouMeekNexus</id>
<name>YouMeek Nexus</name>
<mirrorOf>*</mirrorOf>
<url>http://192.168.0.110:8081/nexus/content/groups/public/</url>
</mirror>
</mirrors>
```
<h2 id="nexus3">资料</h2>
- <http://www.cnblogs.com/leefreeman/p/4211530.html>
- <http://www.itdadao.com/article/89071/>
- <http://blog.zhaojunling.me/p/17>
- <http://m.blog.csdn.net/article/details?id=49228873>
- <http://mritd.me/2015/12/29/Nexus-2-11-CentOS%E6%90%AD%E5%BB%BA%E6%95%99%E7%A8%8B/>
- <http://mritd.me/2015/12/29/Nexus-2-11-CentOS%E6%90%AD%E5%BB%BA%E6%95%99%E7%A8%8B/>
- <http://mritd.me/2015/12/28/Nexus-%E7%A7%81%E6%9C%8D%E4%BD%BF%E7%94%A8%E6%95%99%E7%A8%8B/>
- <http://my.oschina.net/liangbo/blog/195739>
13 changes: 8 additions & 5 deletions SVN-Install-And-Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,14 @@

<h2 id="subversion4">SVN 设置提交之后可修改提交的 Message 信息</h2>

- 下载我 hooks 文件:<http://pan.baidu.com/s/1c1jtlmw>
- 把 pre-revprop-change 文件放在你的仓库下,比如我仓库地址是:`/opt/svn/repo/hooks`
- 编辑该文件:`vim /opt/svn/repo/hooks/pre-revprop-change`
- 把文件尾巴的这句脚本:`echo "$1 $2 $3 $4 $5" >> /opt/svn/repo/logchanges.log`,改为:`echo "$1 $2 $3 $4 $5" >> /你的仓库地址/logchanges.log`
- 你在该目录下也可以看到一个文件 `pre-revprop-change.tmpl`,这个其实就是 svn 提供给你模板,其他的那些你有兴趣也可以研究下
- 默认的 SVN 是无法修改提交后的 Message 信息的,修改会报如下错误:
- ![SVN 设置提交之后可修改提交的 Message 信息](images/SVN-Install-And-Settings-a-4.jpg)
- 解决办法:
- 下载我 hooks 文件:<http://pan.baidu.com/s/1c1jtlmw>
- 把 pre-revprop-change 文件放在你的仓库下,比如我仓库地址是:`/opt/svn/repo/hooks`
- 编辑该文件:`vim /opt/svn/repo/hooks/pre-revprop-change`
- 把文件尾巴的这句脚本:`echo "$1 $2 $3 $4 $5" >> /opt/svn/repo/logchanges.log`,改为:`echo "$1 $2 $3 $4 $5" >> /你的仓库地址/logchanges.log`
- 你在该目录下也可以看到一个文件 `pre-revprop-change.tmpl`,这个其实就是 svn 提供给你模板,其他的那些你有兴趣也可以研究下


<h2 id="subversion5">资料</h2>
Expand Down
Binary file added images/Nexus-Install-And-Settings-a-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/Nexus-Install-And-Settings-a-2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/SVN-Install-And-Settings-a-4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fa661f7

Please sign in to comment.