Merge remote-tracking branch 'LCTT/master'

This commit is contained in:
Xingyu Wang 2020-12-22 13:47:52 +08:00
commit 8672352fa8
11 changed files with 815 additions and 281 deletions

View File

@ -0,0 +1,134 @@
[#]: collector: (lujun9972)
[#]: translator: (zxp93)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12941-1.html)
[#]: subject: (The state of the art of microservices in 2020)
[#]: via: (https://www.linux.com/news/the-state-of-the-art-of-microservices-in-2020/)
[#]: author: (Linux.com Editorial Staff https://www.linux.com/author/linuxdotcom/)
2020 年微服务现状
======
![](https://img.linux.net.cn/data/attachment/album/202012/22/122634t2hwh2hh12bvrbsd.jpg)
> “微服务架构风格是一种将 **单个应用程序** 开发为一套 **小型服务** 的方法,每个服务都在 **自己的进程中运行,并使用轻量级的通信机制(通常是 HTTP 类型的 API进行通信**。这些服务是围绕 **业务能力** 构建的,并且可以通过 **全自动化的部署机制** 进行 **独立部署**。目前对这些服务几乎没有集中的管理,这些服务可以用 **不同的编程语言** 编写,也能使用 **不同的数据存储技术**。”
>
> —— James Lewis 和 Martin Fowler (2014) [^6]
### 介绍
预计在 2020 年,全球云端的微服务市场将以 22.5% 的速度增长,其中美国市场预计将保持 27.4% 的增长率[^5]。目前的趋势是,开发人员将从本地托管的应用程序转移到云端。这将有助于企业最大限度地减少停机时间、优化资源并降低基础设施成本。同时专家们还预测,到了 2022 年90% 的应用程序将会使用微服务架构进行开发[^5]。本文将帮助你了解什么是微服务,以及目前的公司如何使用它的。
### 什么是微服务?
微服务已经在全球范围内被广泛使用。但是,微服务到底是什么?微服务是一种基于许多小型、互联服务的体系结构模式。它们基于 **单一责任原则**。根据 Robert C. Martin 的说法,“将因相同原因而变化的事物聚集起来,将因不同原因而变化的事物分离开来”。[^2]微服务架构也被扩展到了 **松耦合服务** 中,可以 **独立地开发、部署和维护**[^2]。
### 远离单体架构
微服务通常和传统的单体软件架构做对比。在单体架构中,软件是被设计为自足的,也就是说,这个程序中的各个组件都是互相连通和互相依赖的,而不是松散耦合的。在一个紧耦合的架构中(<ruby>单体<rt>monolithic</rt></ruby>),每个组件和它相关联的组件必须按照指定的顺序组合起来,才能被执行或编译[^7]。当其中有一个组件需要更新时,整个应用都要被重写。
而这个现象在使用微服务架构的应用中就不会出现。因为每一个模块都是独立的,每个模块都可以更新修改而不影响程序的其他部分。因此,降低了对更改一个组件会对其他组件造成影响的风险。
如果公司的架构很难升级,或者维护过于复杂和昂贵,那么他们可能会遇到麻烦,不能扩展单体架构的应用[^4]。把一个复杂的任务分解成小组件,彼此独立工作,就是解决这个问题的方法。
![][1]
*单一体系架构 vs. 微服务架构 (图片来自 [^3]*
### 开发者如何构建属于自己的微服务
微服务以提高*可扩展性*和*性能*而闻名。然而,这些是世界各地的开发者开发属于他们自己的微服务的主要原因吗?《微服务 2020 研究现状》[^1]披露了全球开发者如何构建他们的微服务,以及他们对微服务的看法。这份报告是在来自欧洲、北美、中南美洲、中东、东南亚、澳大利亚和新西兰的 660 名微服务专家的帮助下完成的。下表列出了微服务成熟度相关问题的平均评分[^1]
**分类** | **平均得分满分为5分**
---|---
创建新项目 | 3.8
维护与调试 | 3.4
工作效率 | 3.9
解决可扩展性问题 | 4.3
解决性能问题 | 3.9
团队合作 | 3.9
从上表可知,大部分专家都对使用微服务来解决可扩展性问题感到满意。与之相反的是,维护与调试对他们来说似乎是一个挑战。
从他们所使用的架构技术来说,大部分专家使用 Javascript/Typescript (大约 ⅔ 的微服务是使用这些语言构建的),其次使用的是 Java。
尽管有很多部署微服务的选择,但大多数专家使用 AWS49%),其次是他们自己的服务器。另外,有 62% 的人更喜欢用 AWS Lambda 作为无服务器解决方案。
这些人所使用的大多数微服务都使用 HTTP 进行通信,其次是 events 和 gRPC。此外大多数专家将 RabbitMQ 用于消息代理,其次是 Kafka 和 Redis。
而且大多数人使用微服务持续集成CI。在报告中87% 的受访者使用诸如 GitLab CI、Jenkins 或 GitHub Actions 等 CI 解决方案。
在 86% 的受访者中,最受欢迎的调试解决方案是日志,其中 27% 的受访者**只**使用日志。
最后,大多数人认为微服务架构将成为更复杂的系统或后端开发的标准。
### 微服务的成功案例
许多公司已经从单体架构转向微服务架构。
#### 亚马逊
在 2001 年,开发延迟、编码挑战和服务相互依赖性使得<ruby>亚马逊<rt>Amazon</rt></ruby>无法满足其不断增长的用户群的可扩展性需求。由于需要从头开始重构他们的单体架构,亚马逊将其单体架构应用程序拆分为小型的、独立的、针对服务的应用程序[^3][^9]。
2001 年,在微服务这个词开始流行之前的几年,亚马逊决定改用微服务。这一变化使得亚马逊开发了好几种支持微服务架构的解决方案,比如亚马逊 AWS。随着对微服务的快速增长和适应亚马逊成为全球市值最高的公司截至 2020 年 7 月 1 日,亚马逊市值为 1.433 万亿美元[^8]。
#### 奈飞
<ruby>奈飞<rt>Netflix</rt></ruby>于 2007 年开始提供电影流媒体服务,到了 2008 年,它也面临着规模扩张的挑战。期间,他们经历了一次严重的数据库损坏,在三天之内,他们不能将 DVD 发送给他们的会员[^10]。这一事故使他们意识到需要将单点故障(如关系数据库)转向云中更可伸缩和更可靠的分布式系统。于是 2009 年,奈飞开始将其单体架构的应用重构为微服务。他们首先将其非面向客户的电影编码平台迁移到云端作为独立的微服务运行[^11]。在改用微服务之后,使奈飞能够解决扩展性挑战和服务中断的问题。并且它还允许他们按照每个流数据而不是数据中心的成本来降低成本[^10]。今天,奈飞每天向 190 个国家的 1.39 亿订户发送约 2.5 亿小时的内容[^11]。
#### Uber
在推出 Uber 服务之后,他们在开发和发布新功能、修复 bug以及迅速整合新的变化方面遇到了困难。因此他们决定改用微服务并将应用程序结构拆分为基于云的微服务。换句话说Uber 为每个功能创建了一个微服务,比如乘客管理和出行管理。转向微服务给 Uber 带来了很多好处,比如对每项服务的所有权都有一个清晰的概念。这提高了服务访问的速度和质量,通过允许团队只关注他们需要扩展的服务,在更新虚拟服务的同时而不中断其他服务,实现了更可靠的容错,从而促进了快速扩展[^11]。
### 这就是可扩展性!
关于如何提供可伸缩性的一个很好的例子是看看中国。中国人口众多,必须通过创造和试验新的解决方案来适应规模化的新挑战。统计数据显示,中国目前为大约 9 亿互联网用户提供服务[^14]。2019 年“双十一”期间(相当于国外的黑色星期五),阿里巴巴旗下各购物平台的交易峰值为每秒 544000 笔交易。阿里云处理的数据总量约为 970 PB[^15]。那么,这些数量的用户在技术上意味着什么呢?
为了解决可伸缩性问题,许多技术应运而生。例如,[Tars][2] 由腾讯于 2008 年创建,[2018 年贡献给 Linux 基金会][3]。它也在被大规模使用,并在 10 年内得到了很大的提升[^12]。TARS 是开源的,许多组织都在大力贡献和扩展框架的特性和价值[^12]。TARS 支持多种编程语言,包括 C++、Golang、java、node.js、PHP 和 Python它可以快速构建系统并自动生成代码使开发人员能够专注于业务逻辑从而有效地提高操作效率。TARS 已广泛应用于腾讯的 QQ、微信社交网络、金融服务、边缘计算、汽车、视频、网络游戏、地图、应用市场、安全等诸多核心业务。[在 2020 三月TARS 项目转变为 TARS 基金会][4],这是一个开源微服务基金会,在建立开放式微服务平台的社区方面中,致力于提升社区贡献和成员的快速增长[^12]。
**一定要看看 Linux 基金会新的免费培训课程**:《[用 TARS 构建微服务平台][5]》
*关于作者:*
*Isabella Ferreira 是 Linux 基金会旗下的开源微服务基金会 TARS 基金会的布道师*
*Mark Shan单致豪是腾讯开源联盟的主席也是 TARS 基金会的董事会主席。*
[^1]: https://tsh.io/state-of-microservices/#ebook
[^2]: https://medium.com/hashmapinc/the-what-why-and-how-of-a-microservices-architecture-4179579423a9
[^3]: https://www.plutora.com/blog/understanding-microservices
[^4]: https://www.leanix.net/en/blog/a-brief-history-of-microservices
[^5]: https://www.charterglobal.com/five-microservices-trends-in-2020/
[^6]: https://martinfowler.com/articles/microservices.html#footnote-etymology
[^7]: https://whatis.techtarget.com/definition/monolithic-architecture
[^8]: https://ycharts.com/companies/AMZN/market_cap
[^9]: https://thenewstack.io/led-amazon-microservices-architecture/
[^10]: https://media.netflix.com/en/company-blog/completing-the-netflix-cloud-migration
[^11]: https://blog.dreamfactory.com/microservices-examples/
[^12]: https://www.linuxfoundation.org/blog/2020/03/the-tars-foundation-the-formation-of-a-microservices-ecosystem/
[^13]: https://medium.com/microservices-architecture/top-10-microservices-framework-for-2020-eefb5e66d1a2
[^14]: https://www.statista.com/statistics/265140/number-of-internet-users-in-china/
[^15]: https://interconnected.blog/china-scale-technology-sandbox/
> 本篇 Linux 基金会白金赞助商内容由腾讯贡献。
--------------------------------------------------------------------------------
via: https://www.linux.com/news/the-state-of-the-art-of-microservices-in-2020/
作者:[Linux.com][a]
选题:[lujun9972][b]
译者:[zhangxiangping](https://github.com/zxp93)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.linux.com/author/linuxdotcom/
[b]: https://github.com/lujun9972
[1]: https://www.linux.com/wp-content/uploads/2020/11/microservices_diagram_a.png
[2]: https://tarscloud.org/foundation/index
[3]: https://www.linuxfoundation.org/press-release/2018/06/tars-and-tseer-form-open-source-project-communities-under-the-linux-foundation-to-expand-adoption-and-pace-of-development/
[4]: https://www.linuxfoundation.org/blog/2020/03/the-tars-foundation-the-formation-of-a-microservices-ecosystem/
[5]: https://www.edx.org/course/building-microservice-platforms-with-tars

View File

@ -1,20 +1,22 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12942-1.html)
[#]: subject: (Why Java developers love the jEdit text editor)
[#]: via: (https://opensource.com/article/20/12/jedit)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
为什么 Java 开发者喜欢 jEdit 文本编辑器
======
这款编辑器打包了 Java 的功能,并提供了大量的插件来简化你的工作流程。
![Person drinking a hot drink at the computer][1]
Java 是一门强大的语言。也许因为它经常被看作是一种“工业级”的工具,你可能不会想到它会成为文本编辑器的基础。毕竟,对于如此能力,文本编辑几乎是太容易了。事实上,在大多数现代编程工具包中,接受文本输入的组件是一个预编程的小部件。使用 Java 工具箱,一个简单的文本编辑器可以在 100 行左右的代码中编写出来。那么 [jEdit][2] 能提供什么来证明它的存在呢?
> 这款编辑器打包了 Java 的功能,并提供了大量的插件来简化你的工作流程。
实际上它有很多功能jEdit 应用是一个令人耳目一新的提醒,提醒人们 Java 对于日常桌面应用是多么的实用和有用。它巧妙地展示了它的基础技术的活力,并且永远忠于 Java 的持久承诺在_所有_的平台上都能使用。
![](https://img.linux.net.cn/data/attachment/album/202012/22/133305j08dxrqx2fmp6s12.jpg)
Java 是一门强大的语言。也许因为它经常被看作是一种“工业级”的工具,你可能不会想到它会成为文本编辑器的基础。毕竟,对于如此能力,文本编辑几乎是太容易了。事实上,在大多数现代编程工具包中,接受文本输入的组件是一个预编程的小部件。使用 Java 工具箱,一个简单的文本编辑器可以用 100 行左右的代码编写出来。那么 [jEdit][2] 能提供什么来证明它的存在价值呢?
实际上它有很多功能jEdit 应用是一个令人耳目一新的提醒,提醒人们 Java 对于日常桌面应用是多么的实用和有用。它巧妙地展示了它的基础技术的活力,并且永远忠于 Java 的永恒承诺,在*所有*的平台上都能运作。
### 安装 jEdit
@ -24,9 +26,9 @@ jEdit 是用 Java 编写的,所以它适用于任何平台。[下载][3]通用
### 使用 jEdit
在 jEdit 中编辑文本的方式和在任何桌面文本编辑器中编辑文本的方式是一样的。如果你使用过一个编辑器,那么你基本上已经使用 jEdit。所有常用的键盘快捷键和惯例都适用。也有一些通常针对编码者的功能,如行号、折叠(文本的部分被隐藏,这样你就可以把注意力放在其他部分)和语法高亮。
在 jEdit 中编辑文本的方式和在任何桌面文本编辑器中编辑文本的方式是一样的。如果你使用过编辑器,那么你基本上已经使用 jEdit。所有常用的键盘快捷键和惯例都适用。也有一些通常针对开发者的功能,如行号、折叠(该部分文本被隐藏,这样你就可以把注意力放在其他部分)和语法高亮。
但是,想象一下,从 [Vim 的简单性][6]到 [Emacs 的复杂性][7]的文本编辑器,你会发现 jEdit 与 Emacs 类似。虽然编辑组件和任何典型桌面编辑应用一样,但 jEdit 的附加功能包括插件、可以在编辑会话中实时录制的宏、特定编辑模式的功能、缓冲区选项等。这是一个积极鼓励你把它变成你自己的编辑器。
但是,想象一下,从 [简单的 Vim][6] 到 [复杂的 Emacs][7]的各种文本编辑器,你会发现 jEdit 与 Emacs 类似。虽然编辑组件和任何典型桌面编辑应用一样,但 jEdit 的附加功能包括插件、可以在编辑会话中实时录制的宏、特定于某些编辑模式的功能、缓冲区选项等。这是一个积极鼓励你把它变成你自己的编辑器。
你可以在三个地方对 jEdit 进行自定义:缓冲区选项、全局选项和插件管理器。
@ -34,15 +36,15 @@ jEdit 是用 Java 编写的,所以它适用于任何平台。[下载][3]通用
全局选项(在 “Utilities” 菜单中)提供了数十种首选项,这些首选项被视为 jEdit 的默认值。这包括从外观到自定义快捷方式的所有内容。
插件扩展了 jEdit 的功能,实际上,它的开发者从未想过要这样。插件提供的工作方式对 jEdit 而言并非“常”,但可能会将繁琐的任务转变为简单甚至有趣的事情。它以其出色的 XML 解析、可停靠 _Sidekick_ 面板中的 _Outline_ 插件和 XSLT 集成,实际上改变了 XML 工作流程。如果我还没有使用 Netbeans 来编写 Java 代码,我可以想象使用 jEdit 来代替。
插件可以扩展出来 jEdit 的开发者从未想过的功能。插件提供的工作方式对 jEdit 而言并非“常”,但可能会将繁琐的任务转变为简单甚至有趣的事情。它以其出色的 XML 解析、可停靠 Sidekick 面板中的 Outline 插件和 XSLT 集成,实际上改变了 XML 工作流程。如果我不是已经使用了 Netbeans 来编写 Java 代码,我想我可以使用 jEdit 来代替。
### 面向程序员的 jEdit
选择哪种文本编辑器取决于你打算在编辑器中做的事。它称自己为“程序员的文本编辑器”,并且我认为它是认真的 Java 和 XML 工作的有力竞争者。但是,在编辑 Lua 代码和 Bash 脚本时,它的功能不尽相同。例如,与 Emacs 之类相比jEdit 的代码折叠不那么灵活(我无法在没有附加标记的情况下折叠 Lua 函数)。尽管确实有丰富的插件选择,但我找不到能在 AsciiDoc 和其他非代码格式下工作的特别有说服力的东西。
选择哪种文本编辑器取决于你打算在编辑器中做的事。它称自己为“程序员的文本编辑器”,并且我认为它是严肃的 Java 和 XML 开发的有力竞争者。但是,在编辑 Lua 代码和 Bash 脚本时,它的功能不就没有这么强了。例如,与 Emacs 之类相比jEdit 的代码折叠不那么灵活(我无法在没有附加标记的情况下折叠 Lua 函数)。尽管确实有丰富的插件选择,但我找不到用于 AsciiDoc 和其他非代码格式工作的特别有说服力的东西。
对我来说jEdit 最吸引人的特点是它是以 Java 为基础。因为它在 JVM 中运行,所以你可以有信心可以使用它而无论你使用的平台是什么也可以不管你是否有权限在自己的主目录之外安装应用。Java 是一种流行且活跃的语言,因此 jEdit 的功能和插件维护得很好。
对我来说jEdit 最吸引人的特点是它是以 Java 为基础。因为它在 JVM 中运行,所以你可以确信能够使用它而无论你使用的平台是什么也可以不管你是否有权限在自己的主目录之外安装应用。Java 是一种流行且活跃的语言,因此 jEdit 的功能和插件维护得很好。
如果你是一的忠实拥护者、Java 开发人员,或者只是 XML 极客而拼命试图摆脱 oXygen那么你应该试试 jEdit。它很容易上手并且探索起来很有趣。
如果你是一致性的忠实拥护者、Java 开发人员,或者只是 XML 极客而拼命试图摆脱 oXygen那么你应该试试 jEdit。它很容易上手并且探索起来很有趣。
--------------------------------------------------------------------------------
@ -51,7 +53,7 @@ via: https://opensource.com/article/20/12/jedit
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
@ -60,7 +62,7 @@ via: https://opensource.com/article/20/12/jedit
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hot drink at the computer)
[2]: http://jedit.org
[3]: http://www.jedit.org/index.php?page=download
[4]: https://opensource.com/article/19/11/install-java-linux
[4]: https://linux.cn/article-11614-1.html
[5]: http://adoptopenjdk.org
[6]: https://opensource.com/article/20/12/vi-text-editor
[7]: https://opensource.com/article/20/12/emacs
[7]: https://linux.cn/article-12923-1.html

View File

@ -1,115 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Why Vim users will love the Kakoune text editor)
[#]: via: (https://opensource.com/article/20/12/kakoune)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
Why Vim users will love the Kakoune text editor
======
This editor may be reminiscent of Vim, but it offers plenty of its own
unique functions and features.
![Typewriter keys in multicolor][1]
The [Kakoune][2] text editor takes inspiration from Vi. With a minimalistic interface, short keyboard shortcuts, and separate editing and insert modes, it does [look and feel a lot like Vi][3] at first. However, the Kakoune editor has its own unique style both in design and function and is better considered its own editor rather than yet another Vim.
### Install
On Linux and BSD, you can install Kakoune from your distributions software repository or ports tree. For example, on Fedora, CentOS, or RHEL:
```
`$ sudo dnf install kakoune`
```
On Debian, Ubuntu, or similar:
```
`$ sudo apt install kakoune`
```
On macOS, you can use Homebrew:
```
`$ brew install kakoune`
```
Alternatively, you can [build it from source code][4].
The command to start Kakoune is `kak`. You can start Kakoune empty, or you can include a file name for it to open upon launch:
```
`$ kak example.txt`
```
### Using Kakoune
When you launch Kakoune (without a file name), it opens a mostly empty buffer in your terminal, except for a small status bar at the bottom of the windows. Like Vim, Kakoune starts in "normal" mode, which accepts key presses as commands and does not enter text into the buffer. To enter _insert_ mode, you must press either **i** (for **insert**) or **a** (for **append**).
While in insert mode, Kakoune acts mostly like any other editor. You type on your keyboard, and the characters you type show up in the buffer. While in insert mode, you can use the arrow keys to navigate through the buffer.
### Normal mode
In normal mode, you can issue navigation and text editing commands. This is the most obvious borrowed feature from the Vi tradition. Editing commands include functions to copy, cut (or "yank," in traditional Unix editing vernacular), and paste words and lines, undo, transform characters to upper or lower case, and so on. Here are some of the basics:
* **d**: yank and delete current selection ("cut" in modern terminology)
* **c**: yank and delete current selection and enter insert mode
* **Esc+Alt+d**: delete current selection
* **y**: yank selection
* **p**: paste
* **&lt;**: unindent selected lines
* **u**: undo
* **U**: redo
* **`**: transform to lower case
* **~**: transform to upper case
### Selection
In Kakoune, your cursor is a single-character mobile selection. Unless you extend your selection, any commands affecting a selection apply to just your cursor. For instance, if your cursor is hovering over the letter **n**, then the yank command (**c** in normal mode) copies the letter **n** to your clipboard, and the paste command (**p** in normal mode) pastes the letter **n** into the buffer.
The easiest way to extend a selection from a single character is to enter normal mode and press the **Shift** key while moving your cursor with the arrow keys. There are, however, several methods of extending a selection based on certain criteria. For instance, **Alt+l** extends a selection region from your cursor to the end of the current line.
Full documentation is available at <https://github.com/mawww/kakoune/blob/master/README.asciidoc>.
### Functions
In addition to these basic interactions, you can also issue commands to invoke the built-in functions of Kakoune. To access the Kakounes command line, type `:` in normal mode. From the command line, you can issue commands, including the essential **edit** command to open a file, the **write** command to save your buffer to a file, and of course, **quit** to exit the application.
There are many more functions, including special options for specific programming languages and file formats, an option to use the [Ranger file navigator][5] to browse your file system, change your color theme, search and replace text, and much more.
![Kakoune][6]
### Try Kakoune
If youre an experienced Vim user or even someone with just a passing competency, you might find Kakoune disorienting at first. Its just similar enough to Vim to lull you into a false sense of familiarity—everything works exactly like Vim until its drastically different. However, if youre new to Vim-like editors, or youre a Vim user looking for a new challenge, then Kakoune could be an ideal editor for you.
Try it for yourself!
When I started using the vi text editor, I hated it. Now I've been using vi for more than 17 years...
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/12/kakoune
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-docdish-typewriterkeys-3.png?itok=NyBwMdK_ (Typewriter keys in multicolor)
[2]: https://kakoune.org/
[3]: https://opensource.com/article/20/12/vi-text-editor
[4]: https://github.com/mawww/kakoune
[5]: https://opensource.com/article/20/3/ranger-file-navigator
[6]: https://opensource.com/sites/default/files/kakoune-screenshot.png (Kakoune)

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -0,0 +1,117 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (4 cool new projects to try in COPR from December 2020)
[#]: via: (https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-from-december/)
[#]: author: (Jakub Kadlčík https://fedoramagazine.org/author/frostyx/)
4 cool new projects to try in COPR from December 2020
======
![][1]
COPR is a [collection][2] of personal repositories for software that isnt carried in Fedora. Some software doesnt conform to standards that allow easy packaging. Or it may not meet other Fedora standards, despite being free and open-source. COPR can offer these projects outside the Fedora set of packages. Software in COPR isnt supported by Fedora infrastructure or signed by the project. However, it can be a neat way to try new or experimental software.
This article presents a few new and interesting projects in COPR. If youre new to using COPR, see the [COPR User Documentation][3] for how to get started.
## [][4] Blanket
[Blanket][5] is an application for playing background sounds, which may potentially improve your focus and increase your productivity. Alternatively, it may help you relax and fall asleep in a noisy environment. No matter what time it is or where you are, Blanket allows you to wake up while birds are chirping, work surrounded by friendly coffee shop chatter or distant city traffic, and then sleep like a log next to a fireplace while it is raining outside. Other popular choices for background sounds such as pink and white noise are also available.
![][6]
### [][7] Installation instructions
The [repo][8] currently provides Blanket for Fedora 32 and 33. To install it, use these commands:
```
sudo dnf copr enable tuxino/blanket
sudo dnf install blanket
```
## [][9] k9s
[k9s][10] is a command-line tool for managing Kubernetes clusters. It allows you to list and interact with running pods, read their logs, dig through used resources, and overall make the Kubernetes life easier. With its extensibility through plugins and customizable UI, _k9s_ is welcoming to power-users.
![][11]
For [many more preview screenshots][12], please see the [project page][10].
### [][13] Installation instructions
The [repo][14] currently provides _k9s_ for Fedora 32, 33, and Fedora Rawhide as well as EPEL 7, 8, Centos Stream, and others. To install it, use these commands:
```
sudo dnf copr enable luminoso/k9s
sudo dnf install k9s
```
## [][15] rhbzquery
[rhbzquery][16] is a simple tool for querying the Fedora Bugzilla instance. It provides an interface for specifying the search query but it doesnt list results in the command-line. Instead, _rhbzquery_ generates a Bugzilla URL and opens it in a web browser.
![][17]
### [][18] Installation instructions
The [repo][19] currently provides *rhbzquery *for Fedora 32, 33, and Fedora Rawhide. To install it, use these commands:
```
sudo dnf copr enable petersen/rhbzquery
sudo dnf install rhbzquery
```
## [][20] gping
[gping][21] is a more visually intriguing alternative to the standard _ping_ command, as it shows results in a graph. It is also possible to ping multiple hosts at the same time to easily compare their response times.
![][22]
### [][23] Installation instructions
The [repo][24] currently provides gping for Fedora 32, 33, and Fedora Rawhide as well as for EPEL 7 and 8. To install it, use these commands:
```
sudo dnf copr enable atim/gping
sudo dnf install gping
```
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-from-december/
作者:[Jakub Kadlčík][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://fedoramagazine.org/author/frostyx/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2017/08/4-copr-945x400.jpg
[2]: https://copr.fedorainfracloud.org/
[3]: https://docs.pagure.org/copr.copr/user_documentation.html
[4]: https://github.com/FrostyX/fedora-magazine/blob/main/2020-december.md#blanket
[5]: https://github.com/rafaelmardojai/blanket
[6]: https://github.com/FrostyX/fedora-magazine/raw/main/img/blanket.png
[7]: https://github.com/FrostyX/fedora-magazine/blob/main/2020-december.md#installation-instructions
[8]: https://copr.fedorainfracloud.org/coprs/tuxino/blanket/
[9]: https://github.com/FrostyX/fedora-magazine/blob/main/2020-december.md#k9s
[10]: https://k9scli.io/
[11]: https://github.com/FrostyX/fedora-magazine/raw/main/img/k9s.png
[12]: https://k9scli.io/#-previews
[13]: https://github.com/FrostyX/fedora-magazine/blob/main/2020-december.md#installation-instructions-1
[14]: https://copr.fedorainfracloud.org/coprs/luminoso/k9s/
[15]: https://github.com/FrostyX/fedora-magazine/blob/main/2020-december.md#rhbzquery
[16]: https://github.com/juhp/rhbzquery
[17]: https://github.com/FrostyX/fedora-magazine/raw/main/img/rhbzquery.png
[18]: https://github.com/FrostyX/fedora-magazine/blob/main/2020-december.md#installation-instructions-2
[19]: https://copr.fedorainfracloud.org/coprs/petersen/rhbzquery/
[20]: https://github.com/FrostyX/fedora-magazine/blob/main/2020-december.md#gping
[21]: https://github.com/orf/gping
[22]: https://github.com/FrostyX/fedora-magazine/raw/main/img/gping.png
[23]: https://github.com/FrostyX/fedora-magazine/blob/main/2020-december.md#installation-instructions-4
[24]: https://copr.fedorainfracloud.org/coprs/atim/gping

View File

@ -0,0 +1,82 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (5 open source security practices from 2020)
[#]: via: (https://opensource.com/article/20/12/security)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
5 open source security practices from 2020
======
Here are manageable ways to keep your systems and data safe and secure.
![Lock][1]
Few of us really want to read articles about security. They're usually uncomfortable (and overwhelming) reminders of the things we aren't doing to keep our data safe and secure. Luckily for us, this year, Opensource.com authors specifically focused on writing about manageable security tasks. Some are afternoon projects, while others are small steps you can take to improve your default security settings.
Here are 13 of our favorites.
### Encryption
How often have you watched a talk or read something about cryptography that is either so theoretical that it is hard to understand or so high-level that you don't have a concrete example to build on its themes? In _[Never forget your password with this Python encryption algorithm][2],_ Moshe Zadka gives us the best of both worlds: theory and application. Check it out!
We live in an increasingly complex world where we often need to manage several calendars at once. We have our work calendar, our kids' school and activity calendars, our personal appointments, sports and TV schedules… and, if you're using CalDAV, managing all of those calendars could put your security and privacy at risk. Ivan Kupalov explains how to avoid these risks in [_How to replace CalDAV with a secure calendar protocol_][3].
Mike Bursell introduces Enarx, a new "application deployment system enabling applications to run within Trusted Execution Environments (TEEs) without rewriting for particular platforms or SDKs." In [_Why we open sourced our security project_][4], Mike explains why he and his co-developer decided to make the project open source.
### Email infrastructure
Here's a bargain for you—two articles for the price of one: Free! Victor Lopes and Marc Skinner explain how SSL can help secure your email solutions. Victor's [_Eliminate spam using SSL with an open source certification authority_][5] introduces MailCleaner as an open source anti-spam solution for your email infrastructure, and Marc's [_How to secure your Linux email services with SSL/TLS_][6] walks through enabling SSL/TLS between email endpoints.
You may not have needed to manage SSL certificates before, but you've surely been affected by them. As a user, you've probably gotten an error message on your browser or experienced an outage on a favorite online service. As a system administrator, it's your responsibility to minimize or eliminate these experiences for customers. In [_Manage your SSL certificates with the ssl-on-demand script_][7], Abhishek Tamrakar offers some ideas on managing these certs and avoiding guaranteed headaches if you ignore them.
### Firewalls
If firewalls are one of your responsibilities (and they probably are), Seth Kenlon has you covered. First, he introduces _[Getting started with Linux firewalls][8],_ and then he takes a deeper dive into more advanced capabilities of firewalld in _[Open ports and route traffic through your firewall][9]._
### Vulnerability management
WordPress is by far the [most popular][10] web content management system, making it a popular target for cyber threats. Therefore, it is imperative that system administrators keep WordPress installations secure, and Lucy Carney offers [_6 tips for securing your WordPress website_][11] to help you do so.
Two words you often hear in security are hardening and compliance. In fact, the process of securing your system can also be called "hardening," and depending on your industry, internal or external parties (e.g., your infosec team or a government regulatory agency) may require you to "harden" your system to a minimum security level. Lynis is a tool that will help you achieve that level and audit its capabilities. Gaurav Kamathe's [_Scan your Linux security with Lynis_][12] will help you get started with it.
After you read Gaurav's article, Ari Noman's [_Use this command-line tool to find security flaws in your code_][13] will help you take the principles of hardening to the code level by using the Graudit tool to uncover programming flaws and code vulnerabilities.
### Identity management
Will you do me a favor? Before you continue reading, turn on two-factor authentication (2FA) in all of your accounts. Everywhere! And if your organization is looking for an open source solution to produce multi-factor authentication (MFA) in your services, look no further than privacyIDEA. Find out more in Cornelius Kölbel's [_Open source alternative for multi-factor authentication: privacyIDEA_][14].
In _[Protect your network with open source tools][15],_ Chantale Benoit introduces a couple of open source security tools under the Apache Foundation umbrella. They are Syncope, "an open source system for managing digital identities in an enterprise environment," and Metron, an "advanced security analytics framework that detects cyber anomalies, such as phishing activity and malware infections."
### Living a security lifestyle
Security is an ongoing practice. As these articles demonstrate, good security is something you integrate into your life and into your code. Give them all a read, and see what you can do to improve your digital security over the coming year.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/12/security
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/security-lock-password.jpg?itok=KJMdkKum (Lock)
[2]: https://opensource.com/article/20/6/python-passwords
[3]: https://opensource.com/article/20/3/caldav-security
[4]: https://opensource.com/article/20/8/why-open-source
[5]: https://opensource.com/article/20/6/secure-open-source-antispam
[6]: https://opensource.com/article/20/4/securing-linux-email
[7]: https://opensource.com/article/20/2/ssl-demand
[8]: https://opensource.com/article/20/2/firewall-cheat-sheet
[9]: https://opensource.com/article/20/9/firewall
[10]: https://w3techs.com/technologies/overview/content_management
[11]: https://opensource.com/article/20/4/wordpress-security
[12]: https://opensource.com/article/20/5/linux-security-lynis
[13]: https://opensource.com/article/20/8/static-code-security-analysis
[14]: https://opensource.com/article/20/3/open-source-multi-factor-authentication
[15]: https://opensource.com/article/20/10/apache-security-tools

View File

@ -0,0 +1,97 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Try a text editor inspired by Notepad++)
[#]: via: (https://opensource.com/article/20/12/notepad-text-editor)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
Try a text editor inspired by Notepad++
======
Classic notepads are reliable and familiar, and the new, improved
versions offer endless plugins to customize your experience.
![Writing Hand][1]
If you look online for great open source text editors, youre bound to come across [Notepad++][2]. An enduring and popular editor, Notepad++ is built only for Windows. I use the open source operating system [Linux][3] but was nevertheless curious to experience Notepad++. Fortunately for me, I discovered one way to try Notepad++ (yes, its WINE) and one way to approximate it.
### Running Notepad++ in WINE
It seemed like a crazy idea at one time, but long ago, a group of developers wondered whether they could reverse engineer the system-level libraries that made Windows work and then release them as open source software. Thats what WINE is—a rewrite of the core components of Windows, allowing many Windows applications to run on Linux.
Its a staggering achievement and one that has, among other things, helped the ReactOS project launch a Windows-like open source operating system, Valve Software to create Steam Play for running Windows games on Linux, and people who are over-curious about text editors to try Notepad++.
There are two steps involved in this process:
1. Install WINE on Linux from your software repository.
2. Download the [Notepad++ EXE installer][4]. With WINE, you can launch it like a native application, and install Notepad++ to your system.
### Winetricks
Alternatively, you can use Winetricks to install applications, Notepad++ included. Winetricks is a shell script with tried-and-tested build scripts for dozens upon dozens of applications, games, fonts, and more. You can probably install Winetricks from your distribution's software repository. If it's not available, then you can download it yourself:
```
$ mkdir ~/bin
$ cd ~/bin
$ wget  <https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks>
$ chmod +x winetricks
$ ./winetricks
```
Winetricks is a simple menu-driven application. Find **npp** ("Notepad plus plus") in the **Install applications** menu selection.
![Winetricks][5]
There are a few things to get used to when using applications on Linux that believe theyre running on Windows, but nothing serious. You have to get used to the idea of hard drive locations designated by letters, and you might want to download and install some Windows themes to help your WINE environment feel better integrated with the rest of your system. Once youve used Notepad++ running on WINE, you quickly forget WINE is involved at all.
![Notepad++ running in WINE on Linux][6]
### Running Notepadqq
Theres no affiliation between Notepadqq and Notepad++, except that the former takes inspiration from the latter. Theyre not identical applications, but if youre a casual fan of the original, then you might find Notepadqq a suitable native replacement.
Notepadqq is easy to [install as a Flatpak][7] on Linux or a Chromebook. Alternately, you can [download and compile it from its source code][8]. Some support is provided for [compiling on MacOS][9], too.
![screenshot of black notepad terminal with white lettering][10]
### Notepad (improved)
Regardless of how you satiate your Notepad improved hunger, youll be pleased to find you have a responsive, customizable, and extensible editor. Both applications provide syntax highlighting for around 80 programming languages and text formats, including C, C++, Java, Python, Javascript, Lua, [Markdown][11], RPM spec files, and [YAML][12].
They also both use the concept of a session, or sets of files opened in your Notepad editor, which you can save and reload as needed. Using sessions helps you organize your work into projects.
Both Notepad applications can be extended through plugins. Notepad++ features a Plugins Admin panel, where you can browse through available plugins. Notepadqq doesnt have the years of development that Notepad++ has had, and accordingly, doesnt seem to have the abundance of available extensions. However, you can [develop your own using Node.js][13].
### Try a Notepad (improved)
Whether you stick with the classic Notepad++ or venture into the newer Notepadqq, youre bound to find satisfaction with these reliable editors. They give you the features you expect for efficient text editing and the access you need so you can hack together your own extensions. These are both fun, reliable, and dependable projects, so give one (or both) a try today!
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/12/notepad-text-editor
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/write-hand_0.jpg?itok=Uw5RJD03 (Writing Hand)
[2]: https://notepad-plus-plus.org
[3]: http://opensource.com/resources/what-linux
[4]: https://notepad-plus-plus.org/downloads/
[5]: https://opensource.com/sites/default/files/winetricks.png (Winetricks)
[6]: https://opensource.com/sites/default/files/npp.png (Notepad++ running in WINE on Linux)
[7]: https://flathub.org/apps/details/com.notepadqq.Notepadqq
[8]: https://github.com/notepadqq/notepadqq
[9]: https://github.com/notepadqq/notepadqq/wiki/Compiling-Notepadqq-on-macOS
[10]: https://opensource.com/sites/default/files/uploads/notepad-31_days-notepad-opensource.png (screenshot of black notepad terminal with white lettering)
[11]: https://opensource.com/article/19/9/introduction-markdown
[12]: https://www.redhat.com/sysadmin/yaml-beginners
[13]: https://github.com/notepadqq/notepadqq/wiki/How-to-write-an-extension-with-Node.js

View File

@ -0,0 +1,103 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Font Manager: A Simple Open-Source App for GTK+ Desktop)
[#]: via: (https://itsfoss.com/font-manager/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
Font Manager: A Simple Open-Source App for GTK+ Desktop
======
_**Brief: A dead simple font manager app that lets you focus on tweaking the fonts on your Linux system.**_
If you are an experienced Linux user, you might be utilizing the terminal or the [tweak tool][1] to manage fonts on your Linux system.
Honestly, no matter how useful the GNOME tweak tool is — it could be a little too overwhelming just to manage fonts. So, a separate application would be perfectly fine to help you manage fonts.
### Font Manager: An Open-Source App To Help Manage Fonts
![][2]
Font Manager (thats literally the name of the app) is a dedicated application to help you manage the fonts.
You get the details of the font family, variations available, and the ability to filter and tweak based on their height, width, spacing, and more. Considering it is a simple app, you do not find a bunch of features but Ill briefly highlight a few things below.
### Features of Font Manager
![][3]
* Ability to add fonts
* Ability to remove fonts
* Easily filter fonts based on family, vendor, spacing, height, etc
* Tweak the scaling factor of fonts
* Adjust the anti-aliasing (softness/sharpness) of the font
* Add font sources to preview them before installing it
* Offers keyboard shortcuts to quickly manage things
* Google fonts integration available out-of-the-box
* Get detailed information on characters available in the family font, license, size of the font, vendor, file type, spacing, width, and style
![][4]
Overall, you can easily install or remove fonts. But, you get quite a few perks while managing the fonts as shown in the screenshot above.
### Installing Font Manager on Linux
You get a variety of options (depending on the Linux distro you use) for installation.
If you have an Ubuntu-based distro, you can easily add the PPA through the commands below to install font manager:
```
sudo add-apt-repository ppa:font-manager/staging
sudo apt update
sudo apt install font-manager
```
In case youre not a fan of [PPAs][5] (which is how I prefer to install this), you can also install a [Flatpak package available][6] on any Linux distribution.
You just need to enable Flatpak on your Linux system and then search for it on your software center (if it supports Flatpak integration) or just type in the following command to install it:
```
flatpak install flathub org.gnome.FontManager
```
In case youre an Arch user, you can find the [package][7] in the [AUR][8].
For further installation instructions, you might want to refer its [official website][9] and the [GitHub page][10].
[Download Font Manager][9]
### Wrapping Up
Font Manager is a simple solution for any GTK+ based desktop environment. Primarily for GNOME but you can also utilize it for other desktop environments as well.
You get a lot of useful information while being able to add or remove fonts and it is clearly a no-nonsense font manager, I think.
What do you think about Font Manager? Let me know your thoughts in the comments below!
--------------------------------------------------------------------------------
via: https://itsfoss.com/font-manager/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/gnome-tweak-tool/
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/12/font-manager.png?resize=800%2C565&ssl=1
[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/12/font-manager-settings.jpg?resize=800%2C569&ssl=1
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/12/font-manager-showcase.png?resize=800%2C571&ssl=1
[5]: https://itsfoss.com/ppa-guide/
[6]: https://flathub.org/apps/details/org.gnome.FontManager
[7]: https://aur.archlinux.org/packages/font-manager/
[8]: https://itsfoss.com/aur-arch-linux/
[9]: https://fontmanager.github.io/
[10]: https://github.com/FontManager/font-manager

View File

@ -0,0 +1,150 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to Automatically Accept SSH Key Fingerprint?)
[#]: via: (https://www.2daygeek.com/how-to-automatically-accept-ssh-key-fingerprint/)
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
How to Automatically Accept SSH Key Fingerprint?
======
**[SSH Secure Shell][1]** is an encryption network protocol that provides secure encrypted communications between two hosts.
It allows you to connect to a remote machine securely over an insecure network.
When you connect to a Linux system for the first time, SSH prompts you to accept the fingerprint of the machines to successfully establish the connection, since you do not have a fingerprint in your **“known_hosts”** file.
Fingerprint is a shortened version of the systems public key.
To protect yourself from Man-in-the-Middle Attack (MITM), the ssh program verifies the fingerprint of the remote system ssh with the fingerprint stored since it was last connected.
If the fingerprint has changed you will be alerted and asked if you would like to proceed. Otherwise, you will be allowed to log in directly.
But sometimes you may need to accept SSH fingerprint automatically.
For instance, if you created a **[shell script][2]** to run against multiple machines to pull a report.
**Make a Note:** You are effectively bypassing SSH intended security through the methods below. It is less dangerous when using it on the internal network, but it is not advisable to use it on the public Internet or other untrusted networks.
This can be done using the following two methods.
* Automatically accept an ssh fingerprint using the “StrictHostKeyChecking=no” option with the ssh command
* Auto accepts an ssh fingerprint using the ssk-keycan command
When you connect to a remote computer for the first time, you will be warned that the authenticity of the host cannot be established and presented with a key fingerprint to verify.
```
$ ssh [email protected]
The authenticity of host '192.168.1.4 (192.168.1.4)' can't be established.
ECDSA key fingerprint is 6a:75:e3:ac:5d:f8:cc:04:01:7b:ef:4d:42:ad:b9:83.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.1.4' (ECDSA) to the list of known hosts.
[email protected]'s password:
Last login: Mon Dec 14 14:16:51 2020 from 192.168.1.6
```
Once you accept the fingerprint, it will be saved in the “known_hosts” file.
When reconnecting to the same remote host, SSH checks the fingerprint against the known_host file to verify its identity.
If this matches, you will be allowed direct access to the system as long as the key remains intact.
You will see the following warning if the fingerprint does not match the known_hosts. This happens if the host public key changes for some reason.
If you see the warning below, double-check that you are actually connecting with the right host on a secure connection. Although most of the time it is harmless, it can be an indication of a potential issue.
```
$ ssh [email protected]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
6a:75:e3:ac:5d:f8:cc:04:01:7b:ef:4d:42:ad:b9:83.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:1
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
********************************************************
Permission denied (publickey,password,keyboard-interactive).
```
### 1) How to Automatically Accept SSH Key Fingerprint Using SSH Option?
This method is simple and straight forward, to achieve this only need to add an option with SSH command.
When you use this option, ssh will automatically add a new host key to the user known_host file and allow it to host connections with modified hostkeys to connect to the remote system.
```
$ ssh -o "StrictHostKeyChecking no" 192.168.1.5
Warning: Permanently added 'centos7,192.168.1.5' (ECDSA) to the list of known hosts.
ok
```
However, the above warning shows that it has added a key to the known_host file.
### 2) How to Automatically Accept SSH Key Fingerprint Using ssk-keyscan Command?
This is another method, it is very simple. The ssh-keycan tool allows you to append the ssh key fingerprint to the user-known_host file on the remote server.
This tool is very useful when you want to add bulk.
This command must be inserted into the shell script before calling the actual command in the script.
Use the following format to add the ssh key fingerprint to a remote host.
```
$ ssh-keyscan -H 192.168.1.4 >> ~/.ssh/known_hosts
#centos:22 SSH-2.0-OpenSSH_7.4
```
Use the following format to add the ssh key fingerprint to multiple hosts.
To do so, you must add the remote hosts details to a file and call it with the ssh-keycan command as follows. For example, I added five hosts to the **“remote-hosts.txt”** file.
You can use any text editor to add entries. I recommend you to use **[vim editor][3]**, the most flexible and powerful text editor widely used by Linux administrators and developers.
```
# vi remote-hosts.txt
192.168.1.2
192.168.1.3
192.168.1.4
192.168.1.5
192.168.1.6
```
If yes, the ssh-keyscan command would be as follows.
```
$ ssh-keyscan -f /tmp/remote-hosts.txt >> ~/.ssh/known_hosts
#centos:22 SSH-2.0-OpenSSH_7.4
#centos:22 SSH-2.0-OpenSSH_7.4
#centos:22 SSH-2.0-OpenSSH_7.4
#centos:22 SSH-2.0-OpenSSH_7.4
#centos:22 SSH-2.0-OpenSSH_7.4
```
--------------------------------------------------------------------------------
via: https://www.2daygeek.com/how-to-automatically-accept-ssh-key-fingerprint/
作者:[Magesh Maruthamuthu][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.2daygeek.com/author/magesh/
[b]: https://github.com/lujun9972
[1]: https://www.2daygeek.com/category/ssh-tutorials/
[2]: https://www.2daygeek.com/category/shell-scripts/
[3]: https://www.2daygeek.com/basic-vim-commands-cheat-sheet-quick-start-guide/

View File

@ -1,149 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (zhangxiangping)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (The state of the art of microservices in 2020)
[#]: via: (https://www.linux.com/news/the-state-of-the-art-of-microservices-in-2020/)
[#]: author: (Linux.com Editorial Staff https://www.linux.com/author/linuxdotcom/)
The state of the art of microservices in 2020
2020年微服务现状
======
### _“微服务架构风格是一种将_ _**单个应用程序**_ _开发为一套_ _**小服务**_*的方法,每个服务都在* _**自己的进程中运行,并使用轻量级的通信机制进行通信**_*通常是HTTP类型的API。这些服务是基于_**业务能力**_构建的并且是可以通过**完全自动化部署机制**进行**独立部署**。目前对这些服务的集中管理非常有限,这些服务可以用* _**不同的编程语言**_ _编写也能使用_ _**不同的数据存储技术。**__ ”_
### James Lewis and Martin Fowler (2014) [6]
## 简介
预计在2020年全球云微服务市场将以22.5%的速度增长其中美国市场预计将保持27.4%的增长率[5]。目前的趋势是开发人员将会把本地托管的应用程序转移到云端进行托管。这将有助于企业最大限度地减少停机时间、优化资源并降低基础设施成本。同时专家们还预测到了2022年90%的应用程序将会使用微服务架构进行开发[5]。本文将帮助您了解什么是微服务,以及目前的公司如何使用它。
## 什么是微服务?
微服务已经在全球范围内广泛地被使用了。但是,微服务到底是什么?微服务是一种基于许多小型、互联服务的体系结构模式。它们基于**单一责任原则**。根据罗伯特·C·马丁的说法“将因相同原因而改变的事物聚集起来将因不同原因而改变的事物分离开来”[2]。微服务架构也被扩展到了**松耦合服务**中,也可以**独立地开发、部署和维护**[2]。
## 远离单一体系结构
微服务通常和传统的单一体系的软件架构做对比。在单一体系架构中,一个软件是被设计为自包含的,也就是说,这个程序中的各个组件都是互相连通和互相依赖的,而不是松散耦合的。在一个紧耦合的架构中(单一体系),为了执行或编译代码,每个组件和它相关联的组件必须按照指定的顺序组合起来[7]。当其中有一个组件需要更新时,整个应用都要被重写。
而这个现象在使用微服务体系结构的应用中就不会出现。因为每一个模块都是独立的,每个模块都可以更新修改而不影响程序的其他部分。因此,降低了对更改一个组件会对其他组件造成影响的风险。
如果公司的架构很难升级或者维护过于复杂和昂贵,那么他们就不能扩展一个单一的体系结构的应用,他们可能会遇到麻烦[4]。把一个复杂的任务分解成彼此独立工作的小组件就是解决这个问题的方法。
![单一体系架构 vs. 微服务架构 (图片来自 \[3\].][1]
## 开发者如何构建属于自己的微服务
微服务以提高_可扩展性_和_性能_而闻名。然而这些是世界各地的开发者开发属于他们自己的微服务的主要原因吗微服务2020研究现状[1]发现了全球开发者如何构建他们的微服务以及他们对微服务的看法。这份报告是在来自欧洲、北美、中南美洲、中东、东南亚、澳大利亚和新西兰的660名微服务专家的帮助下完成的。下表列出了微服务成熟度相关问题的平均评分[1]
**分类** | **平均得分满分为5分**
---|---
创建新项目 | 3.8
维护与调试 | 3.4
工作效率 | 3.9
解决可扩展性问题 | 4.3
解决性能问题 | 3.9
团队合作 | 3.9
从上表可知,大部分专家都更愿意使用微服务来解决可扩展性问题。与之相反的是,维护与调试对他们来说似乎是一个挑战。
从他们所使用的架构技术来说大部分专家使用Javascript/Typescript(大约⅔的微服务使用这些语言构建的)。其次使用的是Java。
尽管有很多部署微服务的选择但大多数专家使用Amazon Web服务49%其次是他们自己的服务器。另外有62%的人更喜欢AWS Lambda作为无服务器解决方案。
这些人所使用的大多数微服务都使用HTTP进行通信其次是events和gRPC。此外大多数专家将RabbitMQ用于消息代理其次是Kafka和Redis。
而且大多数人使用微服务持续集成CI。在报告中87%的受访者使用诸如GitLab CI、Jenkins或GitHub Actions等CI解决方案。
在86%的受访者中最受欢迎的调试解决方案是日志其中27%的受访者只使用日志
最后,大多数人认为微服务架构将成为更复杂系统或后端开发的标准。
## 微服务的成功案例
许多公司已经从单一的体系结构转向微服务架构。
### Amazon
在2001年开发延迟、编码挑战和服务相互依赖性使得Amazon无法满足其不断增长的用户群的可扩展性需求。由于需要从头开始重构他们的单一体系结构Amazon将其单一体系架构应用程序拆分为小型的、独立的、指定服务的应用程序[3][9]。
2001年在微服务这个词开始流行之前的几年,亚马逊决定改用微服务。这一变化使得Amazon开发了好几种支持微服务架构的解决方案比如amazonaws。随着对微服务的快速增长和适应亚马逊成为全球市值最高的公司截至2020年7月1日亚马逊市值为1.433万亿美元[8]。
### Netflix
Netflix于2007年开始提供电影流媒体服务到了2008年它也面临着规模扩张的挑战。期间他们经历了一次严重的数据库损坏在三天之内他们不能将dvd发送给他们的会员[10]。这一事故使他们意识到需要将单点故障如关系数据库转向云中更可伸缩和更可靠的分布式系统。于是2009年Netflix开始将其单一架构的应用重构为微服务。他们首先将其非面向客户的电影编码平台迁移到云端作为独立的微服务运行[11]。在该用改用微服务之后使Netflix能够解决扩展性挑战和服务中断的问题。并且它还允许他们通过云的方式处理每串流式数据而不是数据中心的模式来降低成本[10]。今天Netflix每天向190个国家的1.39亿订户发送约2.5亿小时的内容[11]。
### Uber
在推出Uber之后他们努力开发和发布新功能修复bug并迅速整合新的变化。因此他们决定改用微服务并将应用程序结构拆分为基于云的微服务。换句话说Uber为每个功能创建了一个微服务比如乘客管理和出行管理。转向微服务给Uber带来了很多好处比如对每项服务的所有权都有一个清晰的概念。这提高了服务访问的速度和质量通过允许团队只关注他们需要扩展的服务在更新虚拟服务的同时而不中断其他服务实现了更可靠的容错从而促进了快速扩展[11]。
## 一切都和可扩展性有关!
关于如何提供可伸缩性的一个很好的例子是看看中国。中国人口众多必须通过创造和试验新的解决方案来适应大规模的新挑战。统计数据显示中国目前为大约9亿互联网用户提供服务[14]。2019年“双十一”期间相当于国外的黑色星期五阿里巴巴旗下各购物平台的交易峰值为每秒544000笔交易。阿里云处理的数据总量约为970兆字节[15]。那么,这些数量的用户在技术上意味着什么呢?
为了解决可伸缩性问题,许多技术应运而生。例如,[Tars][2]由腾讯于2008年创建[2018年贡献给Linux基金会][3]。它也在被大规模使用并在10年内得到了很大的提升[12]。Tars是开源的许多组织都在大力贡献和扩展框架的特性和价值[12]。TARS支持多种编程语言包括C++、Golang、java、node.js、PHP和Python它可以快速构建系统并自动生成代码使开发人员能够专注于业务逻辑从而有效地提高操作效率。Tars已广泛应用于腾讯的QQ、微信社交网络、金融服务、边缘计算、汽车、视频、网络游戏、地图、应用市场、安全等诸多核心业务。[在2020三月TARS项目转变为TARS基金会][4],一个开源微服务基金会,在建立开放式微服务平台的社区方面中,致力于提升社区贡献和成员的快速增长[12]。
**一定要看看Linux基金会新的免费培训课程**, [用TARS构建微服务平台][5]
*关于作者:*
*_Isabella Ferreira_是TARS基金会的一个倡导者也是*cloud-native open-source microservice foundation under the Linux Foundation*的倡导者。*.*
*markshan是腾讯开源联盟的主席也是TARS基金会的董事会主席。*
**References:**
[1] <https://tsh.io/state-of-microservices/#ebook>
[2]<https://medium.com/hashmapinc/the-what-why-and-how-of-a-microservices-architecture-4179579423a9>
[3] <https://www.plutora.com/blog/understanding-microservices>
[4] <https://www.leanix.net/en/blog/a-brief-history-of-microservices>
[5] <https://www.charterglobal.com/five-microservices-trends-in-2020/>
[6] <https://martinfowler.com/articles/microservices.html#footnote-etymology>
[7] <https://whatis.techtarget.com/definition/monolithic-architecture>
[8] <https://ycharts.com/companies/AMZN/market_cap>
[9] <https://thenewstack.io/led-amazon-microservices-architecture/>
[10] <https://media.netflix.com/en/company-blog/completing-the-netflix-cloud-migration>
[11] <https://blog.dreamfactory.com/microservices-examples/>
[12] <https://www.linuxfoundation.org/blog/2020/03/the-tars-foundation-the-formation-of-a-microservices-ecosystem/>
[13] <https://medium.com/microservices-architecture/top-10-microservices-framework-for-2020-eefb5e66d1a2>
[14] <https://www.statista.com/statistics/265140/number-of-internet-users-in-china/>
[15] <https://interconnected.blog/china-scale-technology-sandbox/>
#### _This Linux Foundation Platinum Sponsor content was contributed by Tencent._
--------------------------------------------------------------------------------
via: https://www.linux.com/news/the-state-of-the-art-of-microservices-in-2020/
作者:[Linux.com Editorial Staff][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/zxp93)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.linux.com/author/linuxdotcom/
[b]: https://github.com/lujun9972
[1]: https://www.linux.com/wp-content/uploads/2020/11/microservices_diagram_a.png
[2]: https://tarscloud.org/foundation/index
[3]: https://www.linuxfoundation.org/press-release/2018/06/tars-and-tseer-form-open-source-project-communities-under-the-linux-foundation-to-expand-adoption-and-pace-of-development/
[4]: https://www.linuxfoundation.org/blog/2020/03/the-tars-foundation-the-formation-of-a-microservices-ecosystem/
[5]: https://www.edx.org/course/building-microservice-platforms-with-tars

View File

@ -0,0 +1,113 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Why Vim users will love the Kakoune text editor)
[#]: via: (https://opensource.com/article/20/12/kakoune)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
为什么 Vim 用户会喜欢 Kakoune 文本编辑器?
======
这个编辑器可能会让人联想到 Vim但它也提供了很多自己独特的功能和特性。
![Typewriter keys in multicolor][1]
[Kakoune][2] 文本编辑器的灵感来源于 Vi。它拥有简约的界面、简短的键盘快捷键以及独立的编辑和插入模式乍一看确实[看起来和感觉很像 Vi][3]。然而Kakoune 编辑器在设计和功能上都有自己独特的风格,与其说是另一个 Vim不如说是它是它自己。
### 安装
在 Linux 和 BSD 上,你可以从你的发行版的软件仓库或 port 树上安装 Kakoune。例如在 Fedora、CentOS 或 RHEL 上:
```
`$ sudo dnf install kakoune`
```
在 Debian、Ubuntu 或类似的系统上:
```
`$ sudo apt install kakoune`
```
在 macOS 上,你可以使用 Homebrew
```
`$ brew install kakoune`
```
或者,你也可以[从源码构建][4]。
启动 Kakoune 的命令是 `kak`。你可以空着启动 Kakoune也可以在启动时包含文件名让它打开
```
`$ kak example.txt`
```
### 使用 Kakoune
当你启动 Kakoune不带文件名除了在窗口底部有一个小的状态栏外它在你的终端中打开的大部分是空的缓冲区。像 Vim 一样Kakoune 以“正常”模式启动它把按键作为命令不向缓冲区输入文本。要进入_插入模式你必须按 **i**(代表**插入**)或 **a**(代表**追加**)。
在插入模式下Kakoune 的操作和其他编辑器一样。你在键盘上输入,然后你输入的字符就会显示在缓冲区里。在插入模式下,你可以使用方向键来浏览缓冲区。
### 正常模式
在正常模式下,你可以发出导航和文本编辑命令。这是从 Vi 传统中借用的最明显的功能。编辑命令包括复制、剪切(在传统的 Unix 编辑术语中,称为 “yank”)、粘贴单词和行、撤销、转换字符大小写等功能。下面是一些基础:
* **d**:复制并删除当前选择(现代术语中的“剪切”)
* **c**:复制并删除当前选择,并进入插入模式
* **Esc+Alt+d**:删除当前选择
* **y**:复制选择
* **p**:粘贴
* **&lt;**:取消所选行的缩进
* **u**:撤消
* **U**:重做
* **`**:转为小写
* **~**:转换为大写
### 选择
在 Kakoune 中,你的光标是一个单字符的移动选择。除非你扩展你的选择,否则任何影响选择的命令都只适用当前光标位置。例如,如果你的光标悬停在字母 **n** 上,那么复制命令(正常模式下的 **c**)会将字母 **n** 复制到剪贴板,而粘贴命令(正常模式下的 **p**)则会将字母 **n** 粘贴到缓冲区。
从单个字符扩展选择的最简单方法是进入正常模式,按下 **Shift** 键,同时用方向键移动光标。然而,有几种方法可以根据某些标准来扩展选区。例如,**Alt+l** 将选择区域从光标扩展到当前行的末端。
完整的文档可以在 <https://github.com/mawww/kakoune/blob/master/README.asciidoc> 中找到。
### 函数
除了这些基本的交互,你还可以执行命令来调用 Kakoune 的内置功能。要访问 Kakoune 的命令行,在普通模式下输入 `:`。在命令行中,你可以执行命令,包括打开文件的 **edit** 命令,保存缓冲区到文件的 **write** 命令,当然还有退出应用的 **quit**
还有更多的功能,包括针对特定编程语言和文件格式的特殊选项、使用 [Ranger 文件浏览器][5]浏览文件系统的选项、改变颜色主题、搜索和替换文本等等。
![Kakoune][6]
### 尝试 Kakoune
如果你是一个有经验的 Vim 用户,或者甚至是一个只是略知一二的人,你可能会发现 Kakoune 一开始会让你感到迷惑。它与 Vim 的相似度足以让你陷入一种虚假的熟悉感。一切都与 Vim 一模一样,直到它有了很大的不同。不过,如果你是一个刚接触 Vim 编辑器的新手,或者你是一个正在寻找新挑战的 Vim 用户,那么 Kakoune 可能是你的理想编辑器。
你自己试试吧!
当我刚开始使用 vi 文本编辑器的时候,我很讨厌它。但现在我已经使用 vi 超过17年了。。。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/12/kakoune
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-docdish-typewriterkeys-3.png?itok=NyBwMdK_ (Typewriter keys in multicolor)
[2]: https://kakoune.org/
[3]: https://opensource.com/article/20/12/vi-text-editor
[4]: https://github.com/mawww/kakoune
[5]: https://opensource.com/article/20/3/ranger-file-navigator
[6]: https://opensource.com/sites/default/files/kakoune-screenshot.png (Kakoune)