修复文档中的失效图片

This commit is contained in:
Zhang Peng 2019-04-18 15:28:24 +08:00
parent 6ada50051e
commit 662fa67660
5 changed files with 6 additions and 209 deletions

View File

@ -77,7 +77,7 @@ dr-xr-xr-x 4 root root 4096 Apr 19 2012 boot
每个文件的属性由左边第一部分的 10 个字符来确定(如下图)。
<br><div align="center"><img src="http://oyz7npk35.bkt.clouddn.com/images/20180920180927171909.png"/></div><br>
<br><div align="center"><img src="https://raw.githubusercontent.com/dunwu/images/master/snap/20180920180927171909.png"/></div><br>
从左至右用 0-9 这些数字来表示。

View File

@ -181,7 +181,7 @@ Windows
访问:`\\<你的ip>\<你的共享路径>`
<br><div align="center"><img src="http://oyz7npk35.bkt.clouddn.com/images/20180920180928161334.png"/></div><br>
<br><div align="center"><img src="https://raw.githubusercontent.com/dunwu/images/master/snap/20180920180928161334.png"/></div><br>
Mac

View File

@ -22,13 +22,13 @@ a. 进入 [Java 官网下载页面](https://www.oracle.com/technetwork/java/java
b. 选择需要的版本:
<br><div align="center"><img src="http://oyz7npk35.bkt.clouddn.com/images/20180920181010164121.png"/></div><br>
<br><div align="center"><img src="https://raw.githubusercontent.com/dunwu/images/master/snap/20180920181010164121.png"/></div><br>
c. 选择对应操作系统的安装包:
Windows 系统选择 exe 安装包Mac 系统选择 dmp 安装包Linux 系统选择 tar.gz 压缩包RedHat 发行版可以安装 rpm 包)。
<br><div align="center"><img src="http://oyz7npk35.bkt.clouddn.com/images/20180920181010164308.png"/></div><br>
<br><div align="center"><img src="https://raw.githubusercontent.com/dunwu/images/master/snap/20180920181010164308.png"/></div><br>
2运行安装包按提示逐步安装

View File

@ -1,203 +0,0 @@
# Nexus 安装
> 关键词maven, nexus, settings.xml, pom.xml
>
> 环境要求:
>
> - Nexus 3.13.0
> - JDK 1.8
> - Maven 3.5.4
<!-- TOC depthFrom:2 depthTo:3 -->
- [下载安装 Nexus](#下载安装-nexus)
- [启动停止 Nexus](#启动停止-nexus)
- [使用 Nexus](#使用-nexus)
- [配置 settings.xml](#配置-settingsxml)
- [配置 pom.xml](#配置-pomxml)
- [执行 maven 构建](#执行-maven-构建)
- [参考资料](#参考资料)
<!-- /TOC -->
## 下载安装 Nexus
进入[官方下载地址](https://www.sonatype.com/download-oss-sonatype),选择合适版本下载。
<br><div align="center"><img src="http://oyz7npk35.bkt.clouddn.com/images/20180920180929160614.png"/></div><br>
本人希望将 Nexus 部署在 Linux 机器,所以选用的是 Unix 版本。
这里,如果想通过命令方式直接下载(比如用脚本安装),可以在[官方历史发布版本页面](https://help.sonatype.com/repomanager3/download/download-archives---repository-manager-3)中找到合适版本,然后执行以下命令:
```sh
wget -O /opt/maven/nexus-unix.tar.gz http://download.sonatype.com/nexus/3/nexus-3.13.0-01-unix.tar.gz
tar -zxf nexus-unix.tar.gz
```
解压后,有两个目录:
- nexus-3.13.0-01 - 包含了 Nexus 运行所需要的文件。是 Nexus 运行必须的。
- sonatype-work - 包含了 Nexus 生成的配置文件、日志文件、仓库文件等。当我们需要备份 Nexus 的时候默认备份此目录即可。
## 启动停止 Nexus
进入 nexus-3.13.0-01/bin 目录,有一个可执行脚本 nexus。
执行 `./nexus`,可以查看允许执行的参数,如下所示,含义可谓一目了然:
```sh
$ ./nexus
Usage: ./nexus {start|stop|run|run-redirect|status|restart|force-reload}
```
- 启动 nexus - `./nexus start`
- 停止 nexus -
启动成功后,在浏览器中访问 `http://<ip>:8081`,欢迎页面如下图所示:
<br><div align="center"><img src="http://oyz7npk35.bkt.clouddn.com/images/20180920180929164140.png"/></div><br>
点击右上角 Sign in 登录,默认用户名/密码为admin/admin123。
有必要提一下的是,在 Nexus 的 Repositories 管理页面,展示了可用的 maven 仓库,如下图所示:
<br><div align="center"><img src="http://oyz7npk35.bkt.clouddn.com/images/20180920180929170924.png"/></div><br>
> 说明:
>
> - maven-central - maven 中央库(如果没有配置 mirror默认就从这里下载 jar 包),从 https://repo1.maven.org/maven2/ 获取资源
> - maven-releases - 存储私有仓库的发行版 jar 包
> - maven-snapshots - 存储私有仓库的快照版(调试版本) jar 包
> - maven-public - 私有仓库的公共空间,把上面三个仓库组合在一起对外提供服务,在本地 maven 基础配置 settings.xml 中使用。
## 使用 Nexus
如果要使用 Nexus还必须在 settings.xml 和 pom.xml 中配置认证信息。
### 配置 settings.xml
一份完整的 `settings.xml`
```xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<pluginGroups>
<pluginGroup>org.sonatype.plugins</pluginGroup>
</pluginGroups>
<!-- Maven 私服账号信息 -->
<servers>
<server>
<id>releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers>
<!-- jar 包下载地址 -->
<mirrors>
<mirror>
<id>public</id>
<mirrorOf>*</mirrorOf>
<url>http://10.255.255.224:8081/repository/maven-public/</url>
</mirror>
<!-- 国内建议使用 aliyun 作为中央仓库以加速下载 -->
<mirror>
<id>aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Aliyun Mirror</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/ </url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>zp</id>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>zp</activeProfile>
</activeProfiles>
</settings>
```
### 配置 pom.xml
在 pom.xml 中添加如下配置:
```xml
<distributionManagement>
<repository>
<id>releases</id>
<name>Releases</name>
<url>http://10.255.255.224:8081/repository/maven-releases</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>Snapshot</name>
<url>http://10.255.255.224:8081/repository/maven-snapshots</url>
</snapshotRepository>
</distributionManagement>
```
> 注意:
>
> - `<repository>``<snapshotRepository>` 的 id 必须和 `settings.xml` 配置文件中的 `<server>` 标签中的 id 匹配。
> - `<url>` 标签的地址需要和 maven 私服的地址匹配。
### 执行 maven 构建
如果要使用 settings.xml 中的私服配置,必须通过指定 `-P zp` 来激活 profile。
示例:
```sh
# 编译并打包 maven 项目
$ mvn clean package -Dmaven.skip.test=true -P zp
# 编译并上传 maven 交付件jar 包)
$ mvn clean deploy -Dmaven.skip.test=true -P zp
```
## 更多内容
- **引申**
- [操作系统、运维部署总结系列](https://github.com/dunwu/OS)
- **引用**
- https://www.cnblogs.com/hoobey/p/6102382.html
- https://blog.csdn.net/wzygis/article/details/49276779
- https://blog.csdn.net/clj198606061111/article/details/52200928

View File

@ -29,7 +29,7 @@
> [Everything](http://www.voidtools.com/) 可以立即在 windows 系统中找到制定名称的文件和文件夹。
<br><div align="center"><img src="http://oyz7npk35.bkt.clouddn.com/images/20180920180930174548.png"/></div><br>
<br><div align="center"><img src="https://raw.githubusercontent.com/dunwu/images/master/snap/20180920180930174548.png"/></div><br>
### 1.3. Wox
@ -41,7 +41,7 @@
> [Q-dir](http://www.softpedia.com/get/File-managers/Q-Dir.shtml) 是轻量的文件管理器,特点鲜明,各种布局视图切换灵活,默认四个小窗口组成一个大窗口,操作快捷。
<br><div align="center"><img src="http://oyz7npk35.bkt.clouddn.com/images/20180920180930174437.png"/></div><br>
<br><div align="center"><img src="https://raw.githubusercontent.com/dunwu/images/master/snap/20180920180930174437.png"/></div><br>
### 1.5. Fences