mirror of
https://github.com/dunwu/linux-tutorial.git
synced 2024-04-15 19:55:24 +08:00
整理文档
This commit is contained in:
parent
02ea38a10a
commit
27dca64b13
56
README.md
56
README.md
@ -1,31 +1,49 @@
|
||||
# Linux 教程
|
||||
|
||||
## :wrench: [软件安装配置](docs/linux/soft/README.md)
|
||||
|
||||
- [JDK 安装](docs/linux/soft/jdk-install.md)
|
||||
- [Elastic 安装](docs/linux/soft/elastic)
|
||||
- [Gitlab 安装](docs/linux/soft/kafka-install.md)
|
||||
- [Jenkins 安装](docs/linux/soft/jenkins-install.md)
|
||||
- [Kafka 安装](docs/linux/soft/kafka-install.md)
|
||||
- [Maven 安装](docs/linux/soft/maven-install.md)
|
||||
- [Nexus 安装](docs/linux/soft/nexus-install.md)
|
||||
- [Nginx 教程](https://github.com/dunwu/nginx-tutorial)
|
||||
- [Nodejs 安装](docs/linux/soft/nodejs-install.md)
|
||||
- [RocketMQ 安装](docs/linux/soft/rocketmq-install.md)
|
||||
- [Svn 安装](docs/linux/soft/svn-install.md)
|
||||
- [Tomcat 安装](docs/linux/soft/tomcat-install.md)
|
||||
- [Zookeeper 安装](docs/linux/soft/zookeeper-install.md)
|
||||
- [Nacos 安装](docs/linux/soft/nacos-install.md)
|
||||
|
||||
## :shell: 脚本
|
||||
|
||||
以下内容均含配套执行脚本,方便日常的 linux 运维。
|
||||
- [软件安装配置脚本集合](https://github.com/dunwu/linux-tutorial/tree/master/codes/linux/soft)
|
||||
|
||||
| 软件 | 说明 |
|
||||
| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [JDK 安装](docs/linux/soft/jdk.md) | 不解释 |
|
||||
| [Elastic 安装](docs/linux/soft/elastic) | 常被称为 ELK ,是 Java 世界最流行的分布式日志解决方案 。 ELK 是 Elastic 公司旗下三款产品 ElasticSearch 、Logstash 、Kibana 的首字母组合。 |
|
||||
| [Gitlab 安装](docs/linux/soft/kafka.md) | Git 代码管理平台 |
|
||||
| [Jenkins 安装](docs/linux/soft/jenkins.md) | 持续集成和持续交付平台。 |
|
||||
| [Kafka 安装](docs/linux/soft/kafka.md) | 应该是 Java 世界最流行的消息中间件了吧。 |
|
||||
| [Maven 安装](https://github.com/dunwu/java-tutorial/blob/master/docs/javatool/build/maven/maven-install.md) | Java 构建工具 |
|
||||
| [Nexus 安装](https://github.com/dunwu/java-tutorial/blob/master/docs/javatool/build/maven/nexus.md) | Maven 私服 |
|
||||
| [Nginx 教程](https://github.com/dunwu/nginx-tutorial) | 反向代理服务器 |
|
||||
| [Nodejs 安装](docs/linux/soft/nodejs.md) | 不解释 |
|
||||
| [RocketMQ 安装](docs/linux/soft/rocketmq.md) | 阿里巴巴开源的消息中间件。 |
|
||||
| [Svn 安装](docs/linux/soft/svn.md) | Svn 是 Subversion 的简称,是一个开放源代码的版本控制系统,它采用了分支管理系统。 |
|
||||
| [Tomcat 安装](docs/linux/soft/tomcat.md) | Java 应用服务器 |
|
||||
| [Zookeeper 安装](docs/linux/soft/zookeeper.md) | 分布式系统协调软件 |
|
||||
| [Nacos 安装](docs/linux/soft/nacos.md) | 微服务发现、管理 |
|
||||
> 提供一键式安装、配置软件脚本
|
||||
|
||||
## :memo: 知识点
|
||||
|
||||
- [Linux 命令教程](docs/linux/cli)
|
||||
- [Linux 命令教程](docs/linux/cli/README.md)
|
||||
- [查看 Linux 命令帮助信息](docs/linux/cli/查看Linux命令帮助信息.md)
|
||||
- [Linux 文件目录管理](docs/linux/cli/Linux文件目录管理.md)
|
||||
- [Linux 文件内容查看命令](docs/linux/cli/Linux文件内容查看编辑.md)
|
||||
- [Linux 文件压缩和解压](docs/linux/cli/Linux文件压缩和解压.md)
|
||||
- [Linux 用户管理](docs/linux/cli/Linux用户管理.md)
|
||||
- [Linux 系统管理](docs/linux/cli/Linux系统管理.md)
|
||||
- [Linux 网络管理](docs/linux/cli/Linux网络管理.md)
|
||||
- [Linux 硬件管理](docs/linux/cli/Linux硬件管理.md)
|
||||
- [Linux 软件管理](docs/linux/cli/Linux硬件管理.md)
|
||||
- [Linux 运维](docs/linux/ops/README.md)
|
||||
- [linux 典型运维应用](docs/linux/ops/linux典型运维应用.md)
|
||||
- [samba 使用详解](docs/linux/ops/samba使用详解.md)
|
||||
- [Docker 教程](docs/docker)
|
||||
- [Git 教程](docs/linux/tool/git)
|
||||
- [Git 教程](docs/git/README.md)
|
||||
- [Git 快速指南](docs/git/git-quickstart.md)
|
||||
- [Git 配置](docs/git/git-configuration.md)
|
||||
- [git-flow 工作流](docs/git/git-flow.md)
|
||||
- [Git 常见问题](docs/git/git-faq.md)
|
||||
- [Vim](docs/linux/tool/vim.md)
|
||||
- 脚本语言
|
||||
- [一篇文章让你彻底掌握 shell 语言](docs/lang/shell.md)
|
||||
|
147
docs/README.md
147
docs/README.md
@ -1,62 +1,115 @@
|
||||
# Linux 教程
|
||||
|
||||
## [Linux 命令](linux/cli)
|
||||
## [软件安装配置](linux/soft/README.md)
|
||||
|
||||
> 根据应用场景,将常见 Linux 命令分门别类的一一介绍。
|
||||
>
|
||||
> 如果想快速学习,推荐参考这篇文章:[命令行的艺术(转载)](linux/cli/命令行的艺术.md)
|
||||
- [JDK 安装](linux/soft/jdk-install.md)
|
||||
- [Elastic 安装](linux/soft/elastic)
|
||||
- [Gitlab 安装](linux/soft/kafka-install.md)
|
||||
- [Jenkins 安装](linux/soft/jenkins-install.md)
|
||||
- [Kafka 安装](linux/soft/kafka-install.md)
|
||||
- [Maven 安装](linux/soft/maven-install.md)
|
||||
- [Nexus 安装](linux/soft/nexus-install.md)
|
||||
- [Nodejs 安装](linux/soft/nodejs-install.md)
|
||||
- [RocketMQ 安装](linux/soft/rocketmq-install.md)
|
||||
- [Svn 安装](linux/soft/svn-install.md)
|
||||
- [Tomcat 安装](linux/soft/tomcat-install.md)
|
||||
- [Zookeeper 安装](linux/soft/zookeeper-install.md)
|
||||
- [Nacos 安装](linux/soft/nacos-install.md)
|
||||
|
||||
1. [查看 Linux 命令帮助信息](linux/cli/01.查看Linux命令帮助信息.md) - 关键词:`help`, `whatis`, `info`, `which`, `whereis`, `man`
|
||||
2. [Linux 文件目录管理](linux/cli/02.Linux文件目录管理.md) - 关键词:`cd`, `ls`, `pwd`, `mkdir`, `rmdir`, `tree`, `touch`, `ln`, `rename`, `stat`, `file`, `chmod`, `chown`, `locate`, `find`, `cp`, `mv`, `rm`
|
||||
3. [Linux 文件内容查看命令](linux/cli/03.Linux文件内容查看编辑.md) - 关键词:`cat`, `head`, `tail`, `more`, `less`, `sed`, `vi`, `grep`
|
||||
4. [Linux 文件压缩和解压](linux/cli/04.Linux文件压缩和解压.md) - 关键词:`tar`, `gzip`, `zip`, `unzip`
|
||||
5. [Linux 用户管理](linux/cli/05.Linux用户管理.md) - 关键词:`groupadd`, `groupdel`, `groupmod`, `useradd`, `userdel`, `usermod`, `passwd`, `su`, `sudo`
|
||||
6. [Linux 系统管理](linux/cli/06.Linux系统管理.md) - 关键词:`reboot`, `exit`, `shutdown`, `date`, `mount`, `umount`, `ps`, `kill`, `systemctl`, `service`, `crontab`
|
||||
7. [Linux 网络管理](linux/cli/07.Linux网络管理.md) - 关键词:关键词:`curl`, `wget`, `telnet`, `ip`, `hostname`, `ifconfig`, `route`, `ssh`, `ssh-keygen`, `firewalld`, `iptables`, `host`, `nslookup`, `nc`/`netcat`, `ping`, `traceroute`, `netstat`
|
||||
8. [Linux 硬件管理](linux/cli/08.Linux硬件管理.md) - 关键词:`df`, `du`, `top`, `free`, `iotop`
|
||||
9. [Linux 软件管理](linux/cli/09.Linux软件管理.md) - 关键词:`rpm`, `yum`, `apt-get`
|
||||
## 脚本
|
||||
|
||||
## [Linux 工具](linux/tool)
|
||||
- [软件安装配置脚本集合](https://github.com/dunwu/linux-tutorial/tree/master/codes/linux/soft)
|
||||
|
||||
- [Git](linux/tool/git)
|
||||
> 提供一键式安装、配置软件脚本
|
||||
|
||||
## 知识点
|
||||
|
||||
- [Linux 命令教程](linux/cli)
|
||||
- [查看 Linux 命令帮助信息](linux/cli/查看Linux命令帮助信息.md)
|
||||
- [Linux 文件目录管理](linux/cli/Linux文件目录管理.md)
|
||||
- [Linux 文件内容查看命令](linux/cli/Linux文件内容查看编辑.md)
|
||||
- [Linux 文件压缩和解压](linux/cli/Linux文件压缩和解压.md)
|
||||
- [Linux 用户管理](linux/cli/Linux用户管理.md)
|
||||
- [Linux 系统管理](linux/cli/Linux系统管理.md)
|
||||
- [Linux 网络管理](linux/cli/Linux网络管理.md)
|
||||
- [Linux 硬件管理](linux/cli/Linux硬件管理.md)
|
||||
- [Linux 软件管理](linux/cli/Linux硬件管理.md)
|
||||
- [Linux 运维](linux/ops/README.md)
|
||||
- [linux 典型运维应用](linux/ops/linux典型运维应用.md)
|
||||
- [samba 使用详解](linux/ops/samba使用详解.md)
|
||||
- [Docker 教程](docker)
|
||||
- [Git 教程](git/README.md)
|
||||
- [Git 快速指南](git/git-quickstart.md)
|
||||
- [Git 配置](git/git-configuration.md)
|
||||
- [git-flow 工作流](git/git-flow.md)
|
||||
- [Git 常见问题](git/git-faq.md)
|
||||
- [Nginx 教程](https://github.com/dunwu/nginx-tutorial)
|
||||
- [Vim](linux/tool/vim.md)
|
||||
|
||||
## [Linux 脚本](lang)
|
||||
|
||||
- 脚本语言
|
||||
- [一篇文章让你彻底掌握 shell 语言](lang/shell.md)
|
||||
- [一篇文章让你彻底掌握 python 语言](lang/python.md)
|
||||
|
||||
## [Linux 运维](linux/ops)
|
||||
|
||||
### Linux 服务器运维
|
||||
|
||||
- 运维
|
||||
- [Linux 典型运维应用](linux/ops/linux典型运维应用.md)
|
||||
- [samba 使用详解](linux/ops/samba使用详解.md)
|
||||
|
||||
### 软件安装、配置、调优
|
||||
## 学习资源
|
||||
|
||||
> :bulb: **说明**
|
||||
>
|
||||
> 这里总结了一些常用开发软件的安装、配置、使用指南。
|
||||
>
|
||||
> 此外,提供了一键安装、配置脚本,:point_right: [**软件安装配置脚本**](https://github.com/dunwu/linux-tutorial/tree/master/codes/linux/soft)。
|
||||
>
|
||||
> [环境部署工具](https://github.com/dunwu/linux-tutorial/tree/master/codes/deploy) :适合开发、运维人员,在 [CentOS](https://www.centos.org/) 机器上安装常用命令工具或开发软件。
|
||||
### 命令行检索
|
||||
|
||||
| 软件 | 说明 |
|
||||
| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [JDK 安装](linux/soft/jdk.md) | 不解释 |
|
||||
| [Elastic 安装](linux/soft/elastic) | 常被称为 ELK ,是 Java 世界最流行的分布式日志解决方案 。 ELK 是 Elastic 公司旗下三款产品 ElasticSearch 、Logstash 、Kibana 的首字母组合。 |
|
||||
| [Gitlab 安装](linux/soft/kafka.md) | Git 代码管理平台 |
|
||||
| [Jenkins 安装](linux/soft/jenkins.md) | 持续集成和持续交付平台。 |
|
||||
| [Kafka 安装](linux/soft/kafka.md) | 应该是 Java 世界最流行的消息中间件了吧。 |
|
||||
| [Maven 安装](https://github.com/dunwu/java-tutorial/blob/master/docs/javatool/build/maven/maven-install.md) | Java 构建工具 |
|
||||
| [Nexus 安装](https://github.com/dunwu/java-tutorial/blob/master/docs/javatool/build/maven/nexus.md) | Maven 私服 |
|
||||
| [Nginx 教程](https://github.com/dunwu/nginx-tutorial) | 反向代理服务器 |
|
||||
| [Nodejs 安装](linux/soft/nodejs.md) | 不解释 |
|
||||
| [RocketMQ 安装](linux/soft/rocketmq.md) | 阿里巴巴开源的消息中间件。 |
|
||||
| [Svn 安装](linux/soft/svn.md) | Svn 是 Subversion 的简称,是一个开放源代码的版本控制系统,它采用了分支管理系统。 |
|
||||
| [Tomcat 安装](linux/soft/tomcat.md) | Java 应用服务器 |
|
||||
| [Zookeeper 安装](linux/soft/zookeeper.md) | 分布式系统协调软件 |
|
||||
- [Linux 命令大全](http://man.linuxde.net/)
|
||||
- [linux-command](https://jaywcjlove.gitee.io/linux-command/)
|
||||
|
||||
## [Docker](docker)
|
||||
### 社区网站
|
||||
|
||||
- [Linux 中国](https://linux.cn/) - 各种资讯、文章、技术
|
||||
- [实验楼](https://www.shiyanlou.com/) - 免费提供了 Linux 在线环境,不用在自己机子上装系统也可以学习 Linux,超方便实用。
|
||||
- [鸟哥的 linux 私房菜](http://linux.vbird.org/) - 非常适合 Linux 入门初学者看的教程。
|
||||
- [Linux 公社](http://www.linuxidc.com/) - Linux 相关的新闻、教程、主题、壁纸都有。
|
||||
- [Linux Today](http://www.linuxde.net) - Linux 新闻资讯发布,Linux 职业技术学习!。
|
||||
|
||||
### 知识相关
|
||||
|
||||
- [Linux 思维导图整理](http://www.jianshu.com/p/59f759207862)
|
||||
- [Linux 初学者进阶学习资源整理](http://www.jianshu.com/p/fe2a790b41eb)
|
||||
- [Linux 基础入门(新版)](https://www.shiyanlou.com/courses/1)
|
||||
- [【译】Linux 概念架构的理解](http://www.jianshu.com/p/c5ae8f061cfe) [En](http://oss.org.cn/ossdocs/linux/kernel/a1/index.html)
|
||||
- [Linux 守护进程的启动方法](http://www.ruanyifeng.com/blog/2016/02/linux-daemon.html)
|
||||
- [Linux 编程之内存映射](https://www.shiyanlou.com/questions/2992)
|
||||
- [Linux 知识点小结](https://blog.huachao.me/2016/1/Linux%E7%9F%A5%E8%AF%86%E7%82%B9%E5%B0%8F%E7%BB%93/)
|
||||
- [10 大白帽黑客专用的 Linux 操作系统](https://linux.cn/article-6971-1.html)
|
||||
|
||||
### 软件工具
|
||||
|
||||
- [超赞的 Linux 软件](https://www.gitbook.com/book/alim0x/awesome-linux-software-zh_cn/details) Github 仓库[Zh](https://github.com/alim0x/Awesome-Linux-Software-zh_CN) [En](https://github.com/VoLuong/Awesome-Linux-Software)
|
||||
- [程序员喜欢的 9 款最佳的 Linux 文件比较工具](http://os.51cto.com/art/201607/513796.htm)
|
||||
- [提高 Linux 开发效率的 5 个工具](http://www.codeceo.com/article/5-linux-productivity-tools.html)
|
||||
- [你要了解的 11 款面向 Linux 系统的一流备份实用工具](http://os.51cto.com/art/201603/508027.htm)
|
||||
- [16 个很有用的在线工具](http://www.simlinux.com/archives/264.html)
|
||||
- Adobe 软件的最佳替代品 [原文在这里](https://linux.cn/article-8928-1.html)
|
||||
- [Evince (Adobe Acrobat Reader)](https://wiki.gnome.org/Apps/Evince) 一个“支持多种文档格式的文档查看器”,可以查看 PDF,还支持各种漫画书格式
|
||||
- [Pixlr (Adobe Photoshop)](https://pixlr.com/) 一个强大的图像编辑工具
|
||||
- [Inkscape (Adobe Illustrator)](https://inkscape.org/zh/) 一个专业的矢量图形编辑器
|
||||
- [Pinegrow Web Editor (Adobe Dreamweaver)](https://pinegrow.com/) 一个可视化编辑制作 HTML 网站
|
||||
- [Scribus (Adobe InDesign)](https://www.scribus.net/) 一个开源电子杂志制作软件
|
||||
- [Webflow (Adobe Muse)](https://webflow.com/) 一款可以帮助用户不用编码就可以快速创建网站的谷歌浏览器插件。
|
||||
- [Tupi (Adobe Animate)](http://www.maefloresta.com/portal/) 一款可以创建 HTML5 动画的工具。
|
||||
- [Black Magic Fusion (Adobe After Effects)](https://www.blackmagicdesign.com) 一款先进的合成软件,广泛应用于视觉特效、广电影视设计以及 3D 动画设计等领域。
|
||||
|
||||
### 中国开源镜像站点
|
||||
|
||||
- 阿里云开源镜像站:http://mirrors.aliyun.com/
|
||||
- 网易开源镜像站:http://mirrors.163.com/
|
||||
- 搜狐开源镜像站:http://mirrors.sohu.com/
|
||||
- 北京交通大学:http://mirror.bjtu.edu.cn/ \<教育网荐\>
|
||||
- 兰州大学:http://mirror.lzu.edu.cn/ \<西北高校 FTP 搜索引擎\>
|
||||
- 厦门大学:http://mirrors.xmu.edu.cn/
|
||||
- 上海交通大学:http://ftp.sjtu.edu.cn/
|
||||
- 清华大学:http://mirrors.tuna.tsinghua.edu.cn/
|
||||
- http://mirrors6.tuna.tsinghua.edu.cn/
|
||||
- http://mirrors4.tuna.tsinghua.edu.cn/
|
||||
- 中国科学技术大学:http://mirrors.ustc.edu.cn/
|
||||
- http://ipv4.ustc.edu.cn/ \<教育网、电信\>
|
||||
- http://ipv6.ustc.edu.cn/ \<IPv6 only\>
|
||||
- 东北大学:http://mirror.neu.edu.cn/
|
||||
- 浙江大学:http://mirrors.zju.edu.cn/
|
||||
- 东软信息学院:http://mirrors.neusoft.edu.cn/
|
||||
|
58
docs/git/README.md
Normal file
58
docs/git/README.md
Normal file
@ -0,0 +1,58 @@
|
||||
# Git 教程
|
||||
|
||||
## :memos: 知识点
|
||||
|
||||
- [Git 快速指南](git-quickstart.md)
|
||||
- [Git 配置](git-configuration.md)
|
||||
- [git-flow 工作流](git-flow.md)
|
||||
- [Git 常见问题](git-faq.md)
|
||||
|
||||
## :books: 学习资源
|
||||
|
||||
### 官方资源
|
||||
|
||||
- [Git 官网](https://git-scm.com/)
|
||||
- [Git Github](https://github.com/git/git)
|
||||
|
||||
### 模板
|
||||
|
||||
- [gitignore 模板](https://github.com/github/gitignore) - .gitignore 文件模板
|
||||
- [gitattributes 模板](https://github.com/alexkaratarakis/gitattributes) - .gitattributes 文件模板
|
||||
- [github-cheat-sheet](https://github.com/tiimgreen/github-cheat-sheet) - git 命令简略图表
|
||||
|
||||
### Git 书
|
||||
|
||||
- [Git 官方推荐教程](https://git-scm.com/book/zh/v2) - Scott Chacon 的 Git 书。
|
||||
|
||||
### Git 教程
|
||||
|
||||
- [Git 中文教程](https://github.com/geeeeeeeeek/git-recipes)
|
||||
- [廖雪峰的 Git 教程](https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000)
|
||||
- [有关 git 的学习资源](https://github.com/xirong/my-git)
|
||||
|
||||
### 文章
|
||||
|
||||
- [Git Cookbook](https://github.com/k88hudson/git-flight-rules/blob/master/README_zh-CN.md)
|
||||
- [Git 奇技淫巧](https://github.com/521xueweihan/git-tips)
|
||||
- [Git 风格指南](https://github.com/aseaday/git-style-guide)
|
||||
|
||||
### Git 工具
|
||||
|
||||
- [guis](https://git-scm.com/downloads/guis) - Git 官网展示的客户端工具列表。
|
||||
- [gogs](https://github.com/gogits/gogs) - 极易搭建的自助 Git 服务。
|
||||
- [gitflow](https://github.com/nvie/gitflow) - 应用 [fit-flow](http://nvie.com/posts/a-successful-git-branching-model/) 模型的工具。
|
||||
- [firstaidgit.io](http://firstaidgit.io/) 一个可搜索的最常被问到的 Git 的问题
|
||||
- [git-extra-commands](https://github.com/unixorn/git-extra-commands) - 一堆有用的额外的 Git 脚本
|
||||
- [git-extras](https://github.com/tj/git-extras) - GIT 工具集 -- repo summary, repl, changelog population, author commit percentages and more
|
||||
- [git-fire](https://github.com/qw3rtman/git-fire) - git-fire 是一个 Git 插件,用于帮助在紧急情况下添加所有当前文件, 做提交(committing), 和推(push)到一个新分支(阻止合并冲突)。
|
||||
- [git-tips](https://github.com/git-tips/tips) - Git 小提示
|
||||
- [git-town](https://github.com/Originate/git-town) - 通用,高级 Git 工作流支持! http://www.git-town.com
|
||||
|
||||
### GUI 客户端(GUI Clients)
|
||||
|
||||
- [GitKraken](https://www.gitkraken.com/) - 豪华的 Git 客户端 Windows, Mac & Linux
|
||||
- [git-cola](https://git-cola.github.io/) - 另外一个 Git 客户端 Windows & OS X
|
||||
- [GitUp](https://github.com/git-up/GitUp) - 一个新的 Git 客户端,在处理 Git 的复杂性上有自己的特点
|
||||
- [gitx-dev](https://rowanj.github.io/gitx/) - 图形化的 Git 客户端 OS X
|
||||
- [Source Tree](https://www.sourcetreeapp.com/) - 免费的图形化 Git 客户端 Windows & OS X
|
||||
- [Tower](http://www.git-tower.com/) - 图形化 Git 客户端 OS X(付费)
|
@ -154,7 +154,7 @@ hint: 'git pull ...') before pushing again.
|
||||
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
|
||||
```
|
||||
|
||||
注意, rebasing(见下面)和修正(amending)会用一个**新的提交(commit)代替旧的**, 所以如果之前你已经往远程仓库上推过一次修正前的提交(commit),那你现在就必须强推(force push) (`-f`)。 注意 – *总是* 确保你指明一个分支!
|
||||
注意, rebasing(见下面)和修正(amending)会用一个**新的提交(commit)代替旧的**, 所以如果之前你已经往远程仓库上推过一次修正前的提交(commit),那你现在就必须强推(force push) (`-f`)。 注意 – _总是_ 确保你指明一个分支!
|
||||
|
||||
```bash
|
||||
(my-branch)$ git push origin mybranch -f
|
||||
@ -366,8 +366,8 @@ HEAD is now at a13b85e
|
||||
|
||||
假设你有:
|
||||
|
||||
* 分支 `solution`, 拥有原型方案, 领先 `develop` 分支。
|
||||
* 分支 `develop`, 在这里你应用原型方案的一些内容。
|
||||
- 分支 `solution`, 拥有原型方案, 领先 `develop` 分支。
|
||||
- 分支 `develop`, 在这里你应用原型方案的一些内容。
|
||||
|
||||
我去可以通过把内容拿到你的分支里,来解决这个问题:
|
||||
|
||||
@ -432,7 +432,7 @@ HEAD is now at a13b85e
|
||||
(21)$
|
||||
```
|
||||
|
||||
接着, 我们用 *cherry-pick* 把对bug #21的提交放入当前分支。 这意味着我们将应用(apply)这个提交(commit),仅仅这一个提交(commit),直接在HEAD上面。
|
||||
接着, 我们用 _cherry-pick_ 把对 bug #21 的提交放入当前分支。 这意味着我们将应用(apply)这个提交(commit),仅仅这一个提交(commit),直接在 HEAD 上面。
|
||||
|
||||
```bash
|
||||
(21)$ git cherry-pick e3851e8
|
||||
@ -455,6 +455,7 @@ HEAD is now at a13b85e
|
||||
```
|
||||
|
||||
### 我想删除上游(upstream)分支被删除了的本地分支
|
||||
|
||||
一旦你在 github 上面合并(merge)了一个 pull request, 你就可以删除你 fork 里被合并的分支。 如果你不准备继续在这个分支里工作, 删除这个分支的本地拷贝会更干净,使你不会陷入工作分支和一堆陈旧分支的混乱之中。
|
||||
|
||||
```bash
|
||||
@ -595,7 +596,7 @@ Switched to a new branch 'daves'
|
||||
|
||||
### 我需要组合(combine)几个提交(commit)
|
||||
|
||||
假设你的工作分支将会做对于 `master` 的pull-request。 一般情况下你不关心提交(commit)的时间戳,只想组合 *所有* 提交(commit) 到一个单独的里面, 然后重置(reset)重提交(recommit)。 确保主(master)分支是最新的和你的变化都已经提交了, 然后:
|
||||
假设你的工作分支将会做对于 `master` 的 pull-request。 一般情况下你不关心提交(commit)的时间戳,只想组合 _所有_ 提交(commit) 到一个单独的里面, 然后重置(reset)重提交(recommit)。 确保主(master)分支是最新的和你的变化都已经提交了, 然后:
|
||||
|
||||
```bash
|
||||
(my-branch)$ git reset --soft master
|
||||
@ -686,6 +687,7 @@ Newer, awesomer features
|
||||
```
|
||||
|
||||
#### 安全合并(merging)策略
|
||||
|
||||
`--no-commit` 执行合并(merge)但不自动提交, 给用户在做提交前检查和修改的机会。 `no-ff` 会为特性分支(feature branch)的存在过留下证据, 保持项目历史一致。
|
||||
|
||||
```bash
|
||||
@ -727,14 +729,15 @@ Newer, awesomer features
|
||||
#### 这个 rebase 编辑屏幕出现'noop'
|
||||
|
||||
如果你看到的是这样:
|
||||
|
||||
```
|
||||
noop
|
||||
```
|
||||
|
||||
这意味着你rebase的分支和当前分支在同一个提交(commit)上, 或者 *领先(ahead)* 当前分支。 你可以尝试:
|
||||
这意味着你 rebase 的分支和当前分支在同一个提交(commit)上, 或者 _领先(ahead)_ 当前分支。 你可以尝试:
|
||||
|
||||
* 检查确保主(master)分支没有问题
|
||||
* rebase `HEAD\~2` 或者更早
|
||||
- 检查确保主(master)分支没有问题
|
||||
- rebase `HEAD\~2` 或者更早
|
||||
|
||||
#### 有冲突的情况
|
||||
|
||||
@ -846,7 +849,7 @@ $ git update-ref refs/tags/<tag_name> <hash>
|
||||
|
||||
### 我想给一些 Git 命令添加别名(alias)
|
||||
|
||||
在 OS X 和 Linux 下, 你的 Git的配置文件储存在 ```\~/.gitconfig```。我在```[alias]``` 部分添加了一些快捷别名(和一些我容易拼写错误的),如下:
|
||||
在 OS X 和 Linux 下, 你的 Git 的配置文件储存在 `\~/.gitconfig`。我在`[alias]` 部分添加了一些快捷别名(和一些我容易拼写错误的),如下:
|
||||
|
||||
```vim
|
||||
[alias]
|
||||
@ -910,5 +913,5 @@ $ git reset --hard 0254ea7
|
||||
|
||||
## 资源
|
||||
|
||||
* https://github.com/k88hudson/git-flight-rules/blob/master/README_zh-CN.md
|
||||
* https://github.com/521xueweihan/git-tips
|
||||
- https://github.com/k88hudson/git-flight-rules/blob/master/README_zh-CN.md
|
||||
- https://github.com/521xueweihan/git-tips
|
@ -91,12 +91,10 @@ Git 中使用这种哈希值的情况很多,你将经常看到这种哈希值
|
||||
|
||||
工作区是对项目的某个版本独立提取出来的内容。 这些从 Git 仓库的压缩数据库中提取出来的文件,放在磁盘上供你使用或修改。
|
||||
|
||||
|
||||
- **暂存区(staging)**
|
||||
* **暂存区(staging)**
|
||||
|
||||
暂存区是一个文件,保存了下次将提交的文件列表信息,一般在 Git 仓库目录中。 有时候也被称作`‘索引’',不过一般说法还是叫暂存区。
|
||||
|
||||
|
||||
- **本地仓库(local)**
|
||||
|
||||
提交更新,找到暂存区域的文件,将快照永久性存储到 Git 本地仓库。
|
@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<title>linux-tutorial</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta name="description" content="Description" />
|
||||
<meta name="description" content="Linux 教程" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
|
||||
|
@ -1,93 +0,0 @@
|
||||
# Linux 教程
|
||||
|
||||
## :bulb: 指南
|
||||
|
||||
学习之前,先看一下入门三问:
|
||||
|
||||
> 什么是 Linux?
|
||||
>
|
||||
> Linux 是一套免费使用和自由传播的类 Unix 操作系统,是一个基于 POSIX 和 UNIX 的多用户、多任务、支持多线程和多 CPU 的操作系统。它能运行主要的 UNIX 工具软件、应用程序和网络协议。它支持 32 位和 64 位硬件。Linux 继承了 Unix 以网络为核心的设计思想,是一个性能稳定的多用户网络操作系统。
|
||||
|
||||
> 为什么学习 Linux?
|
||||
>
|
||||
> Linux 常用于网站服务器或嵌入式应用。世界上大部分网站都部署在 Linux 服务器上,作为一名 web 开发人员,
|
||||
|
||||
如何学习 Linux?
|
||||
|
||||
## :memo: 知识点
|
||||
|
||||
### [Linux 命令](cli)
|
||||
|
||||
> 根据应用场景,将常见 Linux 命令分门别类的一一介绍。
|
||||
>
|
||||
> 如果想快速学习,推荐参考这篇文章:[命令行的艺术(转载)](cli/命令行的艺术.md)
|
||||
|
||||
1. [查看 Linux 命令帮助信息](cli/01.查看Linux命令帮助信息.md) - 关键词:`help`, `whatis`, `info`, `which`, `whereis`, `man`
|
||||
2. [Linux 文件目录管理](cli/02.Linux文件目录管理.md) - 关键词:`cd`, `ls`, `pwd`, `mkdir`, `rmdir`, `tree`, `touch`, `ln`, `rename`, `stat`, `file`, `chmod`, `chown`, `locate`, `find`, `cp`, `mv`, `rm`
|
||||
3. [Linux 文件内容查看命令](cli/03.Linux文件内容查看编辑.md) - 关键词:`cat`, `head`, `tail`, `more`, `less`, `sed`, `vi`, `grep`
|
||||
4. [Linux 文件压缩和解压](cli/04.Linux文件压缩和解压.md) - 关键词:`tar`, `gzip`, `zip`, `unzip`
|
||||
5. [Linux 用户管理](cli/05.Linux用户管理.md) - 关键词:`groupadd`, `groupdel`, `groupmod`, `useradd`, `userdel`, `usermod`, `passwd`, `su`, `sudo`
|
||||
6. [Linux 系统管理](cli/06.Linux系统管理.md) - 关键词:`reboot`, `exit`, `shutdown`, `date`, `mount`, `umount`, `ps`, `kill`, `systemctl`, `service`, `crontab`
|
||||
7. [Linux 网络管理](cli/07.Linux网络管理.md) - 关键词:关键词:`curl`, `wget`, `telnet`, `ip`, `hostname`, `ifconfig`, `route`, `ssh`, `ssh-keygen`, `firewalld`, `iptables`, `host`, `nslookup`, `nc`/`netcat`, `ping`, `traceroute`, `netstat`
|
||||
8. [Linux 硬件管理](cli/08.Linux硬件管理.md) - 关键词:`df`, `du`, `top`, `free`, `iotop`
|
||||
9. [Linux 软件管理](cli/09.Linux软件管理.md) - 关键词:`rpm`, `yum`, `apt-get`
|
||||
|
||||
### [工具](tool)
|
||||
|
||||
- [Git](tool/git)
|
||||
- [Vim](tool/vim.md)
|
||||
|
||||
### [Linux 运维](ops)
|
||||
|
||||
#### Linux 服务器运维
|
||||
|
||||
- [Linux 典型运维应用](ops/linux典型运维应用.md)
|
||||
- [samba 使用详解](ops/samba使用详解.md)
|
||||
|
||||
#### 应用、服务、工具运维和调优
|
||||
|
||||
- 研发环境
|
||||
- [JDK](ops/service/jdk.md)
|
||||
- [Nodejs](ops/service/nodejs.md)
|
||||
- [Tomcat](ops/service/tomcat.md)
|
||||
- [Zookeeper](ops/service/zookeeper.md)
|
||||
- 研发工具
|
||||
- [Nexus](ops/service/nexus.md)
|
||||
- [Jenkins](ops/service/jenkins.md) - 持续集成和持续交付平台。
|
||||
- [Elastic](ops/service/elastic) - 常被称为 `ELK` ,是 Java 世界最流行的分布式日志解决方案 。 `ELK` 是 Elastic 公司旗下三款产品 [ElasticSearch](https://www.elastic.co/products/elasticsearch) 、[Logstash](https://www.elastic.co/products/logstash) 、[Kibana](https://www.elastic.co/products/kibana) 的首字母组合。
|
||||
- [Apollo](ops/service/apollo) - 分布式配置中心
|
||||
- 版本控制
|
||||
- [Gitlab](ops/service/gitlab) - Git 代码管理平台。
|
||||
- [Svn](ops/service/svn.md) - Svn 是 Subversion 的简称,是一个开放源代码的版本控制系统,它采用了分支管理系统。
|
||||
- 消息中间件
|
||||
- [Kafka](ops/service/kafka.md) - 应该是 Java 世界最流行的消息中间件了吧。
|
||||
- [RocketMQ](ops/service/rocketmq.md) - 阿里巴巴开源的消息中间件。
|
||||
- 数据库
|
||||
- [Mysql](https://github.com/dunwu/database/blob/master/docs/mysql/install-mysql.md) - 关系型数据库
|
||||
- [PostgreSQL](https://github.com/dunwu/database/blob/master/docs/postgresql.md#安装) - 关系型数据库
|
||||
- [Mongodb](https://github.com/dunwu/database/blob/master/docs/mongodb/install-mongodb.md) - Nosql
|
||||
- [Redis](https://github.com/dunwu/database/blob/master/docs/redis/install-redis.md) - Nosql
|
||||
|
||||
## :books: 学习资源
|
||||
|
||||
### Linux 资源汇总
|
||||
|
||||
- [awesome-linux](https://github.com/aleksandar-todorovic/awesome-linux) - Linux 资源汇总
|
||||
- [awesome-linux-software](https://github.com/LewisVo/Awesome-Linux-Software) - Linux 软件汇总
|
||||
|
||||
### Linux 教程
|
||||
|
||||
- [鸟哥的私房菜](http://cn.linux.vbird.org/) - 久负盛名的 Linux 教程
|
||||
- [菜鸟教程-Linux](http://www.runoob.com/linux/linux-tutorial.html) - 入门级 Linux 教程
|
||||
- [Linux 工具快速教程](https://github.com/me115/linuxtools_rst)
|
||||
|
||||
### Linux 帮助手册
|
||||
|
||||
- [命令行的艺术](https://github.com/jlevy/the-art-of-command-line/blob/master/README-zh.md) - Linux 命令 cheat sheet
|
||||
- [Linux 命令大全](http://man.linuxde.net/) - Linux 命令在线帮助手册
|
||||
- [linux-command](https://github.com/jaywcjlove/linux-command) - Linux 命令在线帮助手册
|
||||
- [linux-tutorial](https://github.com/judasn/Linux-Tutorial) - Linux 环境下各种软件安装部署
|
||||
|
||||
## :door: 传送门
|
||||
|
||||
| [linux-tutorial](https://github.com/dunwu/linux-tutorial) | [blog](https://github.com/dunwu/blog) |
|
@ -6,12 +6,12 @@
|
||||
>
|
||||
> 如果想快速学习,推荐参考这篇文章:[命令行的艺术(转载)](命令行的艺术.md)
|
||||
|
||||
1. [查看 Linux 命令帮助信息](01.查看Linux命令帮助信息.md) - 关键词:`help`, `whatis`, `info`, `which`, `whereis`, `man`
|
||||
2. [Linux 文件目录管理](02.Linux文件目录管理.md) - 关键词:`cd`, `ls`, `pwd`, `mkdir`, `rmdir`, `tree`, `touch`, `ln`, `rename`, `stat`, `file`, `chmod`, `chown`, `locate`, `find`, `cp`, `mv`, `rm`
|
||||
3. [Linux 文件内容查看命令](03.Linux文件内容查看编辑.md) - 关键词:`cat`, `head`, `tail`, `more`, `less`, `sed`, `vi`, `grep`
|
||||
4. [Linux 文件压缩和解压](04.Linux文件压缩和解压.md) - 关键词:`tar`, `gzip`, `zip`, `unzip`
|
||||
5. [Linux 用户管理](05.Linux用户管理.md) - 关键词:`groupadd`, `groupdel`, `groupmod`, `useradd`, `userdel`, `usermod`, `passwd`, `su`, `sudo`
|
||||
6. [Linux 系统管理](06.Linux系统管理.md) - 关键词:`reboot`, `exit`, `shutdown`, `date`, `mount`, `umount`, `ps`, `kill`, `systemctl`, `service`, `crontab`
|
||||
7. [Linux 网络管理](07.Linux网络管理.md) - 关键词:关键词:`curl`, `wget`, `telnet`, `ip`, `hostname`, `ifconfig`, `route`, `ssh`, `ssh-keygen`, `firewalld`, `iptables`, `host`, `nslookup`, `nc`/`netcat`, `ping`, `traceroute`, `netstat`
|
||||
8. [Linux 硬件管理](08.Linux硬件管理.md) - 关键词:`df`, `du`, `top`, `free`, `iotop`
|
||||
9. [Linux 软件管理](09.Linux软件管理.md) - 关键词:`rpm`, `yum`, `apt-get`
|
||||
- [查看 Linux 命令帮助信息](查看Linux命令帮助信息.md) - 关键词:`help`, `whatis`, `info`, `which`, `whereis`, `man`
|
||||
- [Linux 文件目录管理](Linux文件目录管理.md) - 关键词:`cd`, `ls`, `pwd`, `mkdir`, `rmdir`, `tree`, `touch`, `ln`, `rename`, `stat`, `file`, `chmod`, `chown`, `locate`, `find`, `cp`, `mv`, `rm`
|
||||
- [Linux 文件内容查看命令](Linux文件内容查看编辑.md) - 关键词:`cat`, `head`, `tail`, `more`, `less`, `sed`, `vi`, `grep`
|
||||
- [Linux 文件压缩和解压](Linux文件压缩和解压.md) - 关键词:`tar`, `gzip`, `zip`, `unzip`
|
||||
- [Linux 用户管理](Linux用户管理.md) - 关键词:`groupadd`, `groupdel`, `groupmod`, `useradd`, `userdel`, `usermod`, `passwd`, `su`, `sudo`
|
||||
- [Linux 系统管理](Linux系统管理.md) - 关键词:`reboot`, `exit`, `shutdown`, `date`, `mount`, `umount`, `ps`, `kill`, `systemctl`, `service`, `crontab`
|
||||
- [Linux 网络管理](Linux网络管理.md) - 关键词:关键词:`curl`, `wget`, `telnet`, `ip`, `hostname`, `ifconfig`, `route`, `ssh`, `ssh-keygen`, `firewalld`, `iptables`, `host`, `nslookup`, `nc`/`netcat`, `ping`, `traceroute`, `netstat`
|
||||
- [Linux 硬件管理](Linux硬件管理.md) - 关键词:`df`, `du`, `top`, `free`, `iotop`
|
||||
- [Linux 软件管理](Linux硬件管理.md) - 关键词:`rpm`, `yum`, `apt-get`
|
||||
|
4
docs/linux/ops/README.md
Normal file
4
docs/linux/ops/README.md
Normal file
@ -0,0 +1,4 @@
|
||||
# Linux 运维
|
||||
|
||||
- [linux 典型运维应用](linux典型运维应用.md)
|
||||
- [samba 使用详解](samba使用详解.md)
|
15
docs/linux/soft/README.md
Normal file
15
docs/linux/soft/README.md
Normal file
@ -0,0 +1,15 @@
|
||||
# 软件安装配置
|
||||
|
||||
- [JDK 安装](jdk-install.md)
|
||||
- [Elastic 安装](elastic)
|
||||
- [Gitlab 安装](kafka-install.md)
|
||||
- [Jenkins 安装](jenkins-install.md)
|
||||
- [Kafka 安装](kafka-install.md)
|
||||
- [Maven 安装](maven-install.md)
|
||||
- [Nexus 安装](nexus-install.md)
|
||||
- [Nodejs 安装](nodejs-install.md)
|
||||
- [RocketMQ 安装](rocketmq-install.md)
|
||||
- [Svn 安装](svn-install.md)
|
||||
- [Tomcat 安装](tomcat-install.md)
|
||||
- [Zookeeper 安装](zookeeper-install.md)
|
||||
- [Nacos 安装](nacos-install.md)
|
46
docs/linux/soft/maven-install.md
Normal file
46
docs/linux/soft/maven-install.md
Normal file
@ -0,0 +1,46 @@
|
||||
# Maven 安装
|
||||
|
||||
> 环境要求:
|
||||
>
|
||||
> - JDK
|
||||
|
||||
<!-- TOC depthFrom:2 depthTo:3 -->
|
||||
|
||||
- [安装方法](#安装方法)
|
||||
- [脚本](#脚本)
|
||||
|
||||
<!-- /TOC -->
|
||||
|
||||
## 安装方法
|
||||
|
||||
安装步骤如下:
|
||||
|
||||
(1)下载
|
||||
|
||||
进入官网下载地址:https://maven.apache.org/download.cgi ,选择合适的版本下载。
|
||||
|
||||
我选择的是最新 Maven3 版本:http://mirrors.hust.edu.cn/apache/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz
|
||||
|
||||
(2)解压到本地
|
||||
|
||||
我个人喜欢存放在:`/opt/maven`
|
||||
|
||||
(3)设置环境变量
|
||||
|
||||
输入 `vi /etc/profile` ,添加环境变量如下:
|
||||
|
||||
```
|
||||
# MAVEN 的根路径
|
||||
export MAVEN_HOME=/opt/maven/apache-maven-3.5.2
|
||||
export PATH=\$MAVEN_HOME/bin:\$PATH
|
||||
```
|
||||
|
||||
执行 `source /etc/profile` ,立即生效
|
||||
|
||||
(4)检验是否安装成功,执行 `mvn -v` 命令
|
||||
|
||||
## 脚本
|
||||
|
||||
以上两种安装方式,我都写了脚本去执行:
|
||||
|
||||
| [安装脚本](https://github.com/dunwu/OS/tree/master/codes/deploy/tool/maven) |
|
193
docs/linux/soft/nexus-install.md
Normal file
193
docs/linux/soft/nexus-install.md
Normal file
@ -0,0 +1,193 @@
|
||||
# 部署并使用 Nexus 作为 Maven 私服
|
||||
|
||||
> 关键词:maven, nexus
|
||||
>
|
||||
> 部署环境
|
||||
>
|
||||
> - 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),选择合适版本下载。
|
||||
|
||||
![](http://dunwu.test.upcdn.net/snap/20181127203029.png)
|
||||
|
||||
本人希望将 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`,欢迎页面如下图所示:
|
||||
|
||||
![](http://dunwu.test.upcdn.net/snap/20181127203131.png)
|
||||
|
||||
点击右上角 Sign in 登录,默认用户名/密码为:admin/admin123。
|
||||
|
||||
有必要提一下的是,在 Nexus 的 Repositories 管理页面,展示了可用的 maven 仓库,如下图所示:
|
||||
|
||||
![](http://dunwu.test.upcdn.net/snap/20181127203156.png)
|
||||
|
||||
> 说明:
|
||||
>
|
||||
> - 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>
|
||||
</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://www.cnblogs.com/hoobey/p/6102382.html
|
||||
- https://blog.csdn.net/wzygis/article/details/49276779
|
||||
- https://blog.csdn.net/clj198606061111/article/details/52200928
|
@ -1,14 +0,0 @@
|
||||
# git
|
||||
|
||||
## 目录
|
||||
|
||||
* [快速指南(quickstart)](git-quickstart.md)
|
||||
* 基础篇(basics)
|
||||
* [安装(installation)](basics/git-installation.md)
|
||||
* [配置(configuration)](basics/git-configuration.md)
|
||||
* 进阶篇(advanced)
|
||||
* [git-flow 工作流](advanced/git-flow.md)
|
||||
* 附录(appendix)
|
||||
* [常见问题(faq)](appendix/git-faq.md)
|
||||
* [命令(command)](appendix/git-command.md)
|
||||
* [资源(resource)](appendix/git-resource.md)
|
@ -1,3 +0,0 @@
|
||||
# Git 命令
|
||||
|
||||
[github-git-cheat-sheet](https://services.github.com/on-demand/downloads/github-git-cheat-sheet.pdf)
|
@ -1,49 +0,0 @@
|
||||
# Git 资源
|
||||
|
||||
## 官方资源
|
||||
|
||||
* [Git 官网](https://git-scm.com/)
|
||||
* [Git Github](https://github.com/git/git)
|
||||
|
||||
## 模板
|
||||
|
||||
* [gitignore 模板](https://github.com/github/gitignore) - .gitignore 文件模板
|
||||
* [gitattributes 模板](https://github.com/alexkaratarakis/gitattributes) - .gitattributes 文件模板
|
||||
* [github-cheat-sheet](https://github.com/tiimgreen/github-cheat-sheet) - git 命令简略图表
|
||||
|
||||
## Git 书
|
||||
|
||||
* [Git 官方推荐教程](https://git-scm.com/book/zh/v2) - Scott Chacon 的 Git 书。
|
||||
|
||||
## Git 教程
|
||||
|
||||
* [Git中文教程](https://github.com/geeeeeeeeek/git-recipes)
|
||||
* [廖雪峰的Git教程](https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000)
|
||||
* [有关 git 的学习资源](https://github.com/xirong/my-git)
|
||||
|
||||
## 文章
|
||||
|
||||
* [Git Cookbook](https://github.com/k88hudson/git-flight-rules/blob/master/README_zh-CN.md)
|
||||
* [Git 奇技淫巧](https://github.com/521xueweihan/git-tips)
|
||||
* [Git 风格指南](https://github.com/aseaday/git-style-guide)
|
||||
|
||||
## Git 工具
|
||||
|
||||
* [guis](https://git-scm.com/downloads/guis) - Git 官网展示的客户端工具列表。
|
||||
* [gogs](https://github.com/gogits/gogs) - 极易搭建的自助 Git 服务。
|
||||
* [gitflow](https://github.com/nvie/gitflow) - 应用 [fit-flow](http://nvie.com/posts/a-successful-git-branching-model/) 模型的工具。
|
||||
* [firstaidgit.io](http://firstaidgit.io/) 一个可搜索的最常被问到的Git的问题
|
||||
* [git-extra-commands](https://github.com/unixorn/git-extra-commands) - 一堆有用的额外的Git脚本
|
||||
* [git-extras](https://github.com/tj/git-extras) - GIT 工具集 -- repo summary, repl, changelog population, author commit percentages and more
|
||||
* [git-fire](https://github.com/qw3rtman/git-fire) - git-fire 是一个 Git 插件,用于帮助在紧急情况下添加所有当前文件, 做提交(committing), 和推(push)到一个新分支(阻止合并冲突)。
|
||||
* [git-tips](https://github.com/git-tips/tips) - Git小提示
|
||||
* [git-town](https://github.com/Originate/git-town) - 通用,高级Git工作流支持! http://www.git-town.com
|
||||
|
||||
## GUI客户端(GUI Clients)
|
||||
|
||||
* [GitKraken](https://www.gitkraken.com/) - 豪华的Git客户端 Windows, Mac & Linux
|
||||
* [git-cola](https://git-cola.github.io/) - 另外一个Git客户端 Windows & OS X
|
||||
* [GitUp](https://github.com/git-up/GitUp) - 一个新的Git客户端,在处理Git的复杂性上有自己的特点
|
||||
* [gitx-dev](https://rowanj.github.io/gitx/) - 图形化的Git客户端 OS X
|
||||
* [Source Tree](https://www.sourcetreeapp.com/) - 免费的图形化Git客户端 Windows & OS X
|
||||
* [Tower](http://www.git-tower.com/) - 图形化Git客户端 OS X(付费)
|
@ -1,21 +0,0 @@
|
||||
# Git 安装
|
||||
|
||||
## 安装方法
|
||||
|
||||
> Git 可以安装在 Mac、Windows、Linux/Unix 环境。
|
||||
|
||||
### Mac
|
||||
|
||||
在 [mac 下载页面](https://git-scm.com/download/mac) 选择合适版本,按照安装向导安装。
|
||||
|
||||
### Windows
|
||||
|
||||
在 [win 下载页面](https://git-scm.com/download/win) 选择合适版本,按照安装向导安装。
|
||||
|
||||
### Linux/Unix
|
||||
|
||||
参考 [linux 下载页面](https://git-scm.com/download/linux) 的指导,根据实际发行版本下载安装 Git。
|
||||
|
||||
## 资料
|
||||
|
||||
* [https://git-scm.com/downloads](https://git-scm.com/downloads)
|
@ -1,25 +1,33 @@
|
||||
- Linux 命令
|
||||
- [查看 Linux 命令帮助信息](linux/cli/01.查看Linux命令帮助信息.md)
|
||||
- [Linux 文件目录管理](linux/cli/02.Linux文件目录管理.md)
|
||||
- [Linux 文件内容查看命令](linux/cli/03.Linux文件内容查看编辑.md)
|
||||
- [Linux 文件压缩和解压](linux/cli/04.Linux文件压缩和解压.md)
|
||||
- [Linux 用户管理](linux/cli/05.Linux用户管理.md)
|
||||
- [Linux 系统管理](linux/cli/06.Linux系统管理.md)
|
||||
- [Linux 网络管理](linux/cli/07.Linux网络管理.md)
|
||||
- [Linux 硬件管理](linux/cli/08.Linux硬件管理.md)
|
||||
- [Linux 软件管理](linux/cli/09.Linux软件管理.md)
|
||||
- Linux 软件安装配置
|
||||
- [JDK 安装](linux/soft/jdk.md)
|
||||
- :abc: [Linux 命令](linux/cli/README.md)
|
||||
- [查看 Linux 命令帮助信息](linux/cli/查看Linux命令帮助信息.md)
|
||||
- [Linux 文件目录管理](linux/cli/Linux文件目录管理.md)
|
||||
- [Linux 文件内容查看命令](linux/cli/Linux文件内容查看编辑.md)
|
||||
- [Linux 文件压缩和解压](linux/cli/Linux文件压缩和解压.md)
|
||||
- [Linux 用户管理](linux/cli/Linux用户管理.md)
|
||||
- [Linux 系统管理](linux/cli/Linux系统管理.md)
|
||||
- [Linux 网络管理](linux/cli/Linux网络管理.md)
|
||||
- [Linux 硬件管理](linux/cli/Linux硬件管理.md)
|
||||
- [Linux 软件管理](linux/cli/Linux硬件管理.md)
|
||||
- :wrench: [Linux 运维](linux/ops/README.md)
|
||||
- [linux 典型运维应用](linux/ops/linux典型运维应用.md)
|
||||
- [samba 使用详解](linux/ops/samba使用详解.md)
|
||||
- :package: [软件安装配置](linux/soft/README.md)
|
||||
- [JDK 安装](linux/soft/jdk-install.md)
|
||||
- [Elastic 安装](linux/soft/elastic)
|
||||
- [Gitlab 安装](linux/soft/kafka.md)
|
||||
- [Jenkins 安装](linux/soft/jenkins.md)
|
||||
- [Kafka 安装](linux/soft/kafka.md)
|
||||
- [Maven 安装](https://github.com/dunwu/java-tutorial/blob/master/docs/javatool/build/maven/maven-install.md)
|
||||
- [Nexus 安装](https://github.com/dunwu/java-tutorial/blob/master/docs/javatool/build/maven/nexus.md)
|
||||
- [Gitlab 安装](linux/soft/kafka-install.md)
|
||||
- [Jenkins 安装](linux/soft/jenkins-install.md)
|
||||
- [Kafka 安装](linux/soft/kafka-install.md)
|
||||
- [Maven 安装](linux/soft/maven-install.md)
|
||||
- [Nexus 安装](linux/soft/nexus-install.md)
|
||||
- [Nginx 教程](https://github.com/dunwu/nginx-tutorial)
|
||||
- [Nodejs 安装](linux/soft/nodejs.md)
|
||||
- [RocketMQ 安装](linux/soft/rocketmq.md)
|
||||
- [Svn 安装](linux/soft/svn.md)
|
||||
- [Tomcat 安装](linux/soft/tomcat.md)
|
||||
- [Zookeeper 安装](linux/soft/zookeeper.md)
|
||||
- [Nacos 安装](linux/soft/nacos.md)
|
||||
- [Nodejs 安装](linux/soft/nodejs-install.md)
|
||||
- [RocketMQ 安装](linux/soft/rocketmq-install.md)
|
||||
- [Svn 安装](linux/soft/svn-install.md)
|
||||
- [Tomcat 安装](linux/soft/tomcat-install.md)
|
||||
- [Zookeeper 安装](linux/soft/zookeeper-install.md)
|
||||
- [Nacos 安装](linux/soft/nacos-install.md)
|
||||
- :gift: [Git 教程](git/README.md)
|
||||
- [Git 快速指南](git/git-quickstart.md)
|
||||
- [Git 配置](git/git-configuration.md)
|
||||
- [git-flow 工作流](git/git-flow.md)
|
||||
- [Git 常见问题](git/git-faq.md)
|
||||
|
9
docs/package.json
Normal file
9
docs/package.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "linux-tutorial",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"start": "docsify serve ./"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {}
|
||||
}
|
Loading…
Reference in New Issue
Block a user