Skip to content

Commit e0fdca5

Browse files
committed
2016-02-26修改文章错误
1 parent 7586857 commit e0fdca5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Nexus-Install-And-Settings.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@
2020
- 官网帮助说明 2:<http://books.sonatype.com/sonatype-clm-book/html/clm-book/installation-configuration.html>
2121
- 我个人习惯 `/opt` 目录下创建一个目录 `setups` 用来存放各种软件安装包;在 `/usr` 目录下创建一个 `program` 用来存放各种解压后的软件包,下面的讲解也都是基于此习惯
2222
- 我个人已经使用了第三方源:`EPEL、RepoForge`,如果你出现 `yum install XXXXX` 安装不成功的话,很有可能就是你没有相关源,请查看我对源设置的文章
23-
- 压缩包下载:`wget http://download.sonatype.com/nexus/oss/nexus-2.12.0-01-bundle.tar.gz`
23+
- 压缩包下载(由于国内网络的原因不排除你下载不了)`wget http://download.sonatype.com/nexus/oss/nexus-2.12.0-01-bundle.tar.gz`
2424
- 如果地址下载不了,那是因为你需要开 VPN,你也可以选择降低要求下载 2.11.4-01 版本:<http://pan.baidu.com/s/1mgSNJtA>
2525
- 解压压缩包:`tar zxvf nexus-2.11.4-01-bundle.tar.gz`
2626
- 解压出来有两个文件夹:
2727
- 这是程序目录:`nexus-2.11.4-01`
2828
- 这是仓库目录:`sonatype-work`
2929
- 移到目录到我的安装目录下:`mv nexus-2.11.4-01/ /usr/program/`
30-
- 把目录名字改为更好看点:`mv mv nexus-2.11.4-01/ nexus2.11.4/`
30+
- 进入安装目录:`cd /usr/program/`
31+
- 把目录名字改为更好看点:`mv nexus-2.11.4-01/ nexus2.11.4/`
3132
- 编辑系统配置文件:`vim /etc/profile`
3233
- 在文件的尾巴增加下面内容:
3334
```
@@ -39,11 +40,15 @@
3940
```
4041
- 刷新配置:`source /etc/profile`
4142
- 由于目录 `sonatype-work` 以后是做仓库用的,会存储很多 jar,所以这个目录一定要放在磁盘空间大的区内,目前我们还没第一次启动 Nexus,所以这里还是空文件
42-
- 我个人习惯把这类目录放在 `/opt` 下:`mv sonatype-work/ /opt`
43+
- 我个人习惯把这类目录放在 `/opt` 下:`mv /opt/setup/sonatype-work/ /opt/`
4344
- 设置配置文件:`vim /usr/program/nexus2.11.4/conf/nexus.properties`
4445
- 把文件中该值:`nexus-work=${bundleBasedir}/../sonatype-work/nexus`
4546
- 改为:`nexus-work=/opt/sonatype-work/nexus`
4647
- 默认情况下如果你的 JDK 等系统变量设置好的是无需编辑 Nexus 的配置文件,但是这里还是给大家一下配置文件路径:`vim /usr/program/nexus2.11.4/bin/jsw/conf/wrapper.conf`
48+
- 开放防火墙端口:
49+
- 添加规则:`sudo iptables -I INPUT -p tcp -m tcp --dport 8081 -j ACCEPT`
50+
- 保存规则:`sudo /etc/rc.d/init.d/iptables save`
51+
- 重启 iptables:`sudo service iptables restart`
4752
- 测试安装结果:
4853
- 启动 Nexus:`/usr/program/nexus2.11.4/bin/nexus start`
4954
- 查看启动日志:`tail -200f /usr/program/nexus2.11.4/logs/wrapper.log`

0 commit comments

Comments
 (0)