Merge pull request #1 from LCTT/master

sync master
This commit is contained in:
Zioyi 2020-04-25 21:53:43 +08:00 committed by GitHub
commit f2b922ee96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
63 changed files with 5178 additions and 2313 deletions

View File

@ -0,0 +1,220 @@
[#]: collector: "lujun9972"
[#]: translator: "mr-ping"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-12125-1.html"
[#]: subject: "Different Ways To Update Linux Kernel For Ubuntu"
[#]: via: "https://www.ostechnix.com/different-ways-to-update-linux-kernel-for-ubuntu/"
[#]: author: "SK https://www.ostechnix.com/author/sk/"
升级 Ubuntu Linux 内核的几种不同方法
======
![](https://www.ostechnix.com/wp-content/uploads/2019/01/ubuntu-linux-kernel-720x340.png)
这个指南里介绍了 7 种为 Ubuntu 升级 Linux 内核的不同方法。这 7 种方法里,有 5 种需要重启系统来使新内核生效,其他两种则不用。升级之前,**强烈建议你将重要数据进行备份!** 这里提到的所有方法只在 Ubuntu 中测试过。我们并不确定这些方法是不是也能适用于其他 Ubuntu 的特色发行版(如: Xubuntu和衍生发行版Linux Mint
### 第一部分:需要重启的内核升级
以下方法需要你重启系统以便新的内核生效。以下所有方法都建议在个人系统或测试系统中进行。重要的事儿再说一遍,请备份好你 Ubuntu 中的重要数据、配置文件和其他重要的东西。
#### 方法 使用 dpkg 升级 Linux 内核(手动方式)
这个方法可以帮助你从 [kernel.ubuntu.com][1] 网站手动下载可用的最新 Linux 内核。如果你打算安装最新版(而不是稳定版或者正式发布版),那这种方法对你会很有用。从以上链接下载 Linux 内核版本。编写这个指南的时候,最新的可用版本是 **5.0-rc1**,最新的稳定版是 **v4.20**
![][3]
点击你所选择的 Linux 内核版本链接找到你对应的架构“Build for XXX”的那部分。然后下载符合以下格式的两个文件其中 X.Y.Z 是最高版本号):
1. linux-image-*X.Y.Z*-generic-*.deb
2. linux-modules-X.Y.Z*-generic-*.deb
在终端中改变到文件所在的目录,然后执行此命令手动安装内核:
```
$ sudo dpkg --install *.deb
```
重启系统,使用新内核:
```
$ sudo reboot
```
检查是否如你所愿:
```
$ uname -r
```
对于分步的说明,请查看下列链接中对应的部分。
+ [在基于 RPM 和 DEB 的系统中安装 Linux 内核 4.15](https://www.ostechnix.com/install-linux-kernel-4-15-rpm-deb-based-systems/)
以上的指南是针对的是 4.15 版本,不过安装最新版本的所有的步骤都是一样的。
**优势:** 不必联网(你可以从任何系统中下载 Linux 内核来使用)
**缺点:** 手动更新,需要重启系统。
#### 方法 2 - 用 apt-get 来升级 Linux 内核(推荐方法)
这是在类 Ubuntu 系统中升级 Linux 内核的推荐方法。不同于上一个方法,这种方法会从 Ubuntu 官方仓库下载、安装内核版本,而不是从 **kernel.ubuntu.com**网站。
要升级包括内核的整个系统,只需要执行:
```
$ sudo apt-get update
$ sudo apt-get upgrade
```
如果只希望升级内核,运行:
```
$ sudo apt-get upgrade linux-image-generic
```
**优势:** 简单。推荐方法。
**缺点:** 需要联网,需要重启。
从官方库中升级内核是最接近开箱即用的方法,并且不会出什么问题。如果是生产环境的系统,这是最为推荐的升级 Linux 内核的方法。
方法 1 和方法 2 都需要用户去介入到升级 Linux 内核的过程中。而下边的方法3、 4、 5则几乎是全自动的。
#### 方法 3 - 使用 Ukuu 升级 Linux 内核
**Ukuu**是一个 Gtk GUI 和命令行工具,它可以从 kernel.ubuntu.com 下载最新的 Linux 主线内核,并自动安装到你的 Ubuntu 桌面版和服务器版中。Ukku 不仅简化了手动下载和安装新内核的过程,同时也会帮助你安全地移除旧的和不再需要的内核。更多细节可以参照以下指南。
+ [Ukuu在 Ubuntu 系统中安装和升级 Linux 内核的简单方法](https://www.ostechnix.com/ukuu-an-easy-way-to-install-and-upgrade-linux-kernel-in-ubuntu-based-systems/)
**优势:** 易于安装使用。自动安装主线内核。
**缺点:** 需要联网,需要重启。
#### 方法 4 - 使用 UKTools 升级 Linux 内核
跟 Ukuu 差不多,**UKTools** 也会从 kernel.ubuntu.com 网站获取最新的稳定内核并且自动安装到 Ubuntu 以及类似于 Linux Mint 的延伸发行版中。关于UKTools的更多详情请参见下面的链接。
+ [UKTools升级Ubuntu及其衍生产品中的最新Linux内核](https://www.ostechnix.com/uktools-upgrade-latest-linux-kernel-in-ubuntu-and-derivatives/)
**优势:** 简单,自动。
**缺点:** 需要联网,需要重启。
#### 方法 5 - 使用 Linux 内核实用程序更新 Linux 内核
**Linux 内核实用程序**是目前另一个用于升级类 Ubuntu 系统 Linux 内核的程序。实质上,它是一个由一系列 Bash 脚本构成的合集,用于编译并且可以选择性地为 DebianLCTT 译注Ubuntu 的上游发行版)及其衍生发行版升级内核。它包含三个实用程序,一个用于手动编译、安装来自于 [http://www.kernel.org][4] 网站的源码内核,另一个用于安装来自 <https://kernel.ubuntu.com> 网站的预编译的内核,第三个脚本用于移除旧内核。更多细节请浏览以下链接。
+ [Linux 内核实用程序:编译和更新最新的 Linux 内核的脚本,适用于 Debian 及其衍生产品](https://www.ostechnix.com/linux-kernel-utilities-scripts-compile-update-latest-linux-kernel-debian-derivatives/)
**优势:** 简单,自动。
**缺点:** 需要联网,需要重启。
### 第二部分:无需重启的内核升级
我之前说过上边所有的方法都需要你重启服务器LCTT 译注:也可以是桌面版)来启用新内核。如果是个人系统或者测试系统,可以这么办。但对于无法停机的生产环境系统该怎么办呢?一点问题没有,这时候<ruby>实时补丁<rt>livepatching</rt></ruby>就派上用场了。
**实时补丁**(或者叫热补丁)允许你在不重启的情况下安装 Linux 更新或补丁,使你的服务器处于最新的安全级别。这对 web 主机、游戏服务器这类需要不间断在线的服务器来说是很有价值的。事实上,任何情况下,服务器都应该保持在不间断运行的状态下。由于 Linux 供应商只会在出于修复安全漏洞的目的下维护补丁,所以如果安全性是你最关注的问题时,这种方式再适合不过了。
以下两种方法不需要重启,对于生产环境和执行关键任务的 Ubuntu 服务器的 Linux 内核更新非常有用。
#### 方法 6 使用 Canonical 实时补丁服务来更新 Linux 内核
![][5]
[Canonical 实时补丁服务][6]可以在不需要重启 Ubuntu 系统的情况下自动应用内核更新、补丁和安全补丁。它可以减少Ubuntu系统的停机时间并保证系统的安全。Canonical 实时补丁服务可以在安装过程当中或安装之后进行设置。如果你使用的是 Ubuntu 桌面版,软件更新器会自动检查内核补丁的更新,并通知你。在基于控制台的系统中,则需要你定期运行 `apt-get update` 命令来进行升级。由于需要你手动运行 `apt-get upgrade` 命令它才会安装内核的安全补丁,所以算是半自动的。
实时补丁对三个及以下系统免费,如果多于三个,你需要升级成名为 **Ubuntu Advantage** 的企业支持方案套件。这个套件包括 **Kernel 实时补丁**及以下服务:
* 扩展安全维护 Ubuntu 生命周期后的重要安全更新
* Landscape 针对大规模使用 Ubuntu 的系统管理工具
* 知识库 由 Ubuntu 专家撰写的私人文章和教程
* 电话和网站支持
**价格**
Ubuntu Advantage 包含三种付费计划,即基本计划、标准计划和高级计划。最基础的计划(基本计划)从 **单物理节点 225 美元/年**和**单VPS 75美元/年**开始计价。对于 Ubuntu 服务器版和桌面版看上去没有按月订阅。你可以在[此处][7]浏览所有计划的细节信息。
**优势:** 简单。半自动化。无需重启。支持三个免费系统。
**缺点:** 个以上主机的话非常昂贵。没有补丁回滚。
##### 开启 Canonical 实时补丁
如果你想在安装后设置实时补丁服务,依照以下方法逐步执行:
从 [https://auth.livepatch.canonical.com/][8] 获取一个密钥。
```
$ sudo snap install canonical-livepatch
$ sudo canonical-livepatch enable your-key
```
#### 方法 - 使用 KernelCare 升级 Linux 内核
![][9]
[KernelCare][10] 是最新的实时补丁方案。它是 [CloudLinux][11] 推出的产品。KernelCare 可以运行在 Ubuntu 和其他的 Linux 发行版中。它每四个小时检查一遍补丁的发布,并在无需确认的情况下安装它们。如果更新后存在问题,可以将补丁进行回滚。
**价格**
费用,每台服务器:**4 美元/月****45 美元/年**。
跟 Ubuntu 实时补丁相比KernelCare 看起来非常便宜、实惠。好的方面在于**也可以按月订阅**。另一个前者不具备的功能是支持其他 Linux 发行版,如 Red Hat、CentOS、Debian、Oracle Linux、Amazon Linux 以及 OpenVZ、Proxmox 等虚拟化平台。
你可以在[此处][12]了解 KernelCare 的所有特性和简介,以及所有的付费计划的细节。
**优势:** 简单。全自动化。覆盖范围更广的操作系统。补丁回滚。无需重启。对非营利组织提供免费许可。价格低廉。
**缺点:** 不是免费的除了30天的试用期
##### 开启 KernelCare 服务
在 [https://cloudlinux.com/kernelcare-free-trial5][14] 获取一个 30 天免费试用密钥。
执行以下命令开启 KernelCare 并注册秘钥。
```
$ sudo wget -qq -O - https://repo.cloudlinux.com/kernelcare/kernelcare_install.sh | bash
$ sudo /usr/bin/kcarectl --register KEY
```
如果你正在寻找一种经济实惠且可靠的商业服务来保持 Linux 服务器上的 Linux 内核更新,那么 KernelCare 是个不错的选择。
*由来自 Cloud Linux 的技术撰稿人和内容作者 Paul A. Jacobs 提供。*
到此,希望这边文章能对你有所帮助。如果你觉得还有其他的工具和方法需要列在这里,可以在留言区给我们留言。我会根据反馈检查和更新这篇指南的。
接下来会有更多好东西给大家呈现,敬请期待。
Cheers!
--------------------------------------------------------------------------------
via: https://www.ostechnix.com/different-ways-to-update-linux-kernel-for-ubuntu/
作者:[SK][a]
选题:[lujun9972][b]
译者:[mr-ping](https://github.com/mr-ping)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.ostechnix.com/author/sk/
[b]: https://github.com/lujun9972
[1]: http://kernel.ubuntu.com/~kernel-ppa/mainline/
[2]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
[3]: http://www.ostechnix.com/wp-content/uploads/2019/01/Ubuntu-mainline-kernel.png
[4]: http://www.kernel.org
[5]: http://www.ostechnix.com/wp-content/uploads/2019/01/Livepatch.png
[6]: https://www.ubuntu.com/livepatch
[7]: https://www.ubuntu.com/support/plans-and-pricing
[8]: https://auth.livepatch.canonical.com/
[9]: http://www.ostechnix.com/wp-content/uploads/2019/01/KernelCare.png
[10]: https://www.kernelcare.com/
[11]: https://www.cloudlinux.com/
[12]: https://www.kernelcare.com/update-kernel-linux/
[13]: https://www.kernelcare.com/pricing/
[14]: https://cloudlinux.com/kernelcare-free-trial5

View File

@ -0,0 +1,251 @@
[#]: collector: (lujun9972)
[#]: translator: (messon007)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12135-1.html)
[#]: subject: (9 open source cloud native projects to consider)
[#]: via: (https://opensource.com/article/19/8/cloud-native-projects)
[#]: author: (Bryant Son https://opensource.com/users/brsonhttps://opensource.com/users/marcobravo)
值得关注的 9 个开源云原生项目
======
> 工作中用了容器?熟悉这些出自云原生计算基金会的项目吗?
![](https://img.linux.net.cn/data/attachment/album/202004/21/222735oa1wib1wgypoiwpp.jpg)
随着用容器来开发应用的实践变得流行,[云原生应用][2]也在增长。云原生应用的定义为:
> “云原生技术用于开发使用打包在容器中的服务所构建的应用程序,以微服务的形式部署,并通过敏捷的 DevOps 流程和持续交付工作流在弹性基础设施上进行管理。”
这个定义提到了构成云原生应用的不可或缺的四个元素:
1. 容器
2. 微服务
3. DevOps
4. 持续集成和持续交付 (CI/CD)
尽管这些技术各有各自独特的历史,但它们之间却相辅相成,在短时间内实现了云原生应用和工具的惊人的指数级增长。这个[云原生计算基金会CNCF][4]信息图呈现了当今云原生应用生态的规模和广度。
![Cloud-Native Computing Foundation applications ecosystem][5]
*云原生计算基金会项目*
我想说,瞧着吧!这仅仅是一个开始。正如 NodeJS 的出现引发了无数的 JavaScript 工具的爆炸式增长一样,容器技术的普及也推动了云原生应用的指数增长。
好消息是,有几个组织负责监管并将这些技术连接在一起。 其中之一是 <ruby>[开放容器倡议][6]<rt>Open Containers Initiative</rt></ruby>OCI它是一个轻量级的、开放的治理机构或项目“它是在 Linux 基金会的支持下形成的,其明确目的是创建开放的行业标准的容器格式和运行时。” 另一个是 CNCF它是“一个致力于使云原生计算普及和可持续发展的开源软件基金会”。
通常除了围绕云原生应用建立社区之外CNCF 还帮助项目围绕其云原生应用建立结构化管理。CNCF 创建了成熟等级的概念(沙箱级、孵化级或毕业级),分别与下图中的“创新者”、“早期采用者”和“早期大量应用”相对应。
![CNCF project maturity levels][7]
*CNCF 项目成熟等级*
CNCF 为每个成熟等级制定了详细的[标准][8]为方便读者而列在下面。获得技术监督委员会TOC三分之二的同意才能转为孵化或毕业级。
**沙箱级**
> 要想成为沙箱级,一个项目必须至少有两个 TOC 赞助商。 有关详细过程请参见《CNCF 沙箱指南 v1.0》。
**孵化级**
> 注:孵化级是我们期望对项目进行全面的尽职调查的起点。
>
> 要进入孵化级,项目除了满足沙箱级的要求之外还要满足:
>
> * 证明至少有三个独立的最终用户已成功将其用于生产,且 TOC 判断这些最终用户具有足够的质量和范围。
> * 提交者的数量要合理。提交者定义为具有提交权的人,即可以接受部分或全部项目贡献的人。
> * 显示出有大量持续提交和合并贡献。
> * 由于这些指标可能会根据项目的类型、范围和大小而有很大差异,所以 TOC 有权决定是否满足这些标准的活动水平。
**毕业级**
> 要从沙箱或孵化级毕业,或者要使一个新项目作为已毕业项目加入,项目除了必须满足孵化级的标准外还要满足:
>
> * 至少有两个来自组织的提交者。
> * 已获得并保持了“核心基础设施计划最佳实践徽章”。
> * 已完成独立的第三方安全审核,并发布了具有与以下示例类似的范围和质量的结果(包括已解决的关键漏洞):<https://github.com/envoyproxy/envoy#security-audit>,并在毕业之前需要解决所有关键的漏洞。
> * 采用《CNCF 行为准则》。
> * 明确规定项目治理和提交流程。最好将其列在 `GOVERNANCE.md` 文件中,并引用显示当前提交者和荣誉提交者的 `OWNERS.md` 文件。
> * 至少有一个主仓的项目采用者的公开列表(例如,`ADOPTERS.md` 或项目网站上的徽标)。
> * 获得 TOC 的绝大多数票,进入毕业阶段。如果项目能够表现出足够的成熟度,则可以尝试直接从沙箱级过渡到毕业级。项目可以无限期保持孵化状态,但是通常预计它们会在两年内毕业。
### 值得关注的 9 个项目
本文不可能涵盖所有的 CNCF 项目,我将介绍最有趣的 9 个毕业和孵化的开源项目。
名称|授权类型|简要描述
---|---|---
[Kubernetes][9] | Apache 2.0 | 容器编排平台
[Prometheus][10] | Apache 2.0 | 系统和服务监控工具
[Envoy][11] | Apache 2.0 | 边缘和服务代理
[rkt][12] | Apache 2.0 | Pod 原生的容器引擎
[Jaeger][13] | Apache 2.0 | 分布式跟踪系统
[Linkerd][14] | Apache 2.0 | 透明服务网格
[Helm][15] | Apache 2.0 | Kubernetes 包管理器
[Etcd][16] | Apache 2.0 | 分布式键值存储
[CRI-O][17] | Apache 2.0 | 专门用于 Kubernetes 的轻量级运行时环境
我也创建了视频材料来介绍这些项目。
- [video](https://youtu.be/3cDxYO2GK4w)
### 毕业项目
毕业的项目被认为是成熟的,已被许多组织采用的,并且严格遵守了 CNCF 的准则。以下是三个最受欢迎的开源 CNCF 毕业项目。(请注意,其中一些描述来源于项目的网站并被做了改编。)
#### Kubernetes希腊语“舵手”
Kubernetes! 说起云原生应用,怎么能不提 Kubernetes 呢? Google 发明的 Kubernetes 无疑是最著名的基于容器的应用程序的容器编排平台,而且它还是一个开源工具。
什么是容器编排平台?通常,一个容器引擎本身可以管理几个容器。但是,当你谈论数千个容器和数百个服务时,管理这些容器变得非常复杂。这就是容器编排引擎的用武之地。容器编排引擎通过自动化容器的部署、管理、网络和可用性来帮助管理大量的容器。
Docker Swarm 和 Mesosphere Marathon 也是容器编排引擎但是可以肯定地说Kubernetes 已经赢得了这场比赛至少现在是这样。Kubernetes 还催生了像 [OKD][18] 这样的容器即服务CaaS平台它是 Kubernetes 的 Origin 社区发行版,并成了 [Red Hat OpenShift][19] 的一部分。
想开始学习,请访问 [Kubernetes GitHub 仓库][9],并从 [Kubernetes 文档][20]页面访问其文档和学习资源。
#### Prometheus普罗米修斯
Prometheus 是 2012 年在 SoundCloud 上构建的一个开源的系统监控和告警工具。之后,许多公司和组织都采用了 Prometheus并且该项目拥有非常活跃的开发者和用户群体。现在它已经成为一个独立的开源项目独立于公司之外进行维护。
![Prometheus architecture][21]
*Prometheus 的架构*
理解 Prometheus 的最简单方法是可视化一个生产系统,该系统需要 24小时x 365都可以正常运行。没有哪个系统是完美的也有减少故障的技术称为容错系统但是如果出现问题最重要的是尽快发现问题。这就是像 Prometheus 这样的监控工具的用武之地。Prometheus 不仅仅是一个容器监控工具,但它在云原生应用公司中最受欢迎。此外,其他开源监视工具,包括 [Grafana][22],都借助了 Prometheus。
开始使用 Prometheus 的最佳方法是下载其 [GitHub 仓库][10]。在本地运行 Prometheus 很容易,但是你需要安装一个容器引擎。你可以在 [Prometheus 网站][23]上查看详细的文档。
#### Envoy使者
Envoy或 Envoy 代理)是专为云原生应用设计的开源的边缘代理和服务代理。由 Lyft 创建的 Envoy 是为单一服务和应用而设计的高性能的 C++ 开发的分布式代理同时也是为由大量微服务组成的服务网格架构而设计的通信总线和通用数据平面。Envoy 建立在 Nginx、HAProxy、硬件负载均衡器和云负载均衡器等解决方案的基础上Envoy 与每个应用相伴(并行)运行,并通过提供平台无关的方式提供通用特性来抽象网络。
当基础设施中的所有服务流量都经过 Envoy 网格时很容易就可以通过一致的可观测性来可视化问题域调整整体性能并在单个位置添加基础功能。基本上Envoy 代理是一个可帮助组织为生产环境构建容错系统的服务网格工具。
服务网格应用有很多替代方案,例如 Uber 的 [Linkerd][24](下面会讨论)和 [Istio][25]。Istio 通过将其部署为 [Sidecar][26] 并利用了 [Mixer][27] 的配置模型,实现了对 Envoy 的扩展。Envoy 的显著特性有:
* 包括所有的“<ruby>入场筹码<rt>table stakes</rt></ruby>LCTT 译注:引申为基础必备特性)”特性(与 Istio 这样的控制平面组合时)
* 带载运行时 99% 数据可达到低延时
* 可以作为核心的 L3/L4 过滤器,提供了开箱即用的 L7 过滤器
* 支持 gRPC 和 HTTP/2上行/下行)
* 由 API 驱动,并支持动态配置和热重载
* 重点关注指标收集、跟踪和整体可监测性
要想了解 Envoy证实其能力并实现其全部优势需要丰富的生产级环境运行的经验。你可以在其[详细文档][28]或访问其 [GitHub][11] 仓库了解更多信息。
### 孵化项目
下面是六个最流行的开源的 CNCF 孵化项目。
#### rkt火箭
rkt, 读作“rocket”是一个 Pod 原生的容器引擎。它有一个命令行接口用来在 Linux 上运行容器。从某种意义上讲,它和其他容器如 [Podman][29]、Docker 和 CRI-O 相似。
rkt 最初是由 CoreOS (后来被 Red Hat 收购)开发的,你可以在其网站上找到详细的[文档][30],以及在 [GitHub][12] 上访问其源代码。
#### Jaeger贼鸥
Jaeger 是一个开源的端到端的分布式追踪系统,适用于云端应用。在某种程度上,它是像 Prometheus 这样的监控解决方案。但它有所不同,因为其使用场景有所扩展:
* 分布式事务监控
* 性能和延时优化
* 根因分析
* 服务依赖性分析
* 分布式上下文传播
Jaeger 是一项 Uber 打造的开源技术。你可以在其网站上找到[详细文档][31],以及在 [GitHub][13] 上找到其源码。
#### Linkerd
像创建 Envoy 代理的 Lyft 一样Uber 开发了 Linkerd 开源解决方案用于生产级的服务维护。在某些方面Linkerd 就像 Envoy 一样,因为两者都是服务网格工具,旨在提供平台级的可观测性、可靠性和安全性,而无需进行配置或代码更改。
但是,两者之间存在一些细微的差异。 尽管 Envoy 和 Linkerd 充当代理并可以通过所连接的服务进行上报,但是 Envoy 并不像 Linkerd 那样被设计为 Kubernetes Ingress 控制器。Linkerd 的显著特点包括:
* 支持多种平台Docker、Kubernetes、DC/OS、Amazon ECS 或任何独立的机器)
* 内置服务发现抽象,可以将多个系统联合在一起
* 支持 gRPC、HTTP/2 和 HTTP/1.x请 求和所有的 TCP 流量
你可以在 [Linkerd 网站][32]上阅读有关它的更多信息,并在 [GitHub][14] 上访问其源码。
#### Helm舵轮
Helm 基本上就是 Kubernetes 的包管理器。如果你使用过 Apache Maven、Maven Nexus 或类似的服务,你就会理解 Helm 的作用。Helm 可帮助你管理 Kubernetes 应用程序。它使用“Helm Chart”来定义、安装和升级最复杂的 Kubernetes 应用程序。Helm 并不是实现此功能的唯一方法;另一个流行的概念是 [Kubernetes Operators][33],它被 Red Hat OpenShift 4 所使用。
你可以按照其文档中的[快速开始指南][34]或 [GitHub 指南][15]来试用 Helm。
#### Etcd
Etcd 是一个分布式的、可靠的键值存储,用于存储分布式系统中最关键的数据。其主要特性有:
* 定义明确的、面向用户的 APIgRPC
* 自动 TLS可选的客户端证书验证
* 速度(可达每秒 10,000 次写入)
* 可靠性(使用 Raft 实现分布式)
Etcd 是 Kubernetes 和许多其他技术的默认的内置数据存储方案。也就是说,它很少独立运行或作为单独的服务运行;相反,它以集成到 Kubernetes、OKD/OpenShift 或其他服务中的形式来运作。还有一个 [etcd Operator][35] 可以用来管理其生命周期并解锁其 API 管理功能:
你可以在 [etcd 文档][36]中了解更多信息,并在 [GitHub][16]上访问其源码。
#### CRI-O
CRI-O 是 Kubernetes 运行时接口的 OCI 兼容实现。CRI-O 用于各种功能,包括:
* 使用 runc或遵从 OCI 运行时规范的任何实现)和 OCI 运行时工具运行
* 使用容器/镜像进行镜像管理
* 使用容器/存储来存储和管理镜像层
* 通过容器网络接口CNI来提供网络支持
CRI-O 提供了大量的[文档][37],包括指南、教程、文章,甚至播客,你还可以访问其 [GitHub 页面][17]。
我错过了其他有趣且开源的云原生项目吗?请在评论中提醒我。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/8/cloud-native-projects
作者:[Bryant Son][a]
选题:[lujun9972][b]
译者:[messon007](https://github.com/messon007)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/brsonhttps://opensource.com/users/marcobravo
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003601_05_mech_osyearbook2016_cloud_cc.png?itok=XSV7yR9e (clouds in the sky with blue pattern)
[2]: https://opensource.com/article/18/7/what-are-cloud-native-apps
[3]: https://thenewstack.io/10-key-attributes-of-cloud-native-applications/
[4]: https://www.cncf.io
[5]: https://opensource.com/sites/default/files/uploads/cncf_1.jpg (Cloud-Native Computing Foundation applications ecosystem)
[6]: https://www.opencontainers.org
[7]: https://opensource.com/sites/default/files/uploads/cncf_2.jpg (CNCF project maturity levels)
[8]: https://github.com/cncf/toc/blob/master/process/graduation_criteria.adoc
[9]: https://github.com/kubernetes/kubernetes
[10]: https://github.com/prometheus/prometheus
[11]: https://github.com/envoyproxy/envoy
[12]: https://github.com/rkt/rkt
[13]: https://github.com/jaegertracing/jaeger
[14]: https://github.com/linkerd/linkerd
[15]: https://github.com/helm/helm
[16]: https://github.com/etcd-io/etcd
[17]: https://github.com/cri-o/cri-o
[18]: https://www.okd.io/
[19]: https://www.openshift.com
[20]: https://kubernetes.io/docs/home
[21]: https://opensource.com/sites/default/files/uploads/cncf_3.jpg (Prometheus architecture)
[22]: https://grafana.com
[23]: https://prometheus.io/docs/introduction/overview
[24]: https://linkerd.io/
[25]: https://istio.io/
[26]: https://istio.io/docs/reference/config/networking/v1alpha3/sidecar
[27]: https://istio.io/docs/reference/config/policy-and-telemetry
[28]: https://www.envoyproxy.io/docs/envoy/latest
[29]: https://podman.io
[30]: https://coreos.com/rkt/docs/latest
[31]: https://www.jaegertracing.io/docs/1.13
[32]: https://linkerd.io/2/overview
[33]: https://coreos.com/operators
[34]: https://helm.sh/docs
[35]: https://github.com/coreos/etcd-operator
[36]: https://etcd.io/docs/v3.3.12
[37]: https://github.com/cri-o/cri-o/blob/master/awesome.md

View File

@ -1,8 +1,8 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12127-1.html)
[#]: subject: (Navigating man pages in Linux)
[#]: via: (https://www.networkworld.com/article/3519853/navigating-man-pages-in-linux.html)
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
@ -12,11 +12,11 @@
> Linux 系统上的手册页可以做的不仅仅是提供特定命令的信息。它们可以帮助你发现你没有意识到的命令。
[Hello I'm Nik][1] [(CC0)][2]
![Hello I'm Nik][1]
手册页提供了关于 Linux 命令的基本信息,很多用户经常参考它,但手册页的内容比我们很多人意识到的要多得多。
你总是可以输入一个像 `man who` 这样的命令,然后得到 `who` 命令的工作原理的漂亮描述,但是探索你可能不知道的命令可能会更有启发。例如,你可以使用 `man` 命令来帮助确定处理一些非常具有挑战性的任务的命令,或者显示一些选项,这些选项可以帮助你以新的更好的方式使用你已经知道的命令。
你总是可以输入一个像 `man who` 这样的命令,然后得到 `who` 命令的工作原理的漂亮描述,但是探索你可能不知道的命令可能会更有启发。例如,你可以使用 `man` 命令来帮助找到一些处理非常具有挑战性的任务的命令,或者显示一些选项,这些选项可以帮助你以新的更好的方式使用你已经知道的命令。
让我们来浏览一些选项,看看最终的结果是什么。
@ -41,11 +41,11 @@ useradd (8) - create a new user or update default new user information
zshroadmap (1) - informal introduction to the zsh manual The Zsh Manual, …
```
需要说明的是,上面的第三项只是提到 “new users” 类似的内容,并不是设置、删除或配置用户账号的命令。`man` 命令只是在命令描述中匹配了一些词,作用很像 `apropos` 命令。注意上面列出的每个命令后面的括号中的数字。这些数字与包含这些命令的手册页的分有关。
需要说明的是,上面的第三项只是提到 “new users” 类似的内容,并不是设置、删除或配置用户账号的命令。`man` 命令只是在命令描述中匹配了一些词,作用很像 `apropos` 命令。注意上面列出的每个命令后面的括号中的数字。这些数字与包含这些命令的手册页的分有关。
### 确定手册页的
### 确定手册页的分
`man` 命令部分将命令划分为不同的类别。要列出这些类别,请键入 `man man`,并查看类似下面的描述。你的系统中很可能没有第 9 分的命令。
`man` 命令的分区将其内容划分为不同的类别。要列出这些类别,请键入 `man man`,并查看类似下面的描述。你的系统中很可能没有第 9 分的命令。
- `1`:可执行程序或 shell 命令
- `2`:系统调用(内核提供的函数)
@ -59,7 +59,7 @@ zshroadmap (1) - informal introduction to the zsh manual The Zsh Manual,
手册页涵盖了比我们通常认为的“命令”更多的内容。从上面的描述中可以看到,它们涵盖了系统调用、库调用、特殊文件等等。
下面的列表显示了 Linux 系统中的手册页的实际存储位置。这些目录上的日期会有所不同,因为随着更新,其中一些分会有新的内容,而另一些则不会。
下面的列表显示了 Linux 系统中的手册页的实际存储位置。这些目录上的日期会有所不同,因为随着更新,其中一些分会有新的内容,而另一些则不会。
```
$ ls -ld /usr/share/man/man?
@ -89,13 +89,13 @@ lrwxrwxrwx 1 root root 9 Sep 5 06:38 [.1.gz -> test.1.gz
-rw-r--r-- 1 root root 2378 Aug 23 2018 ac.1.gz
```
### 按分列出的手册页
### 按分列出的手册页
即使只看第 1 分的前 10 个手册页(如上所示),你也可能会看到一些新的命令 —— 也许是 `a2query``aaflip`(如上所示)。
即使只看第 1 分的前 10 个手册页(如上所示),你也可能会看到一些新的命令 —— 也许是 `a2query``aaflip`(如上所示)。
探索命令的更好策略是按列出命令,不查看文件本身,而是使用 `man` 命令向你显示命令并提供每个命令的简要说明。
探索命令的更好策略是按分区列出命令,不查看文件本身,而是使用 `man` 命令向你显示命令并提供每个命令的简要说明。
在下面的命令中,`-s 1` 指示 `man` 显示第 1 分中的命令信息。`-k .` 使该命令对所有命令都有效,而不是指定一个特定的关键字;如果没有这个,`man` 命令就会回过头来问:“你想要什么手册页?”所以,使用关键字来选择一组相关的命令,或者使用点来显示一个分中的所有命令。
在下面的命令中,`-s 1` 指示 `man` 显示第 1 分中的命令信息。`-k .` 使该命令对所有命令都有效,而不是指定一个特定的关键字;如果没有这个,`man` 命令就会回过头来问:“你想要什么手册页?”所以,使用关键字来选择一组相关的命令,或者使用点来显示一个分中的所有命令。
```
$ man -s 1 -k .
@ -111,9 +111,9 @@ enchant (1) - a spellchecker
```
### 有几本手册页?
### 有多少手册页?
如果你对每个分中有多少手册页感到好奇,可以使用以下命令按分对它们进行计数:
如果你对每个分中有多少手册页感到好奇,可以使用以下命令按分对它们进行计数:
```
$ for num in {1..8}
@ -158,13 +158,13 @@ via: https://www.networkworld.com/article/3519853/navigating-man-pages-in-linux.
作者:[Sandra Henry-Stocker][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/
[b]: https://github.com/lujun9972
[1]: https://unsplash.com/photos/YiRQIglwYig
[1]: https://images.idgesg.net/images/article/2019/10/field-note_play-book_playbook_map_navigation_journey_by-hello-i-m-nik-via-unsplash-100813507-large.jpg
[2]: https://creativecommons.org/publicdomain/zero/1.0/
[3]: https://www.networkworld.com/slideshow/153439/linux-best-desktop-distros-for-newbies.html#tk.nww-infsb
[4]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage)

View File

@ -0,0 +1,117 @@
[#]: collector: (lujun9972)
[#]: translator: (lxbwolf)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12130-1.html)
[#]: subject: (Getting started with Linux firewalls)
[#]: via: (https://opensource.com/article/20/2/firewall-cheat-sheet)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
Linux 防火墙入门教程
======
> 防火墙是你的计算机防止网络入侵的第一道屏障。为确保你的安全,请下载我们的备忘单。
![](https://img.linux.net.cn/data/attachment/album/202004/20/104205paugcytauqctqw6c.jpg)
合理的防火墙是你的计算机防止网络入侵的第一道屏障。你在家里上网,通常互联网服务提供会在路由中搭建一层防火墙。当你离开家时,那么你计算机上的那层防火墙就是仅有的一层,所以配置和控制好你 Linux 电脑上的防火墙很重要。如果你维护一台 Linux 服务器,那么知道怎么去管理你的防火墙同样重要,只要掌握了这些知识你才能保护你的服务器免于本地或远程非法流量的入侵。
### 安装防火墙
很多 Linux 发行版本已经自带了防火墙,通常是 `iptables`。它很强大并可以自定义,但配置起来有点复杂。幸运的是,有开发者写出了一些前端程序来帮助用户控制防火墙,而不需要写冗长的 iptables 规则。
在 Fedora、CentOS、Red Hat 和一些类似的发行版本上,默认安装的防火墙软件是 `firewalld`,通过 `firewall-cmd` 命令来配置和控制。在 Debian 和大部分其他发行版上,可以从你的软件仓库安装 firewalld。Ubuntu 自带的是<ruby>简单防火墙<rt>Uncomplicated Firewall</rt></ruby>ufw所以要使用 firewalld你必须启用 `universe` 软件仓库:
```
$ sudo add-apt-repository universe
$ sudo apt install firewalld
```
你还需要停用 ufw
```
$ sudo systemctl disable ufw
```
没有理由*不用* ufw。它是一个强大的防火墙前端。然而本文重点讲 firewalld因为大部分发行版都支持它而且它集成到了 systemdsystemd 是几乎所有发行版都自带的。
不管你的发行版是哪个,都要先激活防火墙才能让它生效,而且需要在启动时加载:
```
$ sudo systemctl enable --now firewalld
```
### 理解防火墙的域
Firewalld 旨在让防火墙的配置工作尽可能简单。它通过建立<ruby><rt>zone</rt></ruby>来实现这个目标。一个域是一组的合理、通用的规则,这些规则适配大部分用户的日常需求。默认情况下有九个域。
* `trusted`:接受所有的连接。这是最不偏执的防火墙设置,只能用在一个完全信任的环境中,如测试实验室或网络中相互都认识的家庭网络中。
* `home`、`work`、`internal`:在这三个域中,接受大部分进来的连接。它们各自排除了预期不活跃的端口进来的流量。这三个都适合用于家庭环境中,因为在家庭环境中不会出现端口不确定的网络流量,在家庭网络中你一般可以信任其他的用户。
* `public`:用于公共区域内。这是个偏执的设置,当你不信任网络中的其他计算机时使用。只能接收选定的常见和最安全的进入连接。
* `dmz`DMZ 表示隔离区。这个域多用于可公开访问的、位于机构的外部网络、对内网访问受限的计算机。对于个人计算机,它没什么用,但是对某类服务器来说它是个很重要的选项。
* `external`:用于外部网络,会开启伪装(你的私有网络的地址被映射到一个外网 IP 地址,并隐藏起来)。跟 DMZ 类似,仅接受经过选择的传入连接,包括 SSH。
* `block`:仅接收在本系统中初始化的网络连接。接收到的任何网络连接都会被 `icmp-host-prohibited` 信息拒绝。这个一个极度偏执的设置,对于某类服务器或处于不信任或不安全的环境中的个人计算机来说很重要。
* `drop`:接收的所有网络包都被丢弃,没有任何回复。仅能有发送出去的网络连接。比这个设置更极端的办法,唯有关闭 WiFi 和拔掉网线。
你可以查看你发行版本的所有域,或通过配置文件 `/usr/lib/firewalld/zones` 来查看管理员设置。举个例子:下面是 Fefora 31 自带的 `FedoraWorkstation` 域:
```
$ cat /usr/lib/firewalld/zones/FedoraWorkstation.xml
<?xml version="1.0" encoding="utf-8"?>
<zone>
<short>Fedora Workstation</short>
<description>Unsolicited incoming network packets are rejected from port 1 to 1024, except for select network services. Incoming packets that are related to outgoing network connections are accepted. Outgoing network connections are allowed.</description>
<service name="dhcpv6-client"/>
<service name="ssh"/>
<service name="samba-client"/>
<port protocol="udp" port="1025-65535"/>
<port protocol="tcp" port="1025-65535"/>
</zone>
```
### 获取当前的域
任何时候你都可以通过 `--get-active-zones` 选项来查看你处于哪个域:
```
$ sudo firewall-cmd --get-active-zones
```
输出结果中,会有当前活跃的域的名字和分配给它的网络接口。笔记本电脑上,在默认域中通常意味着你有个 WiFi 卡:
```
FedoraWorkstation
  interfaces: wlp61s0
```
### 修改你当前的域
要更改你的域,请将网络接口重新分配到不同的域。例如,把例子中的 `wlp61s0` 卡修改为 public 域:
```
$ sudo firewall-cmd --change-interface=wlp61s0 --zone=public
```
你可以在任何时候、任何理由改变一个接口的活动域 —— 无论你是要去咖啡馆,觉得需要增加笔记本的安全策略,还是要去上班,需要打开一些端口进入内网,或者其他原因。在你凭记忆学会 `firewall-cmd` 命令之前,你只要记住了关键词 `change``zone`,就可以慢慢掌握,因为按下 `Tab` 时,它的选项会自动补全。
### 更多信息
你可以用你的防火墙干更多的事,比如自定义已存在的域,设置默认域,等等。你对防火墙越了解,你在网上的活动就越安全,所以我们创建了一个[备忘单][2]便于速查和参考。
- 下载你的 [防火墙备忘单][2]。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/2/firewall-cheat-sheet
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[lxbwolf](https://github.com/lxbwolf)
校对:[wxy](https://github.com/wxy)
本文由 [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/coverimage_cheat_sheet.png?itok=lYkNKieP (Cheat Sheet cover image)
[2]: https://opensource.com/downloads/firewall-cmd-cheat-sheet

View File

@ -1,59 +1,57 @@
[#]: collector: (lujun9972)
[#]: translator: (cycoe)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12150-1.html)
[#]: subject: (What you need to know about variables in Emacs)
[#]: via: (https://opensource.com/article/20/3/variables-emacs)
[#]: author: (Clemens Radermacher https://opensource.com/users/clemera)
关于 Emacs 中的变量你需要知道的事情
======
学习 Elisp 是如何处理变量的,以及如何在你的脚本与配置中使用它们。
![编程键盘][1]
> 学习 Elisp 是如何处理变量的,以及如何在你的脚本与配置中使用它们。
![](https://img.linux.net.cn/data/attachment/album/202004/25/190905pq1qfk1f8f9qs9v8.jpg)
GNU Emacs 是由 C 和 Emacs LispElispLisp 编程语言的一种方言)写成,它是一个编辑器的同时,又碰巧是 Elisp 的沙盒。因此,理解 Elisp 中的一些基本编程概念会对你有一些帮助。
如果你是 [Emacs][2] 新手,请先访问 Sacha Chua 的[《给 Emacs 新手的资源》][3]精品帖。本篇文章假定你熟悉常见的 Emacs 术语,并且能够阅读 Elisp 代码的简单片段并对其进行求值。最好你也听说过变量作用域的概念,知道它在其它编程语言中的作用。本篇文章中的示例假定你使用的是相对较新的 Emacs 版本([v.25 之后的版本][4])。
如果你是 [Emacs][2] 新手,请先阅读 Sacha Chua 的《[给 Emacs 新手的资源][3]》精品帖。本篇文章假定你熟悉常见的 Emacs 术语,并且能够阅读并求值 Elisp 代码的简单片段。最好你也听说过变量作用域的概念,知道它在其它编程语言中的作用。本篇文章中的示例假定你使用的是相对较新的 Emacs 版本([v.25 之后的版本][4])。
[Elisp 手册][5] 包含了 Elisp 的方方面面,但它是写给那些有明确查找目标的人们的,并且它在这方面也做得相当棒。但是很多人希望这些资源能够在更高的层次上解释 Elisp 的概念,同时将信息压缩成最精华的部分。本篇文章也正是我回应这种呼声的一次尝试,为读者描绘基础的大体轮廓。使他们能在配置中用上这些技巧,也让他们在手册中查询细节变得更容易。
[Elisp 手册][5] 包含了 Elisp 的方方面面,但它是写给那些有明确查找目标的人们的(它在这方面也做得相当棒)。但是很多人想要能够在更高的层次上解释 Elisp 概念的材料,同时将信息压缩成最精华的部分。本篇文章也正是我回应这种呼声的一次尝试,为读者描绘基础的大体轮廓。使他们能在配置中用上这些技巧,也让他们在手册中查询细节变得更容易。
### 全局变量
`defcustom` 定义的用户设置和用 `defvar``defconst` 定义的变量是全局的。使用 `defcustom``defvar` 声明变量的一个非常重要的原因是,当一个变量已经被<ruby>绑定<rt>bind</rt></ruby>,对它们进行重新求值不会覆盖掉已有的值。举个栗子,如果你在初始化文件中对 `my-var` 进行如下绑定:
```
`(setq my-var nil)`
(setq my-var nil)
```
对如下表达式求值不会将变量覆盖为 `t`
```
`(defvar my-var t)`
(defvar my-var t)
```
注意此处有_一个例外_:如果你用 `C-M-x` 快捷键对上述声明求值,它将调用 `eval-defun` 函数,并将变量覆盖为 `t`。通过此方式你可以按需将变量强制覆盖。这种行为是刻意而为之的你可能知道Emacs 中的许多特性是按需加载的,也可以称为自动加载。如果那些文件中的声明将变量覆盖为它们的默认值,那它也就覆盖了你初始化文件中的设置。
注意此处有*一个例外*:如果你用 `C-M-x` 快捷键对上述声明求值,它将调用 `eval-defun` 函数,并将变量覆盖为 `t`。通过此方式你可以按需将变量强制覆盖。这种行为是刻意而为之的你可能知道Emacs 中的许多特性是按需加载的,也可以称为自动加载。如果那些文件中的声明将变量覆盖为它们的默认值,那它也就覆盖了你初始化文件中的设置。
### 用户选项
用户选项就是使用 `defcustom` 声明的全局变量。与使用 `defvar` 声明的变量不同,这些变量可以用 `M-x customize` 界面来配置。据我所知,大部分人因为觉得它开销较大而不经常使用。一旦你知道如何在你的初始化文件中设置变量,也就没有理由一定要去使用它了。许多用户没有意识到的一个细节是,通过 **customize** 的方式设置用户选项能够执行代码,有的时间可用来运行一些附加的配置说明:
用户选项就是使用 `defcustom` 声明的全局变量。与使用 `defvar` 声明的变量不同,这些变量可以用 `M-x customize` 界面来配置。据我所知,大部分人因为觉得它开销较大而不经常使用。一旦你知道如何在你的初始化文件中设置变量,也就没有理由一定要去使用它了。许多用户没有意识到的一个细节是,通过 `customize` 的方式设置用户选项能够执行代码,有的时间可用来运行一些附加的配置说明:
```
(defcustom my-option t
  "我的用户选项"
  "My user option."
  :set (lambda (sym val)
         (set-default sym val)
         (message "Set %s to %s" sym val)))
```
若你对这段代码求值,并键入 `M-x customize-option RET my-option RET` 运行 **customize** 界面lambda 匿名函数就会被调用,回显区域就会显示出该选项的符号名与值。
若你对这段代码求值,并键入 `M-x customize-option RET my-option RET` 运行 `customize` 界面lambda 匿名函数就会被调用,回显区域就会显示出该选项的符号名与值。
如果你在初始化文件中使用 `setq` 改变该选项的值,那么匿名函数不会运行。要想在 Elisp 中正确设置一个选项,你需要使用函数 `customize-set-variable`。或者,人们在他们的配置文件中使用了各种版本的 `csetq` 宏来自动处理(如你所愿,你可以通过 GitHub 的代码搜索发现更复杂的变体)。
```
(defmacro csetq (sym val)
  `(funcall (or (get ',sym 'custom-set) 'set-default) ',sym ,val))
@ -63,20 +61,18 @@ GNU Emacs 是由 C 和 Emacs LispElispLisp 编程语言的一种方言)
在你将以上代码放入到你的初始化文件中之后,你便可以使用 `csetq` 宏在设置变量的同时运行任何现存的 `setter` 函数。要证明这点,你可以使用此宏来改变上面定义的选项,并观察回显区域的消息输出。
```
`(csetq my-option nil)`
(csetq my-option nil)
```
### 动态绑定与词法绑定
当你在使用其它编程语言时,你可能不会意识到动态绑定与词法绑定的区别。当今的大部分编程语言使用词法绑定,并且在学习变量作用域与变量查找时也没有必要去了解它们之间的区别。
如此看来Emacs Lisp 比较特殊因为动态绑定是默认选项词法绑定需要显式启用。这里有一些历史遗留原因但在实际使用中你应该_时刻_启用词法绑定因为它更快并且不容易出错。要启用词法绑定只需将如下的注释行作为你的 Emacs Lisp 文件的第一行:
如此看来Emacs Lisp 比较特殊因为动态绑定是默认选项,词法绑定需要显式启用。这里有一些历史遗留原因,但在实际使用中,你应该*时刻*启用词法绑定,因为它更快并且不容易出错。要启用词法绑定,只需将如下的注释行作为你的 Emacs Lisp 文件的第一行:
```
`;;; -*- lexical-binding: t; -*-`
;;; -*- lexical-binding: t; -*-
```
另一种方式,你可以调用 `add-file-local-variable-prop-line`,在你选择将变量 `lexical-binding` 置为 `t` 后,会自动插入如上的注释行。
@ -105,15 +101,13 @@ GNU Emacs 是由 C 和 Emacs LispElispLisp 编程语言的一种方言)
如你所知,`let` 用于临时建立局部绑定:
```
(let ((a "I'm a")
      (b "I'm b"))
  (message "Hello, %s. Hello %s" a b))
```
接下来有趣的是——使用 `defcustom`、`defvar` 以及 `defconst` 定义的变量被称为_特殊变量_不论词法绑定是否启用它们都将使用动态绑定
接下来有趣的是——使用 `defcustom`、`defvar` 以及 `defconst` 定义的变量被称为*特殊变量*,不论词法绑定是否启用,它们都将使用动态绑定:
```
;;; -*- lexical-binding: t; -*-
@ -142,7 +136,6 @@ GNU Emacs 是由 C 和 Emacs LispElispLisp 编程语言的一种方言)
这是另一个常见的示例,如何进行大小写敏感的搜索:
```
(let ((case-fold-search nil))
  (some-function-which-uses-search ...))
@ -154,26 +147,25 @@ GNU Emacs 是由 C 和 Emacs LispElispLisp 编程语言的一种方言)
```
(let ((vars ()))
  (mapatoms
   (lambda (cand)
     (when (and (boundp cand)
                (not (keywordp cand))
                (special-variable-p cand)
                (not (string-match "-"
                                   (symbol-name cand))))
       (push cand vars))))
  vars) ;; =&gt; (t obarray noninteractive debugger nil)
(mapatoms
(lambda (cand)
(when (and (boundp cand)
(not (keywordp cand))
(special-variable-p cand)
(not (string-match "-"
(symbol-name cand))))
(push cand vars))))
vars) ;; => (t obarray noninteractive debugger nil)
```
### 缓冲区局部变量
每个缓冲区都能够拥有变量的一个局部绑定。这就意味着对于任何变量,都会首先在当前缓冲区中查找缓冲区局部变量取代默认值。局部变量是 Emacs 中一个非常重要的特性,比如它们被主模式用来建立缓冲区范围内的行为与设置。
事实上你已经在本文中见过_缓冲区局部变量_——也就是将 `lexical-binding` 在缓冲区范围内设置为 `t` 的特殊注释行。在 Emacs 中,在特殊注释行中定义的缓冲区局部变量也被称为`文件局部变量`
事实上你已经在本文中见过*缓冲区局部变量*——也就是将 `lexical-binding` 在缓冲区范围内设置为 `t` 的特殊注释行。在 Emacs 中,在特殊注释行中定义的缓冲区局部变量也被称为*文件局部变量*
任何的全局变量都可以用缓冲区局部变量来遮掩,比如上面定义的变量 `my-var`,你可用如下方式设置局部变量:
```
(setq-local my-var t)
;; or (set (make-local-variable 'my-var) t)
@ -185,7 +177,6 @@ GNU Emacs 是由 C 和 Emacs LispElispLisp 编程语言的一种方言)
因为局部变量意味着对缓冲区的定制,它们也就经常被用于模式钩子中。一个典型的例子如下所示:
```
(add-hook 'go-mode-hook
          (defun go-setup+ ()
@ -199,8 +190,7 @@ GNU Emacs 是由 C 和 Emacs LispElispLisp 编程语言的一种方言)
这将设置 `go-mode` 缓冲区中 `M-x compile` 使用的编译命令。
另一个重要的方面就是一些变量会_自动_成为缓冲区局部变量。这也就意味着当你使用 `setq` 设置这样一个变量时,它会针对当前缓冲区设置局部绑定。这个特性不应该被经常使用,因为这种隐式的行为并不好。不过如果你想的话,你可以使用如下方法创建自动局部变量:
另一个重要的方面就是一些变量会*自动*成为缓冲区局部变量。这也就意味着当你使用 `setq` 设置这样一个变量时,它会针对当前缓冲区设置局部绑定。这个特性不应该被经常使用,因为这种隐式的行为并不好。不过如果你想的话,你可以使用如下方法创建自动局部变量:
```
(defvar-local my-automatical-local-var t)
@ -213,9 +203,7 @@ GNU Emacs 是由 C 和 Emacs LispElispLisp 编程语言的一种方言)
Emacs 是一个强大的编辑器,并且随着你的定制它将变得更加强大。现在,你知道了 Elisp 是如何处理变量的,以及你应如何在你自己的脚本与配置中使用它们。
* * *
_本篇文章此前采用 CC BY-NC-SA 4.0 许可证发布在 [With-Emacs][7] 上经过修改带有合并请求并在作者允许的情况下重新发布。_
*本篇文章此前采用 CC BY-NC-SA 4.0 许可证发布在 [With-Emacs][7] 上,经过修改(带有合并请求)并在作者允许的情况下重新发布。*
--------------------------------------------------------------------------------
@ -224,7 +212,7 @@ via: https://opensource.com/article/20/3/variables-emacs
作者:[Clemens Radermacher][a]
选题:[lujun9972][b]
译者:[cycoe](https://github.com/cycoe)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,69 @@
[#]: collector: (lujun9972)
[#]: translator: (messon007)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12141-1.html)
[#]: subject: (What is the internet backbone and how it works)
[#]: via: (https://www.networkworld.com/article/3532318/what-is-the-internet-backbone-and-how-it-works.html)
[#]: author: (Tim Greene https://www.networkworld.com/author/Tim-Greene/)
什么是互联网骨干网,它是怎样工作的
======
> 一级互联网服务提供商ISP将其高速光纤网络连接在一起形成互联网的骨干网实现在不同地理区域之间高效地传输流量。
![](https://images.idgesg.net/images/article/2018/04/global_network_connections_by_gerd_altmann_cc0_via_pixabay_1200x800-100754306-large.jpg)
互联网会产生大量的计算机到计算机的流量,要确保所有流量都可以在世界上任何地方之间传输,就需要大量汇聚的高速网络,这些网络统称为互联网骨干网,但是它是如何工作的呢?
### 互联网的骨干网是什么?
像任何其他网络一样,互联网由接入链路组成,这些接入链路将流量传输到高带宽路由器,路由器又将流量从源地址通过最佳可用路径传输到目的地址。其核心是由相互连接的、彼此对等的各个高速光纤网络而构成的互联网骨干网。
单个独立的核心网络由一级互联网服务提供商ISP所拥有。他们的网络连接在一起。这些提供商包括 AT&T、CenturyLink、Cogent Communications,、Deutsche Telekom、Global Telecom and Technology (GTT)、NTT Communications、Sprint、Tata Communications,、Telecom Italia Sparkle、Telia Carrier和 Verizon。
通过将这些长途网连接在一起,一级 ISP 们创建了一个他们可以访问整个路由表的单一的全球性网络,因此他们可以通过逐步层次化地增加本地 ISP 网络来有效地将流量传输到其目的地。
除了物理连接之外,这些骨干网提供商还通过一致的网络协议 TCP/IP 融合在一起,这实际上是两个协议,<ruby>传输控制协议<rt>transport control protocol</rt></ruby><ruby>互联网协议<rt>internet protocol</rt></ruby>,它们在计算机之间建立连接,以确保连接可靠,并将消息格式化为数据包。
### 互联网交接点IXP将骨干网连接在一起
骨干网 ISP 在中立位置的对等点通过高速交换机和路由器连接其网络。这些通常由第三方(有时是非营利组织)提供,以促进骨干网的统一。
参与的一级 ISP 会帮助资助 IXP但不向其他一级 ISP 收取流量传输费用,这种关系称为无结算对等。这种协议消除了可能导致互联网性能下降的潜在财务纠纷。
### 骨干网有多快?
互联网骨干网由最快的路由器组成,可以提供 100Gbps 的线路速度。这些路由器由包括 Cisco、Extreme、华为、Juniper 和 Nokia 在内的供应商制造使用边界网关协议BGP在彼此之间路由流量。
### 流量是如何进入骨干网的
在 1 级 ISP 之下是规模较小的 2 级和 3 级 ISP。
3 级 ISP 为企业和消费者提供了互联网接入服务。这些提供商自己没有接入互联网骨干网,因此,他们自己无法将其客户连接到数十亿台互联网上的计算机。
购买一级 ISP 提供商的接入非常昂贵。通常 3 级 ISP 与拥有自己网络的 2 级区域ISP 签订合同,利用 2 级 ISP 的网络将流量传输到有限的地理区域,但不能传输到所有互联网上的设备。
为此2 级 ISP 与 1 级 ISP 签约以访问全球骨干网,并以这种方式使客户可以访问整个互联网。
这种方式使得来自世界一侧的计算机的流量能够连接到另一侧的计算机。流量从源计算机流向 3 级 ISP再路由到 2 级 ISP再路由到 1 级骨干网提供商,再路由到正确的 2 级 ISP最后路由到提供该数据的 3 级接入提供商连接的目标计算机。
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3532318/what-is-the-internet-backbone-and-how-it-works.html
作者:[Tim Greene][a]
选题:[lujun9972][b]
译者:[messon007](https://github.com/messon007)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.networkworld.com/author/Tim-Greene/
[b]: https://github.com/lujun9972
[1]: https://pixabay.com/en/social-media-digitization-faces-3271592/
[2]: https://creativecommons.org/publicdomain/zero/1.0/
[3]: https://www.networkworld.com/newsletters/signup.html
[4]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage)
[5]: https://www.facebook.com/NetworkWorld/
[6]: https://www.linkedin.com/company/network-world

View File

@ -1,8 +1,8 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12139-1.html)
[#]: subject: (Create web tutorials with Reveal.js and Git)
[#]: via: (https://opensource.com/article/20/4/create-web-tutorial-git)
[#]: author: (Eric D. Schabell https://opensource.com/users/eschabell)
@ -10,9 +10,9 @@
使用 Reveal.js 和 Git 创建网页教程
======
> 通过这个简单的工作流程创建的研讨会幻灯片,可以在任何浏览器、设备和平台上一致地查看
> 通过这个简单的工作流程创建的研讨会幻灯片,可以在任何浏览器、设备和平台上获得一致的查看效果
![Person reading a book and digital copy][1]
![](https://img.linux.net.cn/data/attachment/album/202004/23/094800ohkpbjd3zbj0dj0d.jpg)
无论你是学习者还是教师,你可能都会认识到采用幻灯片放映来传播知识的在线<ruby>研讨会<rt>workshop</rt></ruby>的价值。如果你曾经偶然看到过这样一个逐页、逐章设置的井井有条的教程,你可能会想知道创建这样的一个网站有多难。
@ -20,9 +20,9 @@
### 介绍
当我开始将学习内容放到网上置时,体验并不是很好。我想要的是一种可重复的、一致的、易于维护的东西,因为我的内容会随着我的教学技术而进步
当我开始将学习内容放到网上置时,体验并不是很好。我想要的是一种可重复的、一致的、易于维护的东西,因为我的内容会随着我教学的技术发展而变化
我尝试了许多交付模型,从 [Asciidoctor][2] 这样的低级代码生成器到在单个 PDF 文件中放置教程。全都不能让我满意。当我举办现场的在座研讨会时,我喜欢使用幻灯片放映,因此我想知道我是否可以为自己的在线的,自定进度的研讨会体验做同样的事情。
我尝试了许多交付模型,从 [Asciidoctor][2] 这样的低级代码生成器到在单个 PDF 文件中放置教程。全都不能让我满意。当我举办现场的在座研讨会时,我喜欢使用幻灯片放映,因此我想知道我是否可以为自己的在线的,自定进度的研讨会体验做同样的事情。
经过一番挖掘我为创建无痛的研讨会网站打下了基础。当时我已经在使用一个演示文稿生成框架这对我来说是很有帮助的因为这个框架可以产生对网站友好的格式HTML
@ -33,13 +33,13 @@
* 研讨会的想法(这是你的问题,我帮不了你)
* 用于研讨会幻灯片的 Reveal.js
* GitLab 项目仓库
* 你最喜欢的 HTML 代码编辑器
* 你常用的 HTML 代码编辑器
* Web 浏览器
* 在你的机器上安装好 Git
如果这个列表看起来令人望而生畏,那么有一个快速入门的方法,不需要把所有的东西一个个都拉到一起。你可以用我的模板项目来给你提供幻灯片和项目设置的入门教程。
本文假设你熟悉 Git 和托管在 Git 平台(如 GitLab上的项目。如果你需要指导或教程,请查看我们的[Git 入门系列][3]。
本文假设你熟悉 Git 和在 Git 平台(如 GitLab上托管项目。如果你需要指导或教程,请查看我们的[Git 入门系列][3]。
首先,将模板项目克隆到本地机器上。
@ -49,7 +49,7 @@ $ git clone https://gitlab.com/eschabell/beginners-guide-automated-workshops.git
为此设置一个新的 GitLab 项目,导入模板项目作为初始导入。
研讨会网站有一些重要的文件。在**根目录**下,你会发现一个名为 `.gitlab-ci.yml` 的文件,当你向主分支提交修改时(即合并拉取请求`master` 分支),这个文件会作为触发器。它可以触发将 `slides` 目录的全部内容复制到 GitLab 项目的 `website` 文件夹中。
研讨会网站有一些重要的文件。在**根目录**下,你会发现一个名为 `.gitlab-ci.yml` 的文件,当你向主分支提交修改时(即将拉取请求合并`master` 分支),这个文件会作为触发器。它可以触发将 `slides` 目录的全部内容复制到 GitLab 项目的 `website` 文件夹中。
我把它托管在我的 GitLab 账户中,名为 `beginners-guide-automated-workshops`。当它部署完毕后,你可以在浏览器中通过导航到下列地址查看 `slides` 目录的内容:
@ -79,7 +79,7 @@ https://[YOUR_USERNAME].gitlab.io/[YOUR_PROJECT_NAME]
* `images` 目录
* `index.html`文件
在你喜欢的 HTML/CSS 编辑器中打开每一个文件,然后进行下面描述的修改。你用哪个编辑器并不重要,我更喜欢 [RubyMine IDE][5],因为它能在本地浏览器中提供页面预览。这对我在将内容推送到研讨会网站之前测试内容时很有帮助。
在你常用的 HTML/CSS 编辑器中打开每一个文件,然后进行下面描述的修改。你用哪个编辑器并不重要,我更喜欢 [RubyMine IDE][5],因为它能在本地浏览器中提供页面预览。这对我在将内容推送到研讨会网站之前测试内容时很有帮助。
#### default.css 文件
@ -91,7 +91,7 @@ https://[YOUR_USERNAME].gitlab.io/[YOUR_PROJECT_NAME]
font-family: "Red Hat Display", "Overpass", san-serif;
```
如果你使用的是非标准字体类型,则必须在以下行中将其导入(与 Overpass 字体类型相同
如果你使用的是非标准字体类型,则必须在以下行中将其导入(Overpass 字体类型就是这样做的
```
@import url('SOME_URL');
@ -105,7 +105,7 @@ background: url("…/…/images/backgrounds/basic.png")
要设置一个默认背景,只需将这一行指向你要使用的图片。
#### images 目录
#### images 目录
顾名思义,`images` 目录是用来存储你想在研讨会幻灯片上使用的图片。例如,我通常会把展示研讨会主题进展的截图放在我的个人幻灯片上。
@ -131,7 +131,6 @@ background: url("…/…/images/backgrounds/basic.png")
现在继续到 `body` 部分。你会注意到它被分成了许多 `section` 标签。`body` 的开头包含了一个注释,说明你正在为每个标有 `section` 的打开和关闭的标签创建幻灯片。
```
<body>
<div class="reveal">
@ -156,9 +155,9 @@ background: url("…/…/images/backgrounds/basic.png")
</section>
```
这张幻灯片有两个区域,用 `div` 标签分。用空格隔开了标题和作者。
这张幻灯片有两个区域,用 `div` 标签分。用空格隔开了标题和作者。
如果你有一定的 HTML 使用知识,可以尝试各种东西来开发你的研讨会。使用浏览器预览结果的时候真的很方便。有些 IDE 提供了本地查看修改,但你也可以打开 `index.html` 文件查看你的修改,然后再推送到资源库中。
如果你有一定的 HTML 使用知识,可以尝试各种东西来开发你的研讨会。使用浏览器预览结果的时候真的很方便。有些 IDE 提供了本地查看修改,但你也可以打开 `index.html` 文件查看你的修改,然后再推送到资源库中。
一旦你对你的研讨会感到满意,推送你的修改,然后等待它们通过持续集成管道。它们将像模板项目一样被托管在 <https://eschabell.gitlab.io/beginners-guide-automated-workshops>
@ -166,7 +165,7 @@ background: url("…/…/images/backgrounds/basic.png")
要了解更多关于这个工作流程可以做什么,请查看下面的示例研讨会和托管了研讨会集合的网站。所有这些都是基于本文中描述的工作流程。
研讨会例子:
研讨会例子:
* [Red Hat Process Automation Manage workshop][6]
* [JBoss Travel Agency BPM Suite online workshop][7]
@ -177,7 +176,7 @@ background: url("…/…/images/backgrounds/basic.png")
* [Application development in the cloud workshop][9]
* [Portfolio architecture: Workshops for creating impactful architectural diagrams][10]
我希望这本新手指南和模板研讨会项目能让你看到,在开发和维护工作室网站的过程中,可以轻松、无痛地完成。我也希望这个工作流程能让你的研讨会受众几乎在任何设备上都能完全访问你的内容,这样他们就能从你分享的知识中学习到你的知识。
我希望这本新手指南和模板研讨会项目能让你看到,在开发和维护研讨会网站的过程中,可以轻松、无痛地完成。我也希望这个工作流程能让你的研讨会受众几乎在任何设备上都能完全访问你的内容,这样他们就能从你分享的知识中学习到你的知识。
--------------------------------------------------------------------------------
@ -186,7 +185,7 @@ via: https://opensource.com/article/20/4/create-web-tutorial-git
作者:[Eric D. Schabell][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,26 +1,26 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12124-1.html)
[#]: subject: (Heres How to Find Out Which Desktop Environment You are Using)
[#]: via: (https://itsfoss.com/find-desktop-environment/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
这是找出你所使用的桌面环境的方法
如何找出你所使用的桌面环境
======
如果你是 Linux 新用户,并在一个 Linux 论坛中寻求帮助,那么你可能会被问以下问题:
_**“你使用的是哪个桌面环境?”**_
> “你使用的是哪个桌面环境?”
你知道什么是桌面环境,但你如何知道你使用的是哪一个?我会告诉你如何找到它。我将首先展示命令行方法,因为这适用于[各种 Linux 发行版][1]。我还将展示如何通过图形方式获得。
你知道什么是<ruby>桌面环境<rt>desktop environment</rt></ruby>DE,但你如何知道你使用的是哪一个?我会告诉你如何找到它。我将首先展示命令行方法,因为这适用于[各种 Linux 发行版][1]。我还将展示如何通过图形方式获得。
### 检查你使用的是哪个桌面环境
![][2]
你可以[在 Linux 中使用 echo 命令][3]在终端中显示 XDG_CURRENT_DESKTOP 变量的值。
你可以[在 Linux 中使用 echo 命令][3]在终端中显示 `XDG_CURRENT_DESKTOP` 变量的值。
打开终端并复制粘贴此命令:
@ -37,15 +37,15 @@ ubuntu:GNOME
尽管此命令可以快速告诉你正在使用哪个桌面环境,但它不会提供任何其他信息。
在某些情况下,了解桌面环境版本(也称为 DE可能很重要。软件的每个新版本都会带来新功能或删除某些功能。[GNOME 3.36][6] 引入了“请勿打扰”选项,以关闭所有桌面通知。
在某些情况下,了解桌面环境版本可能很重要。软件的每个新版本都会带来新功能或删除某些功能。[GNOME 3.36][6] 引入了“请勿打扰”选项,以关闭所有桌面通知。
假设你了解了新的“请勿打扰”功能。你确认自己正在使用 GNOME但是在 GNOME 桌面上看不到此选项。如果你可以检查系统上已安装的 GNOME 桌面版本,那么这会很清楚。
假设你了解了这个新的“请勿打扰”功能。你确认自己正在使用 GNOME但是在 GNOME 桌面上看不到此选项。如果你可以检查系统上已安装的 GNOME 桌面版本,那么这会很清楚。
我将先向你展示命令检查桌面环境版本,因为你可以在任何运行桌面环境的 Linux 中使用它。
### 如何获取桌面环境版本
与获取桌面环境的名称不同。获取其版本号并不直接,因为它没有标准的命令或环境变量可以提供此信息。
与获取桌面环境的名称不同。获取其版本号的方法并不直接,因为它没有标准的命令或环境变量可以提供此信息。
在 Linux 中获取桌面环境信息的一种方法是使用 [Screenfetch][7] 之类的工具。此[命令行工具以 ascii 格式显示 Linux 发行版的 logo][8] 以及一些基本的系统信息。桌面环境版本就是其中之一。
@ -57,7 +57,7 @@ sudo apt install screenfetch
对于其他 Linux 发行版,请使用系统的软件包管理器来安装此程序。
安装后,只需在终端中输入 screenfetch 即可,它应该显示桌面环境版本以及其他系统信息。
安装后,只需在终端中输入 `screenfetch` 即可,它应该显示桌面环境版本以及其他系统信息。
![Check Desktop Environment Version][10]
@ -67,7 +67,7 @@ sudo apt install screenfetch
### 使用 GUI 检查桌面环境版本
几乎所有桌面环境在其 “Settings-About” 部分中都提供了基本的系统详细信息。
几乎所有桌面环境在其 “Settings->“About” 部分中都提供了基本的系统详细信息。
一个主要问题是,大多数桌面环境看起来都不同,因此我无法展示每个桌面环境的确切步骤。我将展示 GNOME 的,让你在桌面上发现它。
@ -90,7 +90,7 @@ via: https://itsfoss.com/find-desktop-environment/
作者:[Abhishek Prakash][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/) 荣誉推出

View File

@ -1,47 +1,46 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12131-1.html)
[#]: subject: (How I'm using AI to translate 'wash your hands' in 500 languages)
[#]: via: (https://opensource.com/article/20/4/ai-translation)
[#]: author: (Daniel Whitenack https://opensource.com/users/datadan)
我是如何用 AI 把 “请洗手”翻译成 500 种语言的?
我是如何用 AI 把“请洗手”翻译成 500 种语言的?
======
> 通过使用人类和机器生成的翻译,可以将关键的健康短语翻译成世界各地的当地语言。
![Two diverse hands holding a globe][1]
![](https://img.linux.net.cn/data/attachment/album/202004/20/184427f1a2t5z61m5xxo1t.jpg)
你可能不知道,目前世界上有 [7117 种语言][2],不是方言,而是在用的语言! 然而,世界上大部分的数字媒体只采用几十种语言,而像谷歌翻译这样的翻译平台只支持 100 种左右的语言。这样的现实意味着由于缺乏及时获取信息的机会全世界有数十亿人被边缘化。当前的冠状病毒COVID-19大流行已经让人痛苦地意识到了这一点凸显了将健康相关的短语如“<ruby>请洗手<rt>wash your hands</rt></ruby>”或“保持距离”等)即时、快速翻译成小众语言的必要性。
你可能不知道,目前世界上有 [7117 种语言][2]在使用,不是方言,而是在用的语言! 然而,世界上许多数字媒体只能使用几十种语言,而像谷歌翻译这样的翻译平台只支持 100 种左右的语言。这样的现实意味着由于缺乏及时获取信息的机会全世界有数十亿人被边缘化。当前的冠状病毒COVID-19大流行已经让人痛苦地意识到了这一点凸显了将健康相关的短语如“<ruby>请洗手<rt>wash your hands</rt></ruby>”或“保持距离”等)即时、快速翻译成小众语言的必要性。
为此我应用了最先进的AI技术用 544 种语言构建出了与“请洗手”相近的短语并进行了统计(我的 GPU 还在运行)。<ruby>多语言无监督和监督嵌入<rt>Multilingual Unsupervised and Supervised Embeddings</rt></ruby>MUSE方法被用来训练这 544 种语言和英语之间的跨语言单词嵌入。然后,这些嵌入方法可以从现有文档中提取出与目标短语相似的短语。
为此,我应用了最先进的 AI 技术,用 544 种语言构建出了与“请洗手”相近的短语并进行了统计(我的 GPU 还在运行)。<ruby>多语言无监督和监督嵌入<rt>Multilingual Unsupervised and Supervised Embeddings</rt></ruby>MUSE方法被用来训练这 544 种语言和英语之间的跨语言单词嵌入。然后,这些嵌入方法可以从现有文档中提取出与目标短语相似的短语。
我与 SIL 国际公司的同事们合作完成了这项工作,他们收集了该短语的更多的人工翻译结果。这些人工翻译结果和我的一些机器翻译结果的组合可以在[这个民族语指南页面][3]上搜索到(机器生成的短语用一个小的机器人图标表示),更多的翻译将在生成/收集到的时候加入。
### 利用现有的语料库
SIL 国际公司已经完成了 2000 多种语言的语言工作,目前管理着 1600 多个语言项目。因此,当我解决这个特殊的问题时,我知道我们很可能已经多次将“请洗手”和/或类似的短语翻译成了数百种语言,而这一猜测得到了回报。我很快就从我们的档案库中收集到了超过 900 种语言的文件(主要是完成的贝壳书模板、教材和圣经)。这些文件中的每一份文件都有一个英文的对应语,其中必然包括“请洗手”和/或类似“请洗脸”这样的短语。此外,这些文的质量都很高,并与当地语言社区合作进行了翻译和检查。
SIL 国际公司已经完成了 2000 多种语言的语言工作,目前管理着 1600 多个语言项目。因此,当我解决这个特殊的问题时,我知道我们很可能已经多次将“请洗手”和/或类似的短语翻译成了数百种语言,而这一猜测得到了回报。我很快就从我们的档案库中收集到了超过 900 种语言的文档(主要是完成的贝壳书模板、教材和圣经)。这些文档中的每一份都有一个英文的对应版本,其中必然包括“请洗手”和/或类似“请洗脸”这样的短语。此外,这些文的质量都很高,并与当地语言社区合作进行了翻译和检查。
这是相当多语言的数据集。然而,有两个问题需要克服。首先,这个数据包含了大多数语言的数千种样本,这与训练机器翻译模型所使用的数百万个样本形成了鲜明对比。其次,即使文档中包含目标语言中的“请洗手”这个短语,我们也不知道这个短语在周围文本中的确切位置。
我们当然可以利用[低资源语言的机器翻译][4]中的一些最新技巧,但要在每一对语言中快速调整翻译模型的自动化方法,还需要一些时间。此外,我们所针对的许多语言都没有现成的可以与之比较评估指标的基线,例如[BLEU 评分][5]。考虑到对冠状病毒大流行的迫切担忧,我们希望比这更快一点(尽管我们计划在将来再来解决这个问题)。
我们当然可以利用[低资源语言的机器翻译][4]中的一些最新技巧,但是需要花费一些时间来调整自动化方法,以快速适应每种语言对中的翻译模型。此外,我们所针对的许多语言都没有现成的的基线,可以用来比较评估指标(例如 [BLEU 评分][5]。考虑到对冠状病毒大流行的迫切担忧,我们希望比这更快一点(尽管我们计划在将来再来解决这个问题)。
我选择通过在现有的文档中寻找短语本身或短语的组件(如“请洗”或“你的手”)来尝试构建“请洗手”这个短语。为了找到这些成分,我使用 Facebook Research 的 [多语言无监督和监督嵌入MUSE][6]对每个 {英语、目标语言} 对进行<ruby>跨语言<rt>cross-lingual</rt></ruby>嵌入训练。MUSE 以<ruby>单语言<rt>monolingual</rt></ruby>的单词嵌入作为输入(我使用 [fasttext][7] 来生成这些词),并使用对抗性方法学习从英语到目标嵌入空间的映射。这个过程的输出是<ruby>跨语言<rt>cross-lingual</rt></ruby>的单词嵌入。
我选择通过在现有的文档中寻找短语本身或短语的组件(如“请洗”或“你的手”)来尝试构建“请洗手”这个短语。为了找到这些成分,我使用 Facebook Research 的[多语言无监督和监督嵌入MUSE][6]对每个 {英语、目标语言} 对进行<ruby>跨语言<rt>cross-lingual</rt></ruby>嵌入训练。MUSE 以<ruby>单语言<rt>monolingual</rt></ruby>的单词嵌入作为输入(我使用 [fasttext][7] 来生成这些词),并使用对抗性方法学习从英语到目标嵌入空间的映射。这个过程的输出是<ruby>跨语言<rt>cross-lingual</rt></ruby>的单词嵌入。
![Using fasttext along with MUSE to perform cross-language embedding][8]
一旦产生了跨语言嵌入,我们就可以开始在目标语言文档中寻找短语成分。结果发现,整个文档中清楚地使用了“请洗脸”这个短语以及单独的“手”、“请洗”等词。对于每一种语言,我都通过 n-grams 搜索我预期该短语会出现的地方(根据其在英语平行语中的用法)。使用跨语言嵌入法对 n-grams 进行了矢量化,并使用各种距离指标与英语短语的矢量化版本进行了比较。在嵌入空间中,与英文短语“最接近”的 n-grams 被确定为目标语言匹配。
一旦产生了跨语言嵌入,我们就可以开始在目标语言文档中寻找短语组件。结果发现,整个文档中清楚地使用了“请洗脸”这个短语以及单独的“手”、“请洗”等词。对于每一种语言,我都通过 n-gram 搜索我预期该短语会出现的地方(根据其在英语的对应版本中的用法)。使用跨语言嵌入法对 n-gram 进行了矢量化处理,并使用各种距离指标与英语短语的矢量化版本进行了比较。在嵌入空间中,与英文短语“最接近”的 n-gram 被确定为目标语言匹配。
最后,将与英语对应的成分短语进行组合,生成目标语言中的“请洗手”短语。这种组合方式再次利用跨语言嵌入,确保组件短语的组合方式合适。例如,如果我们在目标语言中匹配“请洗脚”这个短语,就必须将“脚”对应的 n-gram 替换成“手”对应的 n-gram。下面是<ruby>伯利兹·克里奥尔<rt>Belize Kriol</rt></ruby>英语的一个例子:
最后,将与英语对应的成分短语进行组合,生成目标语言中的“请洗手”短语。这种组合方式再次利用了跨语言嵌入,以确保以合适方式组合组件。例如,如果我们在目标语言中匹配“请洗脚”这个短语,就必须将“脚”对应的 n-gram 替换成“手”对应的 n-gram。下面是<ruby>伯利兹·克里奥尔<rt>Belize Kriol</rt></ruby>英语的一个例子:
![][9]
当然,在这个匹配过程中,有一些假设,这个过程完全有可能不能产生语法上正确的预测。例如,我假设在大多数语言中,“手”的单词和“脚”的单词都是一个字元长的(字元由空格和标点符号隔开)。当然,情况肯定不一定是这样。这可能会造成类似于“和洗的和手你”或类似的不好的词条。希望我们可以克服其中的一些局限性,并在未来扩展这个系统,但是,现在,我们选择用图形来强化这个想法。
我们将世界卫生组织的洗手说明改编成了一个 PNG 图片模板。然后,我们把我们翻译和生成的短语,用 Bash 和 Go 脚本的组合将其渲染到洗手图像中。这样,在文字和图像中都强调了正确洗手的理念(只是为了防止我们生成的翻译有问题)。
当然,在这个匹配过程中,会做一些假设,这个过程完全有可能不能产生语法上正确的预测。例如,我假设在大多数语言中,“手”的单词和“脚”的单词都是一个<ruby>字元<rt>token</rt></ruby>长的(字元由空格和标点符号隔开)。当然并非总是如此。这可能会造成类似于“和洗和手你”或类似的瑕疵词条。希望我们可以克服其中的一些局限性,并在未来扩展这个系统,但是,现在,我们选择用图形来强化这个想法。
我们将世界卫生组织的洗手说明改编成了一个 PNG 图片模板。然后,我们把我们翻译和生成的短语,用 Bash 和 Go 脚本的组合将其渲染到洗手图像中。这样,在文字和图像中都强调了正确洗手的理念(以防万一我们生成的翻译很尴尬)。
![][10]
@ -91,11 +90,11 @@ SIL 国际公司已经完成了 2000 多种语言的语言工作,目前管理
- 我们的系统yaakuuvaitana nnikiiyauvaa fini
- 谷歌翻译:不支持
的短语类似于参考翻译,或者似乎是“请洗手”的另一种说法。例如,在保加利亚语中,我预测为“умий ръцете”,而谷歌翻译预测为“Измий си ръцете”。然而,如果我用谷歌翻译回译我的预测,我还是会得到“请洗手”。有一些不确定的地方,我无法与参考译文(例如,所罗门群岛的 Pijin [pis]或人类注释的跨度进行比较但我仍然可以验证“洗”wasim和“手”han分别用在其他必定是谈论洗或手的参考文件中。大约有 15% 的译文可以用这个方法验证,我希望在收集参考文献字典的过程中,能验证更多的译文
的短语类似于参考翻译,或者似乎是“请洗手”的另一种说法。例如,在保加利亚语中,我预测为“умий ръцете”,而谷歌翻译预测为“Измий си ръцете”。 然而,如果我用谷歌翻译回译我的预测,我还是会得到“请洗手”。有一些不确定的地方,我无法与参考译文(例如,所罗门群岛的 Pijin [pis]或人类注释的跨度进行比较但我仍然可以验证“洗”wasim和“手”han分别用在其他必定是谈论洗或手的参考文件中。 大约有 15% 的译文可以用这个方法验证,我希望在收集参考文献字典的过程中能进行更多的验证
请注意,我最多使用了每种语言中大约 7000 个句子来得到上述译文,即使是意大利语这样的高资源语言也是如此。我也没有依赖语言对之间的对齐句子。尽管在这种数据非常稀缺、无监督的情况下,但对于两个系统都支持的语言,我仍然能够获得类似于谷歌翻译的短语。这证明了这种“混合”方法(无监督的单词嵌入+基于规则的匹配)在将短语翻译成数据非常少的语言中的潜在用途。
请注意,我最多使用了每种语言中大约 7000 个句子来得到上述译文,即使是意大利语这样的高资源语言也是如此。我也不依赖语言对之间的对齐句子。尽管存在这种数据非常稀缺、无监督的情况,但对于两个系统都支持的语言,我仍然能够获得类似于谷歌翻译的短语。这证明了这种“混合”方法(无监督的单词嵌入+基于规则的匹配)在将短语翻译成数据非常少的语言中的潜在用途。
注意:我绝对不是说这是解决冠状病毒和其他健康相关的信息传播问题的解决方案。这里仍有很多东西需要探索和正式评估,我们正在为此努力。在很多情况下,这种方法无法帮助构建数百种语言的重要信息资料。但是,我认为,我们都应该尝试着为当前危机的相关问题制定创造性的解决方案。也许这只是一个非常大的拼图中的一块。
注意:我绝对不是说这是解决冠状病毒和其他健康相关的信息传播问题的解决方案。这里仍有很多东西需要探索和正式评估,我们正在为此努力。在很多情况下,这种方法无法帮助构建数百种语言的重要信息资料。但是,我认为,我们所有人都应该尝试着为当前危机的相关问题制定创造性的解决方案。也许这只是一个非常大的拼图中的一块。
你可以在[这个民族语言指南][3]上查看经过验证的译文加上人工翻译的完整列表。此外,我们即将以论文的形式对这一系统进行更深入的描述和分析。我们欢迎公众对翻译进行反馈,以帮助系统进行微调,最重要的是,确保将健康信息传递给世界各地的边缘化语言社区。
@ -116,7 +115,7 @@ via: https://opensource.com/article/20/4/ai-translation
作者:[Daniel Whitenack][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,77 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12136-1.html)
[#]: subject: (A handy utility for creating Raspberry Pi SD card images)
[#]: via: (https://opensource.com/article/20/4/raspberry-pi-imager-mac)
[#]: author: (James Farrell https://opensource.com/users/jamesf)
一个方便的用于创建树莓派 SD 卡镜像的程序
======
> 开始在 Mac 上使用 Raspberry Pi Imager。
![Raspberries with pi symbol overlay][1]
有多种购买树莓派的方法,根据你的购买渠道的不同,可能附带或不附带操作系统。要在树莓派上安装操作系统,只需将操作系统镜像 “闪存” 到 SD 卡即可。为了使之尽可能简单,[树莓派基金会][2]推出一个 Raspberry Pi Imager 实用程序,你可以在所有主流平台上下载它。下面就来简单介绍一下这个有用的新工具。
### 安装 Imager
你通常可以在[树莓派下载][3]页面上找到 Raspberry Pi Imager。它有 Mac、Ubuntu 和 Windows 版本。我将下载并演示 Mac 版本。
Mac 的安装包是常规的 DMG 镜像,它会挂载到你的桌面,然后经典的安装界面就会出现:
![Raspberry Pi Imager installer][4]
只需将可爱的树莓图标拖到“应用”文件夹,就可以完成。从启动台中调用它,你会看到一系列简单的按钮和菜单供你选择。真的不能比这更简单了:
![Raspberry Pi Imager home screen][5]
### 可用的镜像和选项
默认选项包含各种树莓派型号的镜像。Raspbian 是首选,它有两个可用的选项,较小的 “Lite” 版本和较大的 “Full” 版本。LibreELEC Kodi 娱乐系统有各种特定于型号的版本。Ubuntu 18 和 19 有适用于不同树莓派型号的 32 位和 64 位版本。有一个 RPi 4 EEPROM 恢复程序,以及使用 FAT32 格式化卡的功能。最后,有一个通用的镜像安装程序选项,稍后我将进行尝试。这个简单而紧凑的程序非常方便。
### 安装一些镜像
我决定使用 16g 的 micro SD 卡。我选择了默认的 Raspbian 镜像,选择已连接的 USB/SD 设备,然后按下 “WRITE” 按钮。这是一个简短的演示:
![Raspberry Pi Imager demo][6]
我没有在此处发布整个操作过程。我认为它是在写入的时候下载了镜像,对于我的无线连接这花费了几分钟。该过程在完成之前要先经过写入,然后经过验证环节。完成后,我弹出设备,并将卡插入到我的树莓派 3 中,然后按照通常的图形 Raspbian 安装向导和桌面环境进行设置。
这对我来说还不够。我每天都会下载许多 Linux今天我还在寻找更多。我回到了[树莓派下载][3]页面,并下载了 RISC OS 镜像。这个过程几乎一样容易。下载 RISCOSPi.5.24.zip 文件,将其解压缩,然后找到 ro524-1875M.img 文件。在 “Operating System” 按钮中,我选择了 “Use Custom” 并选择了所需的镜像文件。这个过程几乎是相同的。唯一真正的不同是我必须在下载目录中搜寻并选择一个镜像。文件写完后,回到树莓派 3RISC OS 可以使用了。
### 对 USB C 的抱怨
顺便说一句,如今有多少人对 USB C 带来的不便感到沮丧?我使用的是只有 USB C 口的 MacBook Pro我需要不断更换适配器才能完成工作。看看这个
![USB C adapter][7]
是的,那是一个 USB C 到 USB A 适配器,然后是一个 USB 到 SD 卡读卡器,以及一个 SD 到 micro SD 适配器。我可能可以在网上找到一些东西来简化此过程,但这些都是我手头有的部件,以支持我家五花八门的 Mac、Windows 和 Linux 主机。说到这里就不多说了,但我希望你能从这些疯狂的东西中得到一个笑点。
### 总结
新的 Raspberry Pi Imager 是一种简单有效的工具,可以快速烧录树莓派镜像。[BalenaEtcher][8] 是用于对可移动设备进行烧录的类似工具,但是新的 Raspberry Pi Imager 通过省去了获取那些常见镜像的步骤,使普通树莓派系统安装(如 Raspbian更加容易。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/raspberry-pi-imager-mac
作者:[James Farrell][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jamesf
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life-raspberrypi_0.png?itok=Kczz87J2 (Raspberries with pi symbol overlay)
[2]: https://www.raspberrypi.org/
[3]: https://www.raspberrypi.org/downloads/
[4]: https://opensource.com/sites/default/files/uploads/install_1.png (Raspberry Pi Imager installer)
[5]: https://opensource.com/sites/default/files/uploads/screen_2_0.png (Raspberry Pi Imager home screen)
[6]: https://opensource.com/sites/default/files/uploads/demo_3.gif (Raspberry Pi Imager demo)
[7]: https://opensource.com/sites/default/files/uploads/adapter_4.png (USB C adapter)
[8]: https://www.balena.io/etcher/

View File

@ -0,0 +1,149 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12132-1.html)
[#]: subject: (How to install Python on Linux)
[#]: via: (https://opensource.com/article/20/4/install-python-linux)
[#]: author: (Vijay Singh Khatri https://opensource.com/users/vijaytechnicalauthor)
如何在 Linux 上安装 Python
======
> 在 Linux 上安装最新 Python替代或与老版本并存的分步说明。
![](https://img.linux.net.cn/data/attachment/album/202004/21/094500u63lnlgukgnjb0t0.jpg)
[Python][2] 现在是[最流行][3]、最常用的编程语言。Python 的简单语法和较低的学习曲线使其成为初学者和专业开发人员的终极选择。Python 还是一种非常通用的编程语言。从 Web 开发到人工智能,它几乎在除了移动开发的所有地方都有使用。
如果你使用的是 Python那么你很有可能是一名开发人员或想成为一名开发人员而 Linux 是创建软件的绝佳平台。但是,当你每天使用 Python 时,有时你希望使用最新版本。你可能不想仅仅为了测试最新版本的系统而替换了默认的 Python 安装,因此本文说明了如何在 Linux 上安装最新版本的 Python 3而不替换发行版提供的版本。
使用 `python --version` 终端命令检查是否已安装 Python如果已安装那么检查是哪个版本。如果你的 Linux 系统上未安装 Python或者你想安装更新的版本请按照以下步骤操作。
### 分步安装说明
#### 步骤 1首先安装构建 Python 所需的开发包
在 Debian 上
```
$ sudo apt update
$ sudo apt install build-essential zlib1g-dev \
libncurses5-dev libgdbm-dev libnss3-dev \
libssl-dev libreadline-dev libffi-dev curl
```
在 Fedora 上:
```
$ sudo dnf groupinstall development
```
#### 步骤 2下载最新的稳定版本的 Python 3
访问[官方 Python 网站][4]并下载最新版本的 Python 3。下载完成后你会有一个 `.tar.xz` 归档文件“tarball”其中包含 Python 的源代码。
#### 步骤 3解压 tarball
下载完成后,使用解压程序或 [Linux 的 tar 命令][5]解压压缩包,例如:
```
$ tar -xf Python-3.?.?.tar.xz
```
#### 步骤 4配置脚本
解压 Python 压缩包后,进入 `configure` 脚本所在目录并在 Linux 终端中使用以下命令执行该脚本:
```
$ cd Python-3.*
./configure
```
配置可能需要一些时间。等待直到成功完成,然后再继续。
#### 步骤 5开始构建过程
如果你的系统上已经安装了某个版本的 Python并且希望同时安装新版本的 Python请使用以下命令
```
$ sudo make altinstall
```
构建过程可能需要一些时间。
如果要使用此版本替换当前版本的 Python那么应使用包管理器例如 `apt``dnf`)卸载当前的 Python 包,然后安装:
```
$ sudo make install
```
但是,通常最好以软件包的形式(例如 `.deb``.rpm` 文件)来安装软件,以便系统可以为你跟踪和更新它。因为本文假设尚未打包最新的 Python所以你可能没有这个选择。在这种情况下你可以按照建议使用 `altinstall` 来安装 Python或者使用最新的源代码重构现有的 Python 包。这是一个高级主题,并且特定于你的发行版,因此不在本文讨论范围之内。
#### 步骤 6验证安装
如果你没有遇到任何错误,那么现在你的 Linux 系统上已安装了最新的 Python。要进行验证请在终端中输入以下命令之一
```
python3 --version
```
或者
```
python --version
```
如果输出显示 `Python 3.x`,那么说明 Python 3 已成功安装。
### 创建虚拟环境(可选)
Python 提供了名为 `venv`(虚拟环境)的软件包,可帮助你将程序目录或软件包与其他目录或软件包隔离。
要创建虚拟环境,请在 Python 终端中输入以下内容(在此示例中,假定你安装的 Python 版本为 `3.8` 系列):
```
python3.8 -m venv example
```
该命令创建一个带有一些子目录的新目录(我将其命名为 `example`)。
要激活虚拟环境,请输入:
```
$ source example/bin/activate
(example) $
```
请注意,你的终端提示符(`$`)现在以环境名称开头。
要停用虚拟环境,请使用 `deactivate` 命令:
```
(example) $ deactivate
```
### 总结
Python 是一种有趣的语言,它的开发和改进非常频繁。一旦了解了如何安装最新版本而又不干扰发行版提供的稳定版本,熟悉新功能将很容易。
如果你有任何反馈或问题,请在评论中提出。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/install-python-linux
作者:[Vijay Singh Khatri][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/vijaytechnicalauthor
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/openstack_python_vim_1.jpg?itok=lHQK5zpm (OpenStack source code (Python) in VIM)
[2]: https://www.python.org/
[3]: http://pypl.github.io/PYPL.html
[4]: http://python.org
[5]: https://opensource.com/article/17/7/how-unzip-targz-file

View File

@ -1,8 +1,8 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12128-1.html)
[#]: subject: (How to Open Files and Folders as Administrator in Nautilus File Manager in Linux)
[#]: via: (https://itsfoss.com/open-nautilus-as-administrator/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
@ -10,7 +10,9 @@
如何在 Linux 的 Nautilus 文件管理器中以管理员身份打开文件和文件夹
======
_**了解如何在 Ubuntu 和其他 Linux 发行版的 Nautilus 文件管理器的右键菜单中添加“以管理员身份打开”选项。**_
> 了解如何在 Ubuntu 和其他 Linux 发行版的 Nautilus 文件管理器的右键菜单中添加“以管理员身份打开”选项。
![](https://img.linux.net.cn/data/attachment/album/202004/19/211224hurk01u0kuvqnpvn.jpg)
如果要以根用户身份打开或编辑文件,你总是可以在终端中执行此操作。但我知道有些人对命令行不适应。
@ -18,15 +20,11 @@ _**了解如何在 Ubuntu 和其他 Linux 发行版的 Nautilus 文件管理器
如果你必须以 root 用户身份访问文件夹或以 root 用户权限编辑文件,那你可以在 [Nautilus 文件管理器][1]中以图形方式进行操作。
一个干净的 Nautilus hack 方式能让你以管理员也就是 root 打开文件和文件夹。让我向你展示如何做。
#### [Ubuntu 的 root 用户:你应该知道的重要事项][3]
根用户对于任何 Linux 发行版都是必不可少的。在本 Ubuntu 初学者系列文章中了解 Ubuntu 为何锁定 root 用户以及如何使用它。
一个小巧优雅的 Nautilus 技巧能让你以管理员(也就是 root打开文件和文件夹。让我向你展示如何做。
### 在 Nautilus 文件管理器的右键菜单中添加“以管理员身份打开”选项
_**警告!请不要以 root 用户身份打开和编辑随机文件,因为这样可能会弄乱文件并导致系统损坏。仅在需要时使用它。**_
> 警告!请不要以 root 用户身份打开和编辑随机文件,因为这样可能会弄乱文件并导致系统损坏。仅在需要时使用它。
我展示的是 Ubuntu 的步骤。你可以根据你的发行版的软件包管理器进行更改。
@ -69,7 +67,7 @@ via: https://itsfoss.com/open-nautilus-as-administrator/
作者:[Abhishek Prakash][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/) 荣誉推出

View File

@ -0,0 +1,169 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12143-1.html)
[#]: subject: (How to package Python applications for Linux)
[#]: via: (https://opensource.com/article/20/4/package-python-applications-linux)
[#]: author: (Moshe Zadka https://opensource.com/users/moshez)
如何为 Linux 打包 Python 应用
======
> 了解如何使用 dh_virtualenv 来让你的 Python 应用可作为 .deb 包安装。
![](https://img.linux.net.cn/data/attachment/album/202004/23/235547iztz5d955t9s9b5t.jpg)
在基于 Debian 的操作系统(例如 Debian 或 [Elementary OS][2])上安装 Python 应用的一种方法是使用 [dh_virtualenv][3] 工具。它可以构建一个 `.deb` 包,在应用之外封装了一个 Python 虚拟环境,并在安装时进行部署。
在本文中,我将以构建一个包含 [HTTPie][4] 工具的包为例来解释如何使用它,以便在无需激活虚拟环境的情况下从命令行测试 HTTP API。
### 使用 dh_virtualenv 打包
首先,你需要安装 `dh_virtualenv` 所需的工具。`dh_virtualenv` 的[文档][5]提供了所有安装选项。在基于 Debian 的系统上,我输入:
```
apt-get install dh-virtualenv devscripts
```
尽管不需要 [devscripts][6] 包,但它可以简化后续操作。
现在,创建一个目录来保存源码。由于这是一个本地的、非官方的 HTTPie 打包,因此我将其称为 `myhttp`。接下来,让我们在 `myhttp` 内创建一些文件,向 Debian 构建系统提供元数据。
首先,创建 `debian/control` 文件:
```
Source: myhttp
Section: python
Priority: extra
Maintainer: Jan Doe <jandoe@example.org>
Build-Depends: debhelper (>= 9), python3.7, dh-virtualenv (>= 0.8)
Standards-Version: 3.9.5
Package: myhttp
Architecture: any
Pre-Depends: dpkg (>= 1.16.1), python3.7, ${misc:Pre-Depends}
Depends: ${misc:Depends}
Description: http client
Useful for doing stuff
```
那么这些是什么信息呢?正如 [Debian 文档][8]指出的:
>“第 17 行是源码包的控制信息。第 913 行是二进制包的控制信息。”
以下是我使用的:
* `Section` 的值对于我们来说大多没有意义,但需要存在。它对给引导式 UI 安装程序提供信息是有意义的,但对于这个包来说,没有意义。
* `Priority` 对像这样的第三方包的正确值是 `extra`
* 强烈建议在 `Maintainer` 字段中填写正确的联系人信息。但不一定非得是你的个人电子邮件,如果包由团队维护,并且你希望将问题发送到团队的邮件别名,例如 `Infrastructure Team <infra-team-list@company.example.com>`
* `Build-Depends` 字段标识你需要 `debhelper`、`python` 和 `dh-virtualenv` 来构建包:包构建过程中将确保这些依赖项在包构建时已安装。
* `Standards-Version` 字段主要给人看。它表明你遵循的指南。本指南基于 `dh-virtualenv` 的官方文档,它是基于 Debian 的 3.9.5 指南。最好一直将源码包和二进制包命名相同。
* `Architecture` 字段应为 `Any`,因为除非虚拟环境可能包含一些特定于体系结构的文件。否则,最好选择该字段为 `any`
* 保持 `Pre-Depends` 列表不变:它是一种非常严格的依赖关系形式,你很少会需要比这里建议的最小依赖更多的依赖项。依赖项通常由构建系统准确计算,因此没有理由手动指定它们。
* 如果你的包主要用于内部,那么 `Description` 字段可能只需要最少的信息或者指向公司 wiki 的链接,不然更多的信息会更有用。
然后创建 `debian/compat` 文件,它[主要出于历史目的而存在][10]
```
$ echo "9" > debian/compat
```
接下来,创建更新日志以告知包用户自上次发布以来发生了什么变化。最简单的方法是使用 `dch --create` 创建模板,然后填写值。
填写后,它看起来像:
```
myhttp (2.0.0-1) stable; urgency=medium
* Initial release.
-- Jan Doe <jandoe@example.org> Fri, 27 Mar 2020 01:09:22 +0000
```
现在你需要告诉工具安装 HTTPie但是哪个版本
创建一个宽松版本的 `requirements.in` 文件:
```
httpie
```
通常,宽松的需求文件将仅包含项目的直接依赖项,并在需要时指定最低版本。不一定总是需要指定最低版本:这些工具通常偏向于将依赖关系转化为“可能的最新版本”。如果你的 Debian 包与一个内部 Python 包相对应,这是内部应用中的一种常见情况,那么宽松的需求文件看起来将很相似:仅包含包名的一行。
然后使用 `pip-compile`(可通过安装 PyPI 包 `pip-tools` 获得):
```
$ pip-compile requirements.in > requirements.txt
```
这会生成一个严格的依赖文件,名为 `requirements.txt`
```
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile requirements.in
#
certifi==2019.11.28 # via requests
chardet==3.0.4 # via requests
httpie==2.0.0 # via -r requirements.in
idna==2.9 # via requests
pygments==2.6.1 # via httpie
requests==2.23.0 # via httpie
urllib3==1.25.8 # via requests
```
最后,写一个 `debian/rules` 文件来创建包。因为 `dh_virtualenv` 会处理所有困难的事,因此规则文件很简单:
```
#!/usr/bin/make -f
%:
dh $@ --with python-virtualenv --python /usr/bin/python3.7
```
确保指定 Python 解释器。默认它会使用 `/usr/bin/python`,这是 Python2但是你应该使用一个[受支持的 Python 版本][11]。
完成了,接下来就是构建包:
```
$ debuild -b -us -uc
```
这会在父目录生成一个类似 `myhttp_2.0.0-1_amd64.deb` 的文件。该文件可在任何兼容的系统上安装。
通常,最好在同一平台上构建用于特定平台(例如 Debian 10.0)的 Debian 包。
你可以将此 Debian 包保存在软件仓库中,并使用例如 [Ansible][12] 的工具将其安装在所有相关系统上。
### 总结
给基于 Debian 的系统的打包应用是一个有着多个步骤的过程。使用 `dh_virtualenv` 将使过程变得简单明了。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/package-python-applications-linux
作者:[Moshe Zadka][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/moshez
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life-python.jpg?itok=F2PYP2wT (Python in a tree)
[2]: https://opensource.com/article/19/12/pantheon-linux-desktop
[3]: https://dh-virtualenv.readthedocs.io/en/latest/
[4]: https://opensource.com/article/19/8/getting-started-httpie
[5]: https://dh-virtualenv.readthedocs.io/en/1.1/tutorial.html
[6]: http://man.he.net/man1/devscripts
[7]: mailto:jandoe@example.org
[8]: https://www.debian.org/doc/manuals/maint-guide/dreq.en.html#control
[9]: mailto:infra-team-list@company.example.com
[10]: https://www.debian.org/doc/manuals/maint-guide/dother.en.html#compat
[11]: https://opensource.com/article/19/11/end-of-life-python-2
[12]: https://opensource.com/resources/what-ansible

View File

@ -0,0 +1,329 @@
[#]: collector: (lujun9972)
[#]: translator: (Zioyi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12149-1.html)
[#]: subject: (12 Linux Commands to Have Some Fun in the Terminal)
[#]: via: (https://itsfoss.com/funny-linux-commands/)
[#]: author: (Community https://itsfoss.com/author/itsfoss/)
12 个有趣的 Linux 终端命令
======
> 你觉得 Linux 终端里只有无趣的工作吗?那你一定不知道下面这些有趣的 Linux 命令吧。
Linux 终端是用来完成复杂的工作的,我们有很多有用的 [linux 命令奇技淫巧][1]来帮助你。
但是,你知道你还可以用终端来做很多有趣的事吗?如果你不知道,没关系,大多数 Linux 用户也都只把终端视为一个用来管理系统和开发工作的交互界面。
然而,如果你知道这里有些你可以在终端玩的[基于终端的游戏][2]和 [ASCII 码游戏][3],你一定会大吃一惊。
在这篇文章中,我将会探索一些有趣的、可笑的、荒谬的命令来让你可以在终端中找点乐子!
### 用这些命令在 Linux 终端中找点乐子
![][4]
你可能会觉得这些命令荒谬或没用,但是有一些还是可以被好好利用的。
我已经放上了 Ubuntu/Debian 的安装指令,如果你使用基于 Ubuntu 的发行版,请确保[启用 universe 仓库][5],因为大多数命令不在主仓库中。
如果你使用 Arch、Fedora、SUSE、Solus 或者其他非 Ubuntu 的发行版,请使用你的发行版包管理工具去安装这些有趣的 Linux 命令。
#### 1、在终端开一辆火车
让我们坐上火车,来一场说走就走的旅行的,没错,就是字面意思!
`sl` 命令可以让你在终端运行一辆火车。
![][6]
安装方法:
```
sudo apt install sl
```
完成后,你只要在终端输入下面的命令就可以开始:
```
sl
```
很精彩,对吧?但等等,我们还没结束!你还可以让你的火车飞起来,只要加上参数 `-F`,波特先生,请飞吧:
```
sl -F
```
这样会让火车长出翅膀飞出终端窗口!
#### 2、给你的 Linux 终端加上黑客帝国效果
还记得科幻电影[黑客帝国][7]吗?终端里掉落的绿色字符成为了黑客帝国的标志形象。
你也可以在你的 Linux 电脑里有这样的黑客帝国数字雨!你只需要安装 `cmatric` 然后在终端输入它就行。
![][8]
在 Debian/Ubuntu Linux 上安装 cmatrix:
```
sudo apt install cmatrix
```
现在,你要做的就是输入下面的命令,在终端就会有黑客帝国屏幕了:
```
cmatrix
```
按下 `Ctrl+C` 来停止它,黑客先生。
#### 3、燃起来
拿好灭火器,因为接下来你要在你的终端里点火了!
![][11]
想安装它,你要输入:
```
sudo apt install libaa-bin
```
完成后,你输入下面的命令,你的终端就会燃起一团火焰:
```
aafire
```
按下 `Ctrl+C` 来停止它。
#### 4、幸运饼干命令
想知道你的运气怎样但身边没有幸运饼干?
别担心,你只需在终端打出 `fortune` 然后按下回车。终端将会随机显示出一个幸运语,就像你从幸运饼干里得到的一样。
![][12]
安装它:
```
sudo apt install fortune
```
完成后,只要在命令行打出下面的内容,你就会知道你的运气怎样:
```
fortune
```
这是一个你可以实际使用的命令。你可以用它作为每日消息,这样在多用户环境下,每个用户登录后都会得到一个“幸运饼干”。
你也可以把它添加到 `bashrc` 文件,这样当你登进终端你就会看到了。
#### 5、宠物爱好者这是给你准备的
`oneko` 是一个有趣的命令,可以把你的光标变成一只老鼠,然后创造一只好奇的猫,一旦你移动光标,就会来追你。这不仅局限于终端。当猫追逐光标时,你可以继续工作。
如果你家里有孩子这一定很有趣。
![][13]
用下面的命令安装 `oneko`
```
sudo apt install oneko
```
用下面的命令运行它:
```
oneko
```
如果你不喜欢猫,喜欢狗,输入:
```
oneko -dog
```
它有很多种小宠物,你可以用 `oneko -help` 获取信息。按下 `Ctrl+C` 终止它。
#### 6、有个小兄弟在看着你
`xeyes` 是一个很小的 GUI 程序,它可以绘制出一双眼睛一直盯着你!它会不断跟随你的鼠标光标,运行命令自己看看!
![][14]
你可以用下面命令安装:
```
sudo apt install xeyes
```
然后这样用它:
```
xeyes
```
按下 `Ctrl+C` 终止它。
#### 7、让终端帮你讲话
打开你的扬声器,你来试试这个命令,[eSpeak][15] 是一个有趣的命令,它可以让你的终端说话。是的,你没听错。
先安装这个包:
```
sudo apt install espeak
```
接下来,你只需要输入在命令行中输入你想听到的话:
```
espeak "Type what your computer says"
```
无论你在双引号里面填什么,你的电脑都会复述出来!它就像[在 Linux 中的 echo 命令][16],但不是打印出来,而是说出来。
#### 8、Toilet但与洗手间无关
这听起来有点奇怪,是的。但是,这只是一个命令,用来将文本转换成大的 ASCII 字符。
![][17]
用这个命令安装 `toilet`
```
sudo apt install toilet
```
完成后,你只需输入:
```
toilet sample text you want
```
我也不知道为啥这个小程序叫 Toilet。
#### 9、那个牛说什么
`cowsay` 是一个在终端中用 ASCII 字符展示出一头牛的命令。通过这个命令,你可以控制牛说出你想说的话。
别纠结声音,它只展示文本(就是你看漫画书一样)。
![Cowsay Cowthink][18]
安装 `cowsay`
```
sudo apt install cowsay
```
安装完成后,你只要输入:
```
cowsay "your text"
```
无论你在双引号里填什么,你的牛都会说!我看到一些系统管理员用它来展示每天的消息。你也可以这样,你甚至可以把它和 `fortune` 命令结合。
#### 10、旗帜
`banner` 命令与 `toilet` 命令相似,但它限制最多只能打印 10 个字符。
![][19]
你可以这样安装 `banner` 命令:
```
sudo apt install sysvbanner
```
然后这样运行:
```
banner "Welcome"
```
替换双引号里的内容,你将会得到你想要的展示内容。
#### 11、Yes
![][20]
`yes` 命令帮助你在循环中自动响应直到终止命令。这个命令将会一直打印相同的内容。如果你想快速生成大量垃圾文本,那么此命令将像超级按钮一样工作。
你也可以使用它为命令提供 `yes` 应答(如果提示应答时)。例如,`apt upgrade` 命令会要求你确认,你可以像这样使用它:
```
yes | sudo apt upgrade
```
你不需要安装任何包,`yes` 命令已经存在了。
想要终止 `yes` 命令循环,只需按下 `CTRL+C`
#### 12、得到一个新的身份
要生成一个随机的假身份吗?我推荐你用 `rig` 命令。你在终端运行它,就会生成一个假的身份。
![][21]
用这个命令安装 `rig`
```
sudo apt install rig
```
只需像这样输入:
```
rig
```
它可能被用在脚本或者 web 应用中展示随机信息,但我自己还没做过什么。
### 结尾
我希望你会喜欢这个有趣的 Linux 命令列表。你最喜欢哪个命令呢?你还知道其他有趣的命令吗?请在评论部分与我们分享。
--------------------------------------------------------------------------------
via: https://itsfoss.com/funny-linux-commands/
作者:[Srimanta Koley][a]
选题:[lujun9972][b]
译者:[Zioyi](https://github.com/Zioyi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/itsfoss/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/linux-command-tricks/
[2]: https://itsfoss.com/best-command-line-games-linux/
[3]: https://itsfoss.com/best-ascii-games/
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/fun-linux-commands.png?ssl=1
[5]: https://itsfoss.com/ubuntu-repositories/
[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/sl-command.jpg?ssl=1
[7]: https://en.wikipedia.org/wiki/The_Matrix
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/matrix-screen-command.png?ssl=1
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-2.png?fit=732%2C462&ssl=1
[10]: https://itsfoss.com/star-wars-linux/
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/fire-command.png?ssl=1
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/fortune-command.jpg?ssl=1
[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/oneko-command.jpg?ssl=1
[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/xeyes-command.jpg?ssl=1
[15]: https://itsfoss.com/espeak-text-speech-linux/
[16]: https://linuxhandbook.com/echo-command/
[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/toilet-command.jpg?ssl=1
[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/cowsay-cowthink.jpg?ssl=1
[19]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/banner-command.jpg?ssl=1
[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/yes-yourtext.jpg?ssl=1
[21]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/rig-command.jpg?ssl=1
[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/srimanta.jpg?ssl=1

View File

@ -0,0 +1,51 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12138-1.html)
[#]: subject: (Ethernet consortium announces completion of 800GbE spec)
[#]: via: (https://www.networkworld.com/article/3538529/ethernet-consortium-announces-completion-of-800gbe-spec.html)
[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/)
以太网技术联盟宣布完成 800Gb 以太网规范
======
> 800Gb 以太网规范使当前以太网标准的最高速度提高了一倍,但同时也对包括延迟在内的其他方面进行了调整。
![](https://images.techhive.com/images/article/2017/05/170522-networking-2-100723415-large.jpg)
由业界支持的<ruby>以太网技术联盟<rt>Ethernet Technology Consortium</rt></ruby>ETC已宣布完成 800Gb 以太网技术规范。
新规范基于当前高端 400Gb 以太网协议中使用的许多技术,新规范正式称为 800GBASE-R。设计它的联盟当时称为 25Gb 以太网联盟)在开发 25、50 和 100Gb 以太网协议方面也发挥了重要作用,其成员包括 博通、思科、谷歌和微软。
800Gb 以太网规范增加了新的<ruby>介质访问控制<rt>media access control</rt></ruby>MAC<ruby>物理编码子层<rt>physical coding sublayer</rt></ruby>PCS方法新规范对这些功能进行了调整来使用 8 条 106.25Gbps 的物理通道分发数据。通道可以是铜双绞线也可以是光缆一束光纤或光波。800GBASE-R 规范建立在两个 400 GbE 2xClause PCS 之上,以创建一个以 800Gbps 的总速率运行的单个 MAC。
尽管主要是使用八条 106.25Gb 通道,但这并不是固定的。它可以以一半的速度 53.125Gbps 使用 16 条通道。
新标准提供了 400G 以太网规范的一半延迟,但是新规范也将运行在 50 Gbps、100 Gbps 和 200 Gbps 的网络上的<ruby>前向纠错<rt>forward error correction</rt></ruby>FEC开销减少了一半从而减少了网卡上的数据包处理负担。
通过降低延迟,这将满足对延迟敏感的应用(例如[高性能计算][2]和人工智能)中对速度的需求,在这些应用中,需要尽可能快地移动大量数据。
从 400G 增加到 800G 并不是太大的技术飞跃。它意味着在相同的传输速率下增加更多的通道,再做一些调整。但是,要想突破 Tb 级Cisco 和其他网络公司已经讨论了十年了,这将需要对技术进行重大修改,而且并非易事。
新技术可能也不便宜。800G 可与现有硬件一起使用,而 400Gb 以太网交换机价格不菲,高达六位数。对技术进行重大修改,越过 Tb 障碍,可能会变得更加昂贵。但是对于大客户和高性能计算客户而言,这也是情理之中的事。
ETC 并未透露何时会支持 800G 的新硬件,但考虑到它对现有规格的变化不大,它可能会在今年出现,前提是疫情引起的停滞不会影响它。
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3538529/ethernet-consortium-announces-completion-of-800gbe-spec.html
作者:[Andy Patrizio][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.networkworld.com/author/Andy-Patrizio/
[b]: https://github.com/lujun9972
[2]: https://www.networkworld.com/article/3444399/high-performance-computing-do-you-need-it.html
[3]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy)
[4]: https://www.facebook.com/NetworkWorld/
[5]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,121 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12146-1.html)
[#]: subject: (Ubuntu 20.04 LTS Released. Download Now!)
[#]: via: (https://itsfoss.com/download-ubuntu-20-04/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
Ubuntu 20.04 LTS 下载及新特性
======
> Ubuntu 20.04 LTS Focal Fossa 终于发布了。以下是 Ubuntu 20.04 的新功能和下载链接以及Ubuntu 20.04的官方风味版。
等待终于结束了。Ubuntu 20.04 LTS 终于来了,可以下载了!
![][1]
如果你已经在使用 Ubuntu 19.10,你可能发现没有太多明显的差异 —— 但我所看到的改进清单确实令人印象深刻。
如果你想知道有什么新的东西,我将会提到这个版本的几个主要亮点。
### Ubuntu 20.04 有什么新特性?
与之前的 18.04 LTS 版本相比Ubuntu 20.04 LTS 有很多视觉上的改变,同时也包括了一些底层的改进。
当然,随着 [GNOME 3.36][2] 的加入,视觉上的重大升级和性能上的提升是相当明显的。以下是一段视频,重点介绍了 Ubuntu 20.04 中的新功能。
- [What's New in Ubuntu 20.04 Take a Look at the Top Features](https://youtu.be/9u5B0njRgOw)
如果你有兴趣的话,你也可以深入到我们的文章中去看看,重点介绍 [Ubuntu 20.04 的新功能][3]。
不管是哪种情况,让我来给你介绍一些亮点。
* GNOME 3.36 是默认的桌面系统
* 性能提高了很多
* 新的 Yaru 主题很华丽,也有黑暗模式。
* 你不会再看到亚马逊应用程序,它已经永远消失了!
* 改进的 [ZFS][4] 支持
* 你可以获得最新的 [Linux 内核 5.4][5]LTS
* 增加了对 exFAT 的支持
* 改进硬件和图形支持
* 更新软件 Python 3.8.2
* Wireguard 已被移植到 Linux 内核5.4,可以在 Ubuntu 20.04 上使用。
如果你想看详细的功能介绍,请观看这段视频,重点介绍 20.04 LTS 的最佳功能。
- [Top 7 Best Features You'll Love in Ubuntu 20.04](https://youtu.be/lpq8pm_xkSE)
如果你是 Ubuntu 的新手,对 Ubuntu 20.04 有疑问,我们也为你提供了一篇快速的 [Ubuntu 20.04 FAQ][7] 文章。
### 从 18.04 和 19.10 升级到 Ubuntu 20.04
如果你已经在使用 Ubuntu 18.04 或 19.10,你可以从系统中轻松升级到 Ubuntu 20.04。
这样一来,当你开始使用新版本的时候,你的文件和大部分的应用程序设置都会保持原样,而无需从 ISO 中重新安装。
你可以阅读此详细教程来学习[如何将 Ubuntu 升级到新版本][8]。
请注意,如果你使用的是 Lubuntu 18.04,请不要升级到 Lubuntu 20.04。Lubuntu 18.04 使用的是 Lxde 桌面,而后面的版本使用的是 LXQt 桌面。这样升级可能会导致冲突和系统崩溃。
### 下载 Ubuntu 20.04 LTS
你可以抓取 ISO 或 torrent 文件,这取决于你喜欢什么。
- [Ubuntu 20.04 LTS (ISO)][9]
- [Ubuntu 20.04 LTS (Torrent)][10]
请按照本教程学习[如何安装 Ubuntu][11]。
### 下载Ubuntu 20.04 LTS官方版下载
如果你想在不同的桌面环境下得到 Ubuntu 的官方版本,请按照下面的链接进行操作。
- [Ubuntu MATE 20.04 LTS][12]
- [Kubuntu 20.04 LTS][13]
- [Xubuntu 20.04 LTS][14]
- [Ubuntu Budgie 20.04 LTS][15]
- [Ubuntu Studio 20.04 LTS][16]
- [Lubuntu 20.04 LTS][17]
如果你没有在各自的官方网站上找到最新的 ISO/torrent 文件,只需前往 [cdimages.ubuntu.com][18] 找到所有的版本。
接下来,导航到“发行版名称” -> “releases” -> “20.04” -> “release”然后你应该可以找到列出的 ISO 和 torrent 文件的链接。
如果你有问题,请参考这篇文章,它回答了[关于 Ubuntu 20.04 的常见问题][7]。如果你要安装,请查看我们推荐的[安装 Ubuntu 20.04 之后要做的事情][19]。
享受 Ubuntu 20.04 LTS Focal Fossa
--------------------------------------------------------------------------------
via: https://itsfoss.com/download-ubuntu-20-04/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/Ubuntu-20.04-LTS-released.png?ssl=1
[2]: https://itsfoss.com/gnome-3-36-release/
[3]: https://itsfoss.com/ubuntu-20-04-release-features/
[4]: https://itsfoss.com/what-is-zfs/
[5]: https://itsfoss.com/linux-kernel-5-4/
[6]: https://www.youtube.com/c/itsfoss?sub_confirmation=1
[7]: https://itsfoss.com/ubuntu-20-04-faq/
[8]: https://itsfoss.com/upgrade-ubuntu-version/
[9]: http://releases.ubuntu.com/focal/ubuntu-20.04-desktop-amd64.iso
[10]: http://releases.ubuntu.com/focal/ubuntu-20.04-desktop-amd64.iso.torrent
[11]: https://itsfoss.com/install-ubuntu/
[12]: https://ubuntu-mate.org/download/amd64/focal/
[13]: https://kubuntu.org/getkubuntu/
[14]: https://xubuntu.org/download/
[15]: https://ubuntubudgie.org/downloads/
[16]: https://ubuntustudio.org/
[17]: https://lubuntu.me/downloads/
[18]: http://cdimages.ubuntu.com/
[19]: https://itsfoss.com/things-to-do-after-installing-ubuntu-20-04/

View File

@ -1,65 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Ansible streaming video series, open source security tools, and more industry trends)
[#]: via: (https://opensource.com/article/20/4/ansible-security-more-industry-trends)
[#]: author: (Tim Hildred https://opensource.com/users/thildred)
Ansible streaming video series, open source security tools, and more industry trends
======
A weekly look at open source community and industry trends.
![Person standing in front of a giant computer screen with numbers, data][1]
As part of my role as a senior product marketing manager at an enterprise software company with an open source development model, I publish a regular update about open source community, market, and industry trends for product marketers, managers, and other influencers. Here are five of my and their favorite articles from that update.
## [Ansible 101 by Jeff Geerling: a YouTube streaming series][2]
> After the incredible response I got from [making my Ansible books free for the rest of March][3] to help people learn new automation skills, I tried to think of some other things I could do to help developers who may be experiencing hardship during the coronavirus pandemic and market upheaval.
**The impact**: Not everyone is a frontline worker in this crisis, but then not every problem it has created needs one. This is a great example of someone using their resources to help in a unique way.
## [Open source security tools for cloud and container applications][4]
> Open-source security tools play an important role in securing your container-based infrastructure. Tools such as Anchore can be used for strong governance capabilities, while on the other hand, Dagda can be used to perform static analysis of known vulnerabilities. Two other tools, OpenSCAP and Clair, also provide good capabilities for vulnerability scanning and compliance management. So, depending upon your business requirements and priorities, you can select the right tool to secure your container investments.
**The impact**: Containers are Linux, and container security is open source as well.
## [Cloud cover: Clearing up some misunderstandings about data centres][5]
> The [carbon footprint of data][6] is becoming more and more of a concern, but there appears to be little economic interest in decreasing the amount of data flowing around the world to mitigate this. In that scenario, finding the most energy-efficient and carbon-neutral ways to run purpose-built data centres could be the only answer.
**The impact**: I was talking to a colleague who manages a team of virtualization engineers about this very problem. He seemed optimistic about the amount of headway his team could make on improving the energy consumption of things like KVM at the kernel level; though at the moment customers aren't asking for it. I'd guess that if, for example, the price of carbon emissions were to go up for some reason, that situation would change pretty quickly.
## [Business culture is key in OpenStack network requirements][7]
> The main question is: What is your [culture][8]? Do you go to a vendor and say, 'Give me your design, tell me what to buy and how to support it'? Starting out, you evaluate systems. What are your options?
>
> If you have siloed folks that work on a particular model of equipment, then OpenStack is probably not for you. If you have people that function at a higher level with some fundamental understanding about the underlying architecture that makes things work, then OpenStack can be very useful for you, and you're much less restricted.
**The impact:** Not every organization can adopt a given technology. Certainly not without a willingness to change at a fundamental level.
_I hope you enjoyed this list and come back next week for more open source community, market, and industry trends._
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/ansible-security-more-industry-trends
作者:[Tim Hildred][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/thildred
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_metrics_analytics_desktop_laptop.png?itok=9QXd7AUr (Person standing in front of a giant computer screen with numbers, data)
[2]: https://www.jeffgeerling.com/blog/2020/ansible-101-jeff-geerling-youtube-streaming-series
[3]: https://www.jeffgeerling.com/blog/2020/you-can-get-my-devops-books-free-rest-month
[4]: http://techgenix.com/open-source-security-tools/
[5]: https://www.siliconrepublic.com/enterprise/data-centres-seamus-dunne-interxion
[6]: https://www.siliconrepublic.com/machines/data-carbon-footprint
[7]: https://searchnetworking.techtarget.com/feature/Business-culture-is-key-in-OpenStack-network-requirements
[8]: https://whatis.techtarget.com/definition/corporate-culture

View File

@ -1,74 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (IBM taps new leaders for hybrid cloud battles ahead)
[#]: via: (https://www.networkworld.com/article/3536654/ibm-taps-new-leaders-for-hybrid-cloud-battles-ahead.html)
[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/)
IBM taps new leaders for hybrid cloud battles ahead
======
IBM installs Arvind Krishna as CEO, and appoints Red Hat execs to round out new cloud-oriented team
Stephen Lawson/IDG
Amid the business chaos COVID-19 is causing, IBM has set its course by [installing][1] Arvind Krishna as CEO and Red Hat CEO Jim Whitehurst as IBM president.  The company also named Red Hat veteran Paul Cormier as CEO of Red Hat.
Krishna replaces long-time CEO Virginia Rometty, who will  retire at the end of the year, and the package of executive moves solidifies the team that will lead Big Blue into to [hybrid-cloud][2] world where it will battle Amazon, Google and Microsoft.
[[Get regularly scheduled insights by signing up for Network World newsletters.]][3]
Right now, though, that team must also compete in the face the COVID-19 pandemic, an issue [Krishna][4] mentioned in a [letter he posted on LinkedIn][5] on his first day on the job, April 6.
“During this challenging time, we all need to have empathy, solidarity, and understanding for each other…If theres one thing that this public health crisis has brought to light it is the ever essential role of IBM in the world. We are the backbone of some of the most critical systems of the world. Our technologies and services help banks run credit-card transactions, businesses run supply chains, telcos connect customers, healthcare providers improve patient care, and companies and cities tackle cyberthreats,” Krishna wrote.
IBM has been part of the technology community that is helping address COVID-19.  For example, [IBM Research][6] has been developing cloud and AI-powered technologies that can help researchers battle against coronavirus, in part by accelerating COVID-19 drug discovery. 
IBM is also leading the [COVID-19 High Performance Computing Consortium][7] with AWS, Google, HPE, and Microsoft as well as US National Labs, NASA, and others to bring [high-performance computing][8] systems together to help researchers run massive modeling calculations.
While COVID-19 is a focus for now, the long term-goal is developing cloud technologies.
[][9]
“I believe we can make IBM the most trusted technology partner of the 21st century. For this to happen, we have to ensure that IBM continues to innovate and lead in the transformational journeys our clients are on. Hybrid cloud and AI are two dominant forces driving change for our clients and must have the maniacal focus of the entire company,” he stated.
### Linux, Kubernetes and containers
Krishna also wrote about IBMs strategic cloud directions going forward. “First, we have to deepen our understanding of IBMs two strategic battles: the journey to hybrid cloud and AI. We all need to understand and leverage IBMs sources of competitive advantage. Namely, our open source and security leadership, our deep expertise and trust, and the fact that we enable clients to build mission-critical applications once and run them anywhere,” Krishna stated.
IBM also has to win the battle for architecting the cloud. “Theres a unique window of opportunity for IBM and Red Hat to establish [Linux][10], containers and Kubernetes as the new standard. We can make Red Hat OpenShift the default choice for hybrid cloud in the same way that Red Hat Enterprise Linux is the default choice for the operating system,” Krishna stated.
When IBM closed its [acquisition][11] of Red Hat last July for $34 billion it was clear it would take on the hybrid-cloud market and now, especially with the current executive team in place, that path is set more solidly.
Krishna, 57, was a principal architect of IBMs $34 billion acquisition of Red Hat last year and was IBMs senior vice president of Cloud and Cognitive Software. Red Hat said Cormier drove more than 25 acquisitions at Red Hat and is credited with pioneering the subscription model that transformed Red Hat from an open-source disruptor to an enterprise-technology mainstay.
Also as part of the new team, IBM said it tapped Bank of America telecom and cloud-technology executive Howard Boville as senior vice president of cloud platform, overseeing the IBM Cloud.
Join the Network World communities on [Facebook][12] and [LinkedIn][13] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3536654/ibm-taps-new-leaders-for-hybrid-cloud-battles-ahead.html
作者:[Michael Cooney][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.networkworld.com/author/Michael-Cooney/
[b]: https://github.com/lujun9972
[1]: https://www.networkworld.com/article/3518795/ibms-ceo-virginia-rometty-to-be-replaced-by-its-cloud-red-hat-chiefs.html
[2]: https://www.networkworld.com/article/3233132/what-is-hybrid-cloud-computing.html
[3]: https://www.networkworld.com/newsletters/signup.html
[4]: https://www.cnbc.com/video/2020/04/06/watch-cnbcs-full-interview-with-new-ibm-ceo-arvind-krishna.html?linkId=85936703
[5]: https://www.linkedin.com/pulse/my-first-day-ceo-our-journey-together-arvind-krishna/?trackingId=SRWcJy7mSzagoHDTJX%2Br2Q%3D%3D
[6]: https://www.ibm.com/thought-leadership/covid19/
[7]: https://www.networkworld.com/article/3533426/covid-19-tech-giants-government-agencies-add-supercomputing-to-the-fight.html
[8]: https://www.networkworld.com/article/3534725/the-ins-and-outs-of-high-performance-computing-as-a-service.html
[9]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy)
[10]: https://www.networkworld.com/article/3215226/what-is-linux-uses-featres-products-operating-systems.html
[11]: https://www.networkworld.com/article/3317517/the-ibm-red-hat-deal-what-it-means-for-enterprises.html
[12]: https://www.facebook.com/NetworkWorld/
[13]: https://www.linkedin.com/company/network-world

View File

@ -1,73 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (New Linux integrity checker from Microsoft, Raspberry Pi smart TV replacement from KDE, and more open source news)
[#]: via: (https://opensource.com/article/20/4/news-april-11)
[#]: author: (Ben Cotton https://opensource.com/users/bcotton)
New Linux integrity checker from Microsoft, Raspberry Pi smart TV replacement from KDE, and more open source news
======
Catch up on the biggest open source headlines from the past two weeks.
![][1]
In this edition of our open source news roundup, we take a look at GNOME Foundation's new contributor program, a new Linux integrity checker from Microsoft, a free software alternative to smart TVs, and more!
### GNOME Foundation launches a new contributor program
A key part of keeping open source communities vibrant and healthy is bringing in new contributors. To help promote this, the GNOME Foundation and Endless teamed up to launch the inaugural [Community Engagement Challenge][2]. Phase one launched this week by opening the call for submitting project applications. Candidate projects should be aimed at bringing beginners into open source and encouraging ongoing participation in open source communities. Projects dont have to be coding, they can also be games, videos, written materials, and so on.
A panel of judges will select 20 projects to participate in phase two, where ideas will be turned into proofs of concept. At each phase, cash prizes will be awarded. [Proposals][3] are due July 1, 2020.
### Microsoft announces code integrity checker for Linux
When you run a program, you want it to be the one you think youre running. This week, Microsoft announced [Integrity Policy Enforcement][4] (IPE), a Linux Security Model released under the GPLv2.
IPE is targeted toward specific-purpose devices like network firewalls, not for general-purpose computing. It provides runtime verification that the code being executed matches the desired version. This allows administrators to detect and block altered binaries.
IPE is currently in the Request for Comments stage on the [linux-security-module][5] mailing list.
### KDE announces Plasma Bigscreen
I recently bought a new TV and, if you havent been in the market lately, its hard to find “dumb” televisions. I didnt want a smart TV because I worry about the manufacturer abandoning the software and what the device might do with my data. So KDEs recent [Plasma Bigscreen][6] announcement caught my eye.
Plasma Bigscreen takes the KDE Plasma interface I use every day and combines it with [Mycroft AI][7] to turn single-board computers into a smart TV. The beta, released last month, includes support for the Raspberry Pi 4 (Model B).
### In other news
* [IVPN for Android is now available on F-Droid][8]
* [IBM gives Outreachy $50,000 grant][9]
* [Warren For President Tech Team open source many of their projects][10]
* [Firefox 75.0 is released with a redesigned address bar and distribution via Flatpak][11]
* [LineageOS releases version 17.1 based on Android 10][12]
* [Linux kernel 5.6 released][13]
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/news-april-11
作者:[Ben Cotton][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/bcotton
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/weekly_news_roundup_tv.png?itok=tibLvjBd
[2]: https://www.gnome.org/challenge
[3]: https://surveys.gnome.org/index.php/986379?lang=en
[4]: https://microsoft.github.io/ipe/
[5]: https://lore.kernel.org/linux-security-module/20200406181045.1024164-1-deven.desai@linux.microsoft.com/T/#m297116cd00666428c2ae3e627ff39653ebb691fb
[6]: https://dot.kde.org/2020/03/26/plasma-tv-presenting-plasma-bigscreen
[7]: https://mycroft.ai/
[8]: https://www.ivpn.net/blog/ivpn-for-android-is-now-available-on-f-droid
[9]: https://developer.ibm.com/blogs/ibm-second-open-source-community-grant-outreachy/
[10]: https://medium.com/@teamwarren/open-source-tools-from-the-warren-for-president-tech-team-f1f27d2c7551
[11]: https://www.mozilla.org/en-US/firefox/75.0/releasenotes/
[12]: https://lineageos.org/Changelog-24/
[13]: https://lore.kernel.org/lkml/CAHk-=wi9ZT7Stg-uSpX0UWQzam6OP9Jzz6Xu1CkYu1cicpD5OA@mail.gmail.com/

View File

@ -1,56 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Ethernet consortium announces completion of 800GbE spec)
[#]: via: (https://www.networkworld.com/article/3538529/ethernet-consortium-announces-completion-of-800gbe-spec.html)
[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/)
Ethernet consortium announces completion of 800GbE spec
======
The specification for 800GbE doubles the maximum speed of the current Ethernet standard, but also tweaks other aspects including latency.
Martyn Williams/IDGNS
The industry-backed Ethernet Technology Consortium has announced the completion of a specification for 800 Gigabit Ethernet technology.
Based on many of the technologies used in the current top-end 400 Gigabit Ethernet protocol, the new spec is formally known as 800GBASE-R. The consortium that designed it (then known as the 25 Gigabit Ethernet Consortium) was also instrumental in developing the 25, 50, and 100 Gigabit Ethernet protocols and includes Broadcom, Cisco, Google, and Microsoft among its members.
**[ Now see [the hidden cause of slow internet and how to fix it][1].]**
The 800GbE spec adds new media access control (MAC) and physical coding sublayer (PCS) methods, which tweaks these functions to distribute data across eight physical lanes running at a native 106.25Gbps. (A lane can be a copper twisted pair or in optical cables, a strand of fiber or a wavelength.)  The 800GBASE-R specification is built on two 400 GbE 2xClause PCSs to create a single MAC which operates at a combined 800Gbps.
And while the focus is on eight 106.25G lanes, it's not locked in. It is possible to run 16 lanes at half the speed, or 53.125Gbps.
The new standard offers half the latency of 400G Ethernet specification, but the new spec also cuts the forward error correction (FEC) overhead on networks running at 50 Gbps, 100 Gbps, and 200 Gbps by half, thus reducing the packet-processing load on the NIC.
By lowering latency this will feed the need for speed in latency-sensitive applications like [high-performance computing][2] and artificial intelligence, where lots of data needs to be moved around as fast as possible.
[][3]
Doubling from 400G to 800G wasnt too great of a technological leap. It meant adding more lanes at the same transfer rate, with a few tweaks. But breaking a terabit, something Cisco and other networking firms have been talking about for a decade, will require a significant reworking of the technology and wont be an easy fix.
It likely wont be cheap, either. 800G works with existing hardware and 400GbE switches are not cheap, running as high as six figures. Moving past the terabit barrier with a major revision to the technology will likely be even more expensive. But for hyperscalers and HPC customers, thats par for the course.
The ETC didnt say when to expect new hardware supporting the 800G, but given its modest change to existing specs, it could appear this year, assuming the pandemic-induced shutdown doesnt throw a monkey wrench into plans.
Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3538529/ethernet-consortium-announces-completion-of-800gbe-spec.html
作者:[Andy Patrizio][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.networkworld.com/author/Andy-Patrizio/
[b]: https://github.com/lujun9972
[1]: https://www.networkworld.com/article/3107744/internet/the-hidden-cause-of-slow-internet-and-how-to-fix-it.html
[2]: https://www.networkworld.com/article/3444399/high-performance-computing-do-you-need-it.html
[3]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy)
[4]: https://www.facebook.com/NetworkWorld/
[5]: https://www.linkedin.com/company/network-world

View File

@ -1,73 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (messon007)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (What is the internet backbone and how it works)
[#]: via: (https://www.networkworld.com/article/3532318/what-is-the-internet-backbone-and-how-it-works.html)
[#]: author: (Tim Greene https://www.networkworld.com/author/Tim-Greene/)
What is the internet backbone and how it works
======
Tier 1 internet service providers (ISP) mesh their high-speed fiber-optic networks together to create the internet backbone, which moves traffic efficiently among geographic regions.
[Gerd Altmann][1] [(CC0)][2]
The internet generates massive amounts of computer-to-computer traffic, and insuring all that traffic can be delivered anywhere in the world requires the aggregation of a vast array of high-speed networks collectively known as the internet backbone, but how does that work?
### What is the internet backbone?
Like any other network, the internet consists of access links that move traffic to high-bandwidth routers that move traffic from its source over the best available path toward its destination. This core is made up of individual high-speed fiber-optic networks that peer with each other to create the internet backbone.
The individual core networks are privately owned by Tier 1 internet service providers (ISP), giant carriers whose networks are tied together. These providers include AT&amp;T, CenturyLink, Cogent Communications, Deutsche Telekom, Global Telecom and Technology (GTT), NTT Communications, Sprint, Tata Communications, Telecom Italia Sparkle, Telia Carrier, and Verizon.
[[Get regularly scheduled insights by signing up for Network World newsletters.]][3]
By joining these long-haul networks together, Tier 1 ISPs create a single worldwide network that gives all of them access to the entire internet routing table so they can efficiently deliver traffic to its destination through a hierarchy of progressively more local ISPs.
In addition to being physically connected, these backbone providers are held together by a shared network protocol, TCP/IP. They are actually two protocols, transport control protocol and internet protocol that set up connections between computers, insuring that the connections are reliable and formating messages into packets.
### Internet exchange points (IXP) tie the backbone together
Backbone ISPs connect their networks at peering points, neutrally owned locations with high-speed switches and routers that move traffic among the peers. These are often owned by third parties, sometimes non-profits, that facilitate unifying the backbone.
Participating Tier 1 ISPs help fund the IXPs, but dont charge each other for transporting traffic from the other Tier 1 ISPs in a relationship known as settlement-free peering. Such agreements eliminate potential financial disputes that might have the result of slowing down internet performance.
[][4]
### How fast is the backbone?
The internet backbone is made up of the fastest routers, which can deliver 100Gbps trunk speeds. These routers are made by vendors including Cisco, Extreme, Huawei, Juniper, and Nokia, and use the border gateway protocol (BGP) to route traffic among themselves.
### How traffic gets on the backbone
Below the Tier 1 ISPs are smaller Tier 2 and Tier 3 ISPs.
Tier 3 providers provide businesses and consumers with access to the internet. These providers have no access of their own to the internet backbone, so on their own would not be able to connect their customers to all of the billions of internet-attached computers.
Buying access to Tier 1 providers is expensive. So often Tier 3 ISPs contract with Tier 2 (regional) ISPs that have their own networks that can deliver traffic to a limited geographic area but not to all internet-attached devices.
In order to do that, Tier 2 ISPs contract with Tier 1 ISPs for access to the global backbone, and in that way make the entire internet accesssible to their customers.
This arrangment makes it possible for traffic from a computer on one side of the world to connect to one on the other side. That traffic goes from a source computer to a Tier 3 ISP that routes it to a Tier 2 ISP that routes it to a Tier 1 backbone provider that routes it to the appropriate Tier 2 ISP that routes it to a Tier 3 access provider that delivers it to the destination computer.
Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3532318/what-is-the-internet-backbone-and-how-it-works.html
作者:[Tim Greene][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.networkworld.com/author/Tim-Greene/
[b]: https://github.com/lujun9972
[1]: https://pixabay.com/en/social-media-digitization-faces-3271592/
[2]: https://creativecommons.org/publicdomain/zero/1.0/
[3]: https://www.networkworld.com/newsletters/signup.html
[4]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage)
[5]: https://www.facebook.com/NetworkWorld/
[6]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,116 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (My 10 guiding principles for open source community management)
[#]: via: (https://opensource.com/article/20/4/open-source-community-management)
[#]: author: (Florian Effenberger https://opensource.com/users/floeff)
My 10 guiding principles for open source community management
======
It's not just about subject matter expertise; leadership in the open
source world requires special skills and processes.
![community team brainstorming ideas][1]
Many activities these days, be they sports, social work, arts or free and open source software, are organized in some sort of community. If backed by a respective legal entity, this not only helps with getting donations and entering contracts but also puts statutes and rules in place that establish the values and ideals all contributors share and abide by.
Inside these communities, there can be various roles. Some of them have formal requirements and annual or biannual elections, e.g., the board of directors or the supervisory board; others exist ad hoc within dynamically grown groups and can change frequently. Either of those are ideally composed of experienced and enthusiastic community members who take leadership and responsibility.
Many regular contributors will, therefore, eventually face the question of whether to accept a certain role. Based on my experience with being a board member of the former German associations [OpenOffice.org][2] Deutschland e.V. and Freies Office Deutschland e.V., previous chairman and current executive director of [The Document Foundation][3] and founding member of the Munich [Open-Source-Treffen e.V.][4], I would like to share some personal insights on the topic.
These views are purely my own, and your mileage might vary. It is likely that others had both similar and different experiences, so I'm looking forward to any feedback and thoughts you might have.
### 1\. Cooperation
A community is all about cooperation. Boards, groups, and bodies are no different in this regard. Usually, you don't know who will co-serve on an elected committee with you until shortly before you start your duty. Therefore, it is important to cooperate openly with your new colleagues in a transparent, trustworthy, and effective way, within the committee as well as the larger community.
Sharing a common understanding of responsibilities and duties, and even more importantly, of your goals, visions, and plans can help a lot. It's not necessary for these to all be totally aligned in the first place, as long as there are consensus and compromise to help you identify goals that benefit the community and their objectives at large. In a vivid and diverse community, several goals can often be pursued at once, as most won't be mutually exclusive or otherwise prohibitive.
And then let's not forget one thing: the fun! Be proud that you have been entrusted by your peers to drive the community and its projects toward a bright future. Be proud that you can help steer the ship and shape the soul of something that is important to you. As is often the case in life, cooperating and working together with others is key to success. Joining forces is not only easier but also much more fun than working alone.
### 2\. Commitment
Taking over a role is something that can and should make you proud. See this as something you have been entrusted with for a certain amount of time because your contributions have been recognized by the community as extraordinary and remarkable. You acted in a visible and trustworthy fashion, and people credit you with leadership skills.
Depending on the role you take, the honor often comes with a fair amount of new responsibility beyond what you already do, and it might involve subjects yet unknown to you. In other words: Be ready to put in some time and effort.
How much time such a commitment takes obviously depends on multiple factors: what specific role you take, how many contributors you have to coordinate with, how large your organization is, and of course, what kind of projects you run. [In one of its annual reports][5], board members of The Document Foundation explained that every year "they each donate 15 to 20 days of activity to TDF for Board duties in addition to other volunteering" and the members of its membership committee donate "between 10 and 15 days of activity."
### 3\. Variety
Should you be elected into an organizations' formal body, you will see yourself responsible for representing the entity from a marketing perspective, but also from a legal and organizational point of view. Other than the more glamorous parts, these duties often also entail regular meetings, annual budget planning and reserve building, tax filings and annual activity reports, team management, trademark and copyright handling, planning and overseeing tenders, and all sorts of expected and unexpected legal matters and fostering liaisons with other entities, all of which are rather unglamorous tasks rarely seen by the general public.
That requires the willingness to learn in a variety of areas and for having a rather high tolerance for frustration. Luckily, most of the groups I know are composed of members with different skills, so it's likely someone is either already experienced in or willing to learn one or more of the respective areas. Looking at The Document Foundation's [rules of procedure][6] for the board, a total of 13 different areas of oversight can be identified, each one staffed with one or more volunteers, matched to their area of interest.
### 4\. Delegation
Handling all the work alone as a pure volunteer will sooner or later become an impossible task and, unless you have magical superpowers, it's strongly advisable to share these with other seat holders, volunteers, and, if they exist, staff and external professionals. Often, growing organizational demands luckily come together with the financial growth of the entity, which makes paying professionals for certain tasks quite feasible and sensible. Accounting, administration, and legal advice are prime examples of things to outsource (unless that's the service you already provide, of course).
If you oversee a large part of the organization, you primarily need to focus on strategy and the mission at large, so it is advisable to delegate many tasks to others. Remember, the community has entrusted you to steer the ship, to oversee the big picture; don't bother yourself with every little detail and micromanagement, but get enough insight to oversee those you task and trust that they do a good job.
### 5\. Responsibility
In the end, however, it still is the ultimate and shared responsibility of all representatives to oversee and coordinate the work, ensure all duties are fulfilled, and, especially for board members, take care that all legal obligations are met. Remember, donors trust you to make good use of their money, so you have a huge responsibility.
In nearly all legislations, there exist numerous rules and regulations you are bound by, and the unfortunate tendency is often to make things more complicated instead of relaxing them.
In case something goes wrong, those most exposed are first in line to be confronted with that, both from a social and legal point of view.
### 6\. Social
Depending on the size of the organization and your role, you might not only have responsibility for tasks and projects, but also for a paid team. Keep in mind that, for many, their economic situation depends on the success of your organization. Job security and a positive work environment are important factors to keep a happy and dedicated team.
Gaining the skills and finding the time as a pure volunteer to oversee a large full-time team is demanding. Interacting by talking, listening, and being open helps a lot for both your team and the organization. In many organizations, the paid team is there to serve your community, to drive forward the success of the project, to take away annoying administrative tasks from you, and to work on tasks that support and enable your contributors.
Working at charities can be a bit different from companies. Given most of your income consists of donor's money, you have less monetary flexibility than commercial employers. However, you provide a far superior experience than many traditional businesses. Use that as your advantage—your team does something for the good cause, can work with people around the world, can really make a difference, and at the same time make a living out of what they love. Communicate frequently, and don't forget to laud people if they do a good job, especially in remote working environments.
### 7\. Diversity
Crucial and essential is that representatives reflect the diversity of the community—different genders, religions, languages, cultures, backgrounds, and experiences add an incredibly exciting variety that you should aim hard to achieve in any board, committee, and group. While this can turn out to be challenging in the beginning, it for sure will enrich your community in ways you never dared to dream of before.
This diversity is one of the most important and exciting assets a larger community offers; you'll soon learn how it widens the view, helps you to question your own thoughts and positions, and contributes greatly to your overall efforts. If you run an open source community, do exactly as the name suggests—be open, be passionate, and try to get to the bottom of things!
### 8\. Coordination
Having members from around the globe can make you face some practical problems though—most notably, languages and time zones. While English as a common denominator is spoken widely in Europe, it might be different for other countries, and including those who don't speak English as their mother tongue is key if you have a large community. You risk losing vital insight into what your worldwide community does if you don't manage to connect to them.
Something the law of physics at least currently doesn't allow is overcoming the different time zones. Finding suitable meeting slots for participants on different continents, matching everyone's working schedule, and providing a work-life balance aren't trivial requirements, especially when you want to include a paid team. As you end your workday, colleagues from a different continent are just about to start theirs. While the volunteers need meeting times after office hours, your staff would probably rather not stay in the office until late or during the weekends.
Likely there isn't an ideal meeting time, but you will end up finding a compromise that works for most people, possibly including alternate meeting times. A word to the wise: use calendar invites and meeting planners with time zones to avoid confusion, especially during times of daylight savings changes.
The choice of medium is important as well—all stakeholders need to be aware of and included in important discussions. Some of these are thus better done in email; others are easier to handle on the phone. You might also find it convenient to prepare initial discussions via emails and have the final vote on the phone.
Properly prefixing email subjects with votes and discussions can likewise be helpful to handle the influx of messages and catch people's attention. The same is true for meeting intervals, agendas, deadlines, quorum requirements, and sunset periods—these need to reflect everyone's needs, factoring in availabilities, vacations, and absences. The rationale behind this is that taking a role requires continuous, active participation in many communities, to keep up with what's going on, and that is much easier when the rules are clear.
Depending on your setup and the jurisdiction you're in, votes and meetings also have formal requirements you have to stick to.
### 9\. Trust
Trustworthiness is probably one of the most important characteristics for anyone who fills a leadership role. Email conversations lack tone and gestures, making it harder to understand moods, emotions, and intentions. Thus it's even more important to assume best intentions on each side, trying to avoid what is known as confirmation bias, i.e., interpreting actions and words in a way that seems to confirm your existing negative assumptions.
Trust especially comes into play when the entity is located in a country whose language you don't speak or whose legal system you are not familiar with—you will have to rely on translation services and people acting as gateways, be they volunteers or paid professionals.
### 10\. Reward
Filling a community role usually means plenty of hard work on top of your existing duties, but there are plenty of rewards for all that work. It is a very honorable and truly exciting opportunity that will not only enrich your professional life (and makes a good item on a CV) but beyond that, enriches your personality, your skills, and your point of view. If you're passionate about what you do, if you're open to new things, if you want to shape the future of what you love—then you indeed might be a great candidate to serve the community and lead by example.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/open-source-community-management
作者:[Florian Effenberger][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/floeff
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/meeting_discussion_brainstorm.png?itok=7_m4CC8S (community team brainstorming ideas)
[2]: http://OpenOffice.org
[3]: https://www.documentfoundation.org/
[4]: https://www.opensourcetreffen.de/
[5]: https://wiki.documentfoundation.org/File:AnnualReport2016LR.pdf
[6]: https://wiki.documentfoundation.org/TDF/BoD_rules

View File

@ -0,0 +1,102 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Why I use open source technology for web development)
[#]: via: (https://opensource.com/article/20/4/open-source-web-development)
[#]: author: (Jimmy McArthur https://opensource.com/users/jimmymcarthur)
Why I use open source technology for web development
======
Micro-frontends with an API-driven approach power the OpenStack
Foundation's platforms.
![Text editor on a browser, in blue][1]
Every day, millions of people all over the world access the [OpenStack Foundation][2]'s (OSF) web properties to learn about open infrastructure. This level of usage requires a platform and toolsets that are fast, flexible, and affordable—and this is where open source comes in. Not only that, but given that we work for an open source software foundation, we naturally incorporate open source technologies into everything we do, including web development.
### Considerations for web development
When thinking about web development technologies, we must consider how we manage our software lifecycles. All software development includes some sort of [lifecycle management][3] with the opportunity to plan, analyze, design, and implement the code. Our web development team usually works on the fly, often under tight deadlines, and with other departments. That means our requirements and workflow must be flexible enough to allow for quick iterations, updates, and corrections. I'd rather push out something quickly and, if needed, go back in and make things pixel perfect after the fact.
Our team also has to consider all the stakeholders involved in the website, including our talented marketing teams who aren't familiar with Git workflows. That led us, like many others, to utilize a content management system (CMS), so those professionals can make updates without having to use Git.
### Building a CMS-agnostic web architecture
In order to uphold this need for flexibility, traditionally, we relied on an open source CMS, [SilverStripe][4]. However, our requirements quickly outgrew the system. So, we built a standalone API and use static micro-sites with [React][5] JavaScript components to pull data into custom-designed presentation layers. We use this system in everything from mobile apps to websites to digital signs. This has become known as a [Jamstack][6] architecture. We found this model was extensible enough that it allowed us to move our data anywhere while being CMS-agnostic.
When adopting this API-driven workflow, we realized that our data was used in many different places and presented in many different ways. Across our seven web properties, we share everything from graphics to dynamic content. A standard CMS won't do this without a lot of custom development work along with either cron jobs or costly database queries.
When things are API-driven, you can access all these different datasets across a variety of platforms while largely protecting your infrastructure from major traffic spikes. For example, the OSF collaborated with [Tipit][7], the OSF's digital design and development partner, to develop a completely open source end-to-end event management software. Our event-schedule data is presented on web pages, mobile apps, and digital signage. It's the same data, managed from a single place, but with different presentation layers, formats, and platforms.
### Open source identity access management
A cornerstone of moving to a decentralized Jamstack architecture is the need to establish identity and access rights. When using JavaScript to call for things in an API, we may need to require authentication and authorization. Therefore, we had to separate the identity provider from any individual implementation. There are two concepts to this: identity (authN) and identity access management (authZ). The identity provider confirms who you are, while access management confirms what roles and permissions you have to do different things. One of the first requirements when developing the event-management software was to establish a standalone identity provider.
Enter [OpenStackID][8], which is an [OpenID Connect][9] with oAuth2 SSO solution. OpenStackID started out as a more secure way for users to log into [Openstack.org][10] and manage their profiles. Even as the number of websites and event apps we manage grows, this creates a seamless authentication experience for users. The access-management portion allows us to build standalone React-based apps that use the identity provider to determine if a particular user has the rights to do the things they want to do in that specific application.
One thing that runs through everyone's mind—especially in a global open source community—is privacy. It's a large factor in creating our web and event properties. With OpenStackID, users can log into their [OpenStackID account][11] and set application permissions using the OAuth 2 console. If they decide they no longer want their app associated with their OpenStackID, they can simply remove permissions.
For example, we have users for our events that do not want their personal information to be associated with their presence at our conferences. The way the platforms are set up, all personally identifiable data is managed securely on the OpenID server, and it's not shared between applications unless the user strictly enables it. Beyond that, we never share things like the events a user attends or pieces of their user profile unless it's completely anonymized, or they specifically allow it in order to remain aligned with the [Four Opens][12] or our community philosophy.
### Better web infrastructure using open source
Taking our considerations and shifting toward a more flexible implementation of a CMS has helped our teams collaborate more effectively. Most importantly, we continue to follow our community values by providing great privacy and security options thanks to open source technology.
If you're interested in our approach, check out the OSF Foundation website's [source code][13]. You can also access the following source code repos to see the approach in action:
* [Zuul website][14]
* [Airship website][15]
* [StarlingX website][16]
* [Kata Containers website][17]
* [MOC and Open Infra Labs website][18]
* [Open Stack Foundation website][19]
* [Open Infrastructure Summit admin][20]
* [Open Infrastructure Summit CFP][21]
* [Open Infrastructure Summit Signage][22]
* [OpenStack Survey GraphQL API to access survey data and reports][23]
* [OpenStack Survey Graphene API to feed summit reports][24]
* [OpenStackID authentication system][25]
* [OpenStackID resource server][26]
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/open-source-web-development
作者:[Jimmy McArthur][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/jimmymcarthur
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_blue_text_editor_web.png?itok=lcf-m6N7 (Text editor on a browser, in blue)
[2]: https://osf.dev/
[3]: https://en.wikipedia.org/wiki/Systems_development_life_cycle
[4]: https://www.silverstripe.org/
[5]: https://reactjs.org/
[6]: https://jamstack.org/
[7]: https://www.tipit.net/
[8]: https://opendev.org/explore/repos?q=openstackid&tab=&sort=recentupdate
[9]: https://openid.net/connect/
[10]: http://Openstack.org
[11]: https://openstackid.org/
[12]: https://osf.dev/about/four-opens/
[13]: https://github.com/OpenStackweb/openstack-org
[14]: https://opendev.org/zuul/zuul-website
[15]: https://github.com/AirshipWeb/airship-website
[16]: https://github.com/StarlingXWeb/starlingx-website
[17]: https://github.com/kata-containers/www.katacontainers.io
[18]: https://github.com/OpenStackweb/openinfralabs-website
[19]: https://github.com/OpenStackweb/osf-website
[20]: https://github.com/OpenStackweb/summit-admin
[21]: https://github.com/OpenStackweb/call-for-presentations
[22]: https://github.com/OpenStackweb/openstacksignage
[23]: https://github.com/OpenStackweb/openstack-survey-api
[24]: https://github.com/OpenStackweb/summit-reports-api
[25]: https://opendev.org/osf/openstackid
[26]: https://opendev.org/osf/openstackid-resources

View File

@ -0,0 +1,61 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How underwater Internet of Things will work)
[#]: via: (https://www.networkworld.com/article/3538393/how-underwater-internet-of-things-will-work.html)
[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/)
How underwater Internet of Things will work
======
Lasers will be used to power underwater devices and transmit data below the ocean's surface.
North Sea Port
More than two-thirds of the world's surface is covered by water. It plays an important role in our economic existence, including in major verticals such as oil and gas, shipping and tourism.
As the Internet of Things proliferates, questions arise as to how IoT will manifest itself underwater given that radio waves degrade over distance in seawater, and underwater acoustic communication (which does actually work okay) is easily eavesdropped on and isn't stealthy.
To make the underwater Internet of Things happen, light is the answer, some say. Researchers at King Abdullah University of Science and Technology (KAUST) in Thuwal, Saudi Arabia, are proposing underwater optical communications. They're investigating simultaneous lightwave information and power transfer (SLIPT) configurations, which they're using to transmit energy and data to underwater electronic devices. Recently, the researchers announced a breakthrough experiment in which they were able to achieve an underwater, two-way transmission of data and power over 1.5 yards between a solar panel-equipped sensor and a receiver.
The SLIPT system will be more usable than wires strung. And in the case of human underwater equipment inspections, for example, SLIPT will be less prone to error than hand signals and less prone to audible confusion than ultrasound voice-based communicators. Remarkably, to this day, hand signals are still a common form of communication between divers.
"SLIPT can help charge devices in inaccessible locations where continuous powering is costly or not possible," said Jose Filho, a PhD student at KAUST, [in an article][1] on the school's web site.
Filho, who has been involved in developing the laser project, envisages ships or boats on the water's surface beaming optical communications to underwater vehicles or IoT sensors on the ocean floor. The lasers would simultaneously communicate with and power underwater robots and devices. Return data is relayed to the surface vessel, which then communicates to land bases or data centers via RF (radio).
Surface buoys or even unmanned aerial vehicles (drones) flying well above turbulent waves could be used to inject power down to the seabed surface and, at the same time, receive data, researchers believe.
[][2]
The school explains that there's still much development that needs to be performed before SLIPT is operational, but it sees potential. "Underwater optical communication provides an enormous bandwidth and is useful for reliably transmitting information over several meters," co-first author Abderrahmen Trichili said in the article.
KAUST, located on the Red Sea coast, has been involved in this area of technical exploration for some years. It was involved in developing some early, record-breaking underwater data communications. In 2015 it ran a 4.8 gigabit per second, 16-QAM-OFDM transmission with a 450-nanometer laser. OFDM, or Orthogonal Frequency Division Multiplexing, splits single data streams into multiple channels to reduce interference.
Interestingly, seas and oceans are becoming increasingly important to data centers. Large swaths of the world's population are found on or near coasts, rather than inland, and we're seeing a shift towards edge-style computing that positions resources closer to sources of data. There's also a need for compute cooling, which ocean water can provide. Even wave energy as a method of powering servers means sea and data are becoming intertwined.
Microsoft launched an [undersea water-cooling data center][3] 117 feet below the water surface in 2018. Additionally, garden-hose-sized cables carry almost all global, public Internet traffic [underwater, across oceans and between continents][4]. It's not done through satellite, as many imagine.
So, this is not a brand-new synergy. Apart from the eco-monitoring drivers, one of the likeliest and most important reasons that ocean-based computing is being explored keenly is that there isn't any rent payable or jurisdictional ownership on the high seas.
Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3538393/how-underwater-internet-of-things-will-work.html
作者:[Patrick Nelson][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.networkworld.com/author/Patrick-Nelson/
[b]: https://github.com/lujun9972
[1]: https://discovery.kaust.edu.sa/en/article/952/the-power-of-light-for-internet-of-underwater-things
[2]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy)
[3]: https://www.networkworld.com/article/3283332/microsoft-launches-undersea-free-cooling-data-center.html
[4]: https://www.networkworld.com/article/3004465/how-vulnerable-are-the-internets-undersea-cables.html
[5]: https://www.facebook.com/NetworkWorld/
[6]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,54 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (IoT offers a way to track COVID-19 via connected thermometers)
[#]: via: (https://www.networkworld.com/article/3539058/iot-offers-a-way-to-track-covid-19-via-connected-thermometers.html)
[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/)
IoT offers a way to track COVID-19 via connected thermometers
======
The COVID-19 pandemic has catapulted one manufacturer of connected thermometers to national prominence, as Kinsa provides a possible window into the spread of the disease.
[Kinsa / Leaflet / OpenStreetMap / CARTO][1]
A company called Kinsa is leveraging [IoT][2] tech to create a network of connected thermometers, collecting a huge amount of anonymous health data that could offer insights into the current and future pandemics.
The companys founder and CEO, Inder Singh, said that the ability to track fever levels across the U.S. in close to real time could be a crucial piece of information for both the public at large and for decision-makers in the healthcare sector and government.
[[Get regularly scheduled insights by signing up for Network World newsletters.]][3]
The systems networking technology is relatively straightforward the thermometer connects via Bluetooth to an app on the users phone, which reports anonymized data back to Kinsas cloud over the Internet. Singh emphasizes that the company only organizes data down to the county level, and asserts that identifying individuals through Kinsas data is more or less impossible.
“Were not providing PII, were not providing identified data,” he said. “The app just guides you to the care and services you need.”
Armed with the temperature reading and some basic demographic information about the person whose temperature was taken and their other symptoms, the app can offer rudimentary guidance about whether a visit to the doctor is needed or not, and whether the users area is seeing unusual levels of fever.
However, the real value is in the aggregated data that Kinsa analyzes and breaks out on its [U.S. Health Weather Map][1], gleaned from the million-plus thermometers in the companys ecosystem. The idea, according to Singh, is to provide the public with a way to make more informed decisions about their health.
“Its very participatory,” he said. “Everyone gets the data, and everyone can respond.”
Kinsa still sells its thermometers directly to consumers, but plans are afoot for the company to collaborate more closely with local governments, health authorities and even school districts Singh said that Kinsa is already partnering with two U.S. states (which he declined to name), and several city governments, including St. Augustine, Florida.
“Our hope is that we can figure out how to build a scalable model were never gonna scale globally by just selling $20 thermometers,” he said. The goal is to become widespread enough that the product can act as a meaningful early warning system for the healthcare sector.
Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3539058/iot-offers-a-way-to-track-covid-19-via-connected-thermometers.html
作者:[Jon Gold][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.networkworld.com/author/Jon-Gold/
[b]: https://github.com/lujun9972
[1]: https://healthweather.us/?mode=Atypical
[2]: https://www.networkworld.com/article/3207535/what-is-iot-the-internet-of-things-explained.html
[3]: https://www.networkworld.com/newsletters/signup.html
[4]: https://www.facebook.com/NetworkWorld/
[5]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,72 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Getting to know our new, virtual world)
[#]: via: (https://opensource.com/article/20/4/virtual-community-management)
[#]: author: (Patricia Dugan https://opensource.com/users/patricia-dugan)
Getting to know our new, virtual world
======
Our current forced physical separation could generate innovations that
actually bring our communities closer together.
![Women in computing and open source v5][1]
Witnessing the ongoing global impact of COVID-19 is a profoundly affecting experience that continues to humble us all in ways we couldn't have anticipated. Technology organizations are quickly evolving within this new reality, in which all of our human interactions are virtual until further notice.
### Virtual open source community management
When it comes to nurturing cultures designed to promote and reward open source innovation—as well as communities' economic, technological, and physical wellbeing—I can best speak to those I help build and manage. I believe communities should be built by weaving a tapestry of demographics and ranges of expertise. They should do this in a way that facilitates rich communication and empowers those building open source software to share knowledge with each other.
The move to virtual connection and digitalized events only makes these methods more crucial.
I'll share an example. Recently, I was speaking with a pillar of the Traefik open source community, known as a [Traefik Ambassador][2], based in Turkey, over video conference about a potential webinar. He suggested that, instead, we expand the speaker set to include other community members. Soon, we'd invited other contributors from Poland and Switzerland. We met online, and out of that conversation, the webinar has evolved into a collaborative series with community members taking turns presenting insights and melding different types of software together. What struck me was that if we'd had this conversation just one month ago, it would have simply focused on the creation of an asset. Now, contributors are bonding over a purpose-driven creation, with greater intention around facilitating innovation and excitement.
Based on my experience building and growing open source communities, I believe that this new era of virtual connection offers an unprecedented opportunity for innovation and growth—as long as it is managed with equal focus on the people creating it. Below are five observations on how the world of open source can positively shape the future of innovation in a virtual and seemingly uncertain world.
### The virtual world is flat.
Open source communities, teams, and backing companies provide an exceptional model of how to accelerate innovation. That's especially true in these extraordinary times. At its core, open source democratizes the development process, something we see replicated more widely in our new virtual ecosystems. As the opportunity for input becomes more inclusive, organizations are seeing a flattening in infrastructure, both in communications and in operations. Existing hierarchical power structures are weakening as more voices are heard, and the best ideas are given the chance to rise to the top through greater exposure.
As social distancing makes backchannel and handshake agreements much more complicated to execute, I predict that the traditional dance required to access and take positions in leadership will be replaced by flatter, more open methods that ultimately produce fresher—and better—perspectives. Online communication has a way of laying bare the real substance of interactions and ideas, bolstering meritocracy that's central to the strength of open source.
### The virtual world is fast.
This "flattening" structural shift has the potential to increase the pace and quality of innovation, as virtual events and communications widen the spotlight to now shine a light on previously unseen contributors. Creative minds among engineers, developers, and others outside of traditional leadership positions will leverage their comfort with the web and virtual channels to find each other and collaborate faster. This is nothing new for those in open source, and I expect organizations still clinging to legacy approaches will find themselves investing in learning how to implement flatter, virtual communications structures, and beginning to build them into traditional operational models. This means doubling down on efficiency and being willing to let go of the ["it's always been done this way"][3] mentality.
### The virtual world needs community.
Developers can conserve energy attending virtual events: there's no commute, nor other distractions from the work at hand. Working remotely and connecting only via virtual mediums enables open source contributors to create, share, and use code just about as fast as their brains allow, empowering rapid code contributions, collaborations, and new solutions produced with velocity.
While this shift may result in productivity gains, organizations must be careful of creating the impression that a team member's most important asset is their brain. When open source developers were asked what the best part of their job was, [62% claimed it was their "personal passion."][4] Recognizing individuals as unique contributors to open source communities is necessary and essential to development—both technical and human. During this period, when we're hitting the pause button on in-person interaction, remote interactions via chats, video conferences, and phone calls will enable the human moments necessary for growth and connection. Those in open source rely on the power of community, and this extraordinary time will require the continuous and earnest commitment to it.
### The virtual world is composed of individuals.
The potential for greater innovation and meritocracy through virtual-only channels will only be realized if communities, organizations, and individuals also pursue and achieve wellness. It's crucial for the interpersonal bonds that maintain our energy and psychological health—traditionally forged through real-life, face-to-face contact—to continue to exist as part of the way we now work. If that disappears, there's the risk that our industry and communities become purely transactional, lacking the joy and drive that carries work forward, much less great work and innovation. Developers are especially rooted in a sense of purpose, with [only 3% reporting that money and perks were the best part of their job.][4]
Overall wellness and support to prevent burnout should already have been central considerations for modern organizations, but they are even more important now. Virtual connectivity may set us up to work fast, but that can backfire if we're not also set up to be well.
### The virtual world needs kindness.
I also predict that virtual-only communication will close the distance between our online avatars and ourselves as real people. The impact of "toxic" individuals, hidden behind a computer, with little to no consequence for being a "bad actor," will be reduced and less acceptable. A growing presence of new voices will set the tone, adhering to well thought out codes of conduct, making poor behavior explicitly unwelcome. As much of our connection moves online, the norms that guide our offline behavior will become increasingly important. We'll transition to a less individualistic paradigm, and open source's long history of considering what defines good citizenship will offer insight to those looking to integrate a sense of shared responsibility into organizations.
I feel extremely grateful to be in technology, particularly in the open source world, given it's an industry built upon the promise of innovation. At least for the moment, we as an industry can serve as a lighthouse for connection in difficult times, and as a model for collaboration and intention for those not as familiar with how to be highly productive in a virtual world. For the open source community and beyond, there is a great opportunity to lean into creating as much beneficial virtual culture as we can. Through this experience, we'll all learn new ways of interacting, which will serve us well in the future.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/virtual-community-management
作者:[Patricia Dugan][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/patricia-dugan
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_5.png?itok=YHpNs_ss (Women in computing and open source v5)
[2]: https://info.containo.us/traefik-ambassador-program
[3]: https://goleansixsigma.com/the-most-dangerous-phrase/
[4]: https://www.linuxfoundation.org/wp-content/uploads/2019/10/osjobsreport_2018.pdf

View File

@ -0,0 +1,72 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (FCC boosts Wi-Fi 6 spectrum five-fold)
[#]: via: (https://www.networkworld.com/article/3540288/fcc-boosts-wi-fi-6-spectrum-five-fold.html)
[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/)
FCC boosts Wi-Fi 6 spectrum five-fold
======
The Federal Communications Commission has approved a chunk of wireless spectrum called the 6GHz band for unlicensed use by Wi-Fi 6, and gear that supports it could be available by the end of the year.
[tejasp][1] [(CC0)][2]
The Federal Communications commission has opened up a wide swath of wireless spectrum for unlicensed use by Wi-Fi devices, which will lead to Wi-Fi access points that have greatly expanded capacity.
Its a huge victory for the Wi-Fi industry, as the ruling means that the amount of spectrum available for Wi-Fi just about quintupled in an instant. That means big, spacious channels and a lot more channels overall that can handle a lot more data and a lot more connections at the same time, according to Aruba vice president of wireless strategy and standards Chuck Lukaszewski.
[[Get regularly scheduled insights by signing up for Network World newsletters.]][3]
“Overnight, youre going to see an additional gigabit per second or more of potential throughput,” he said.
Thats a major upside, certainly, even if “overnight” might be a slightly optimistic view of when [Wi-Fi 6E][4] the trade name for the new version of Wi-Fi that will take advantage of the new spectrum hits the market. While some of the necessary standards havent yet been finalized by the IEEE, the basic ability to use 6GHz frequencies is already written into the existing Wi-Fi 6 specification.
Broadcom director of product marketing and government affairs Chris Szymanski said that the main technical hurdle to implementing Wi-Fi 6E will be new radios, but that his company is among those that has already been designing and building compatible silicon.
“I expect that the FCC will provide guidance on how to certify devices in the next few months,” he said. “I expect product available in the US in the late fall before the holidays.”
Enterprise uptake will likely have to wait until compatible smartphones, laptops and the like are on shelves because existing Wi-Fi 6 cliets wont be able to take advantage of the new 6Ghz spectrum.
**[ [Take this mobile device management course from PluralSight and learn how to secure devices in your company without degrading the user experience.][5] ]**
New access points are likely to have three radios in them, as opposed to the usual two, noted senior vice president of Ruckus Wireless and cloud at Commscope Bart Giordano. One each for the existing 2.4GHz and 5GHz bands, and a third for 6Ghz.
“Antennas will be very similar because these spectrums sit next to one another,” he said, “but theres specific tunings you have to do.”
The driving force behind the spectrum expansion is the bottomless demand for capacity caused by the increasing use of wireless just about everywhere. The FCCs announcement cites projections from Cisco that say about 60% of worldwide data traffic will move across Wi-Fi links within the next two years.
Incumbent licensed users of parts of the 6GHz spectrum which are mostly businesses using microwave links for wireless backhaul and public safety services are far less pleased by the FCCs decision. The Utilities Technology Council is one of several groups critical of earlier proposals to open the 6GHz band to broad-based unlicensed use, saying earlier that assurances that existing users would be protected from interference are unconvincing.
“We have and will continue to provide the FCC with technical detail demonstrating the very real interference potential from unlicensed use across all parts of the band and the need for thoroughly tested automated frequency coordination (AFC) to protect incumbent users,” the group said in a statement. “While we appreciate the FCC proposing to require AFC for the standard-power access points, these measures must also be applied to all unlicensed devices in the band to prevent interference to mission-critical utility communications systems.”
Farpoint Group principal and Network World contributor Craig Mathias said that its not going to be a smooth process, but argues that the opening of 6GHz spectrum was too great an opportunity to ignore.
“Yes, its a mess spectral re-allocations always are,” he said. “[But] I don't see any issues here that can't be addressed, and more unlicensed spectrum is of course always desirable.”
Incumbent users of the 6GHz spectrum are unlikely to see the type of interference theyre particularly worried about, he added, given the nature of the connections currently in use and the safeguards in the new rule that are designed to protect existing networks.
“Point-to-point microwave links operate at fairly high power and use both directional antennas and error-checking protocols to ensure reliability and otherwise deal with typical radio issues beyond interference, like the various forms of fading,” said Mathias. “A nearby Wi-Fi transmitter will be operating at much lower power and use its own signal-integrity-management techniques as well. So likely no issues in the vast majority of cases, especially if history is any guide.”
Join the Network World communities on [Facebook][6] and [LinkedIn][7] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3540288/fcc-boosts-wi-fi-6-spectrum-five-fold.html
作者:[Jon Gold][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.networkworld.com/author/Jon-Gold/
[b]: https://github.com/lujun9972
[1]: https://pixabay.com/en/wifi-wireless-device-wi-fi-1371030/
[2]: https://creativecommons.org/publicdomain/zero/1.0/
[3]: https://www.networkworld.com/newsletters/signup.html
[4]: https://www.networkworld.com/article/3238664/80211-wi-fi-standards-and-speeds-explained.html
[5]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fmobile-device-management-big-picture
[6]: https://www.facebook.com/NetworkWorld/
[7]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,89 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Red Hat Enterprise Linux 8.2 Hits the stage)
[#]: via: (https://www.networkworld.com/article/3540189/red-hat-enterprise-linux-82-hits-the-stage.html)
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
Red Hat Enterprise Linux 8.2 Hits the stage
======
RHEL 8.2 has new capabilities for management of hybrid-cloud environments and container tools to help fuel cloud-native development.
Stephen Lawson/IDG
Red Hat Enterprise Linux (RHEL) 8.2 brings new features that include expanded monitoring capabilities in Red Hat Insights for and new container tools, including containerized versions of Skopeo and Buildah.
Red Hat says RHEL 8.2 is arriving at a time when, because of the Covid-19 pandemic, a growing percentage of IT staffers are working remotely. Their ability to support the management and monitoring of operations and their ability to detect and address problems has never been more critical, and upgrades to Red Hat Insights are designed to help.
[[Get regularly scheduled insights by signing up for Network World newsletters.]][1]
### Red Hat Insights
[Red Hat Insights][2], is Red Hats operations and security-risk-management offering and helps detect, diagnose and remediate potential problems before they affect production systems or end users. It was included in RHEL in May 2019.
The latest updates include:
* Improved visibility and  security for managing large, complex environments
* Policy and patch services to help determine which product advisories apply and guidance for problem remediation
* A "drift service" to make it easier to compare baselines, shape strategies that reduce complexity, and make troubleshooting easier
### Monitoring and performance updates
RHEL 8.2 brings some performance upgrades includeing:
* Improved resource management with Control Groups (cgroup) v2, which is designed to reserve and set limits on memory usage to help prevent processes from overconsuming memory and causing system failures or slowdowns.
* Optimizing performance-sensitive workloads via NUMA and sub-NUMA service policies.
* Performance Co-Pilot (PCP) 5.0.2 which adds collection agents for Microsoft SQL Server 2019 to gather and analyze SQL Server metrics to draw a clearer picture of database and operating-system performance.
* Red Hat subscription watch,a service for viewing and managing RHEL and Red Hat OpenShift Container Platform subscriptions.
### Evolving container tools
RHEL 8.2 includes new container tools that are supported for 24 months as part of Red Hat's Tech Preview, which provides early access to new products. The tools include Buildah for building and Skopeo for transferring container images.
The new relase also introduces Udica, a policy tool for containerized SELinux that can make it less likely that processes will break out of containers and cause problems to other containers or the host.
[][3]
Red Hat Enterprise Linux 8.2 also introduces enhancements to the Red Hat Universal Base Image, including:
* OpenJDK and .NET 3.0 for developing  certification-ready cloud-native Red Hat applications
* **Improved access to source code associated with a given image through a single command**, making it easier for Red Hat partners to meet source code requirements for open source licensing needs.
### Ease of use
Other new features are meant to make it easier to manage RHEL:
* RHEL subscription registration as part of the installation process, making it easier to on-board new installations.
* Enabling Red Hat Insights during installation to simplify the launch of Insights for Red Hat Enterprise Linux deployments.
* Refinement and control of the Red Hat Enterprise Linux life cycle with testing for in-place upgrades, Red Hat Insights rules to help with upgrades, and the [Convert2 RHEL][4] tool that can help shift workloads from unsupported clones like CentOS to RHEL.
Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3540189/red-hat-enterprise-linux-82-hits-the-stage.html
作者:[Sandra Henry-Stocker][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.networkworld.com/author/Sandra-Henry_Stocker/
[b]: https://github.com/lujun9972
[1]: https://www.networkworld.com/newsletters/signup.html
[2]: https://www.redhat.com/en/blog/expanding-management-operational-and-security-risks-new-red-hat-insights
[3]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy)
[4]: https://www.redhat.com/en/blog/convert2rhel-how-update-rhel-systems-place-subscribe-rhel
[5]: https://www.facebook.com/NetworkWorld/
[6]: https://www.linkedin.com/company/network-world

View File

@ -1,3 +1,4 @@
//messon007 translating
Systemd Services: Reacting to Change
======

View File

@ -1,3 +1,4 @@
//translating by messon007
Systemd Services: Monitoring Files and Directories
======

View File

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

View File

@ -1,98 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (What is Silverblue?)
[#]: via: (https://fedoramagazine.org/what-is-silverblue/)
[#]: author: (Tomáš Popela https://fedoramagazine.org/author/tpopela/)
What is Silverblue?
======
![][1]
Fedora Silverblue is becoming more and more popular inside and outside the Fedora world. So based on feedback from the community, here are answers to some interesting questions about the project. If you do have any other Silverblue related questions, please leave it in the comments section and we will try to answer them in a future article.
### What is Silverblue?
Silverblue is a codename for the new generation of the desktop operating system, previously known as Atomic Workstation. The operating system is delivered in images that are created by utilizing the _[rpm-ostree][2]_ [project][2]. The main benefits of the system are speed, security, atomic updates and immutability.
### What does “Silverblue” actually mean?
“Team Silverblue” or “Silverblue” in short doesnt have any hidden meaning. It was chosen after roughly two months when the project, previously known as Atomic Workstation was rebranded. There were over 150 words or word combinations reviewed in the process. In the end _Silverblue_ was chosen because it had an available domain as well as the social network accounts. One could think of it as a new take on Fedoras blue branding, and could be used in phrases like “Go, Team Silverblue!” or “Want to join the team and improve Silverblue?”.
### What is ostree?
[OSTree or libostree is a project][3] that combines a “git-like” model for committing and downloading bootable filesystem trees, together with a layer to deploy them and manage the bootloader configuration. OSTree is used by rpm-ostree, a hybrid package/image based system that Silverblue uses. It atomically replicates a base OS and allows the user to “layer” the traditional RPM on top of the base OS if needed.
### Why use Silverblue?
Because it allows you to concentrate on your work and not on the operating system youre running. Its more robust as the updates of the system are atomic. The only thing you need to do is to restart into the new image. Also, if theres anything wrong with the currently booted image, you can easily reboot/rollback to the previous working one, if available. If it isnt, you can download and boot any other image that was generated in the past, using the _ostree_ command.
Another advantage is the possibility of an easy switch between branches (or, in an old context, Fedora releases). You can easily try the _[Rawhide][4]_ or _[updates-testing][5]_ branch and then return back to the one that contains the current stable release. Also, you should consider Silverblue if you want to try something new and unusual.
### What are the benefits of an immutable OS?
One of the main benefits is security. The base operating system is mounted as read-only, and thus cannot be modified by malicious software. The only way to alter the system is through the _rpm-ostree_ utility.
Another benefit is robustness. Its nearly impossible for a regular user to get the OS to the state when it doesnt boot or doesnt work properly after accidentally or unintentionally removing some system library. Try to think about these kind of experiences from your past, and imagine how Silverblue could help you there.
### How does one manage applications and packages in Silverblue?
For graphical user interface applications, [Flatpak][6] is recommended, if the application is available as a flatpak. Users can choose between Flatpaks from either Fedora and built from Fedora packages and in Fedora-owned infrastructure, or Flathub that currently has a wider offering. Users can install them easily through GNOME Software, which already supports Fedora Silverblue.
One of the first things users find out is there is no _dnf_ preinstalled in the OS. The main reason is that it wouldnt work on Silverblue — and part of its functionality was replaced by the _rpm-ostree_ command. Users can overlay the traditional packages by using the _rpm-ostree install PACKAGE_. But it should only be used when there is no other way. This is because when the new system images are pulled from the repository, the system image must be rebuilt every time it is altered to accommodate the layered packages, or packages that were removed from the base OS or replaced with a different version.
Fedora Silverblue comes with the default set of GUI applications that are part of the base OS. The team is working on porting them to Flatpaks so they can be distributed that way. As a benefit, the base OS will become smaller and easier to maintain and test, and users can modify their default installation more easily. If you want to look at how its done or help, take a look at the official [documentation][7].
### What is Toolbox?
[_Toolbox_][8] is a project to make containers easily consumable for regular users. It does that by using _podman_s rootless containers. _Toolbox_ lets you easily and quickly create a container with a regular Fedora installation that you can play with or develop on, separated from your OS.
### Is there any Silverblue roadmap?
Formally there isnt any, as were focusing on problems we discover during our testing and from community feedback. Were currently using Fedoras [Taiga][9] to do our planning.
### Whats the release life cycle of the Silverblue?
Its the same as regular Fedora Workstation. A new release comes every 6 months and is supported for 13 months. The team plans to release updates for the OS bi-weekly (or longer) instead of daily as they currently do. That way the updates can be more thoroughly tested by QA and community volunteers before they are sent to the rest of the users.
### What is the future of the immutable OS?
From our point of view the future of the desktop involves the immutable OS. Its safest for the user, and Android, ChromeOS, and the last macOS Catalina all use this method under the hood. For the Linux desktop there are still problems with some third party software that expects to write to the OS. HP printer drivers are a good example.
Another issue is how parts of the system are distributed and installed. Fonts are a good example. Currently in Fedora theyre distributed in RPM packages. If you want to use them, you have to overlay them and then restart to the newly created image that contains them.
### What is the future of standard Workstation?
There is a possibility that the Silverblue will replace the regular Workstation. But theres still a long way to go for Silverblue to provide the same functionality and user experience as the Workstation. In the meantime both desktop offerings will be delivered at the same time.
### How does Atomic Workstation or Fedora CoreOS relate to any of this?
Atomic Workstation was the name of the project before it was renamed to Fedora Silverblue.
Fedora CoreOS is a different, but similar project. It shares some fundamental technologies with Silverblue, such as _rpm-ostree_, _toolbox_ and others. Nevertheless, CoreOS is a more minimal, container-focused and automatically updating OS.
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/what-is-silverblue/
作者:[Tomáš Popela][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/tpopela/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/what-is-fedora-silverblue-816x345.jpg
[2]: https://rpm-ostree.readthedocs.io/en/latest/
[3]: https://ostree.readthedocs.io/en/latest/
[4]: https://fedoraproject.org/wiki/Releases/Rawhide
[5]: https://fedoraproject.org/wiki/QA:Updates_Testing
[6]: https://flatpak.org/
[7]: https://docs.fedoraproject.org/en-US/flatpak/tutorial/
[8]: https://github.com/debarshiray/toolbox
[9]: https://teams.fedoraproject.org/project/silverblue/

View File

@ -1,188 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (robsean)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to make a Halloween lantern with Inkscape)
[#]: via: (https://opensource.com/article/19/10/how-make-halloween-lantern-inkscape)
[#]: author: (Jess Weichler https://opensource.com/users/cyanide-cupcake)
How to make a Halloween lantern with Inkscape
======
Use open source tools to make a spooky and fun decoration for your
favorite Halloween haunt.
![Halloween - backlit bat flying][1]
The spooky season is almost here! This year, decorate your haunt with a unique Halloween lantern made with open source!
Typically, a portion of a lantern's structure is opaque to block the light from within. What makes a lantern a lantern are the parts that are missing: windows cut from the structure so that light can escape. While it's impractical for lighting, a lantern with windows in spooky shapes and lurking silhouettes can be atmospheric and a lot of fun to create.
This article demonstrates how to create your own lantern using [Inkscape][2]. If you don't have Inkscape, you can install it from your software repository on Linux or download it from the [Inkscape website][3] on MacOS and Windows.
### Supplies
* Template ([A4][4] or [Letter][5] size)
* Cardstock (black is traditional)
* Tracing paper (optional)
* Craft knife, ruler, and cutting mat (a craft cutting machine/laser cutter can be used instead)
* Craft glue
* LED tea-light "candle"
_Safety note:_ Only use battery-operated candles for this project.
### Understanding the template
To begin, download the correct template for your region (A4 or Letter) from the links above and open it in Inkscape.
* * *
* * *
* * *
**![Lantern template screen][6]**
The gray-and-white checkerboard background is see-through (in technical terms, it's an _alpha channel_.)
The black base forms the lantern. Right now, there are no windows for light to shine through; the lantern is a solid black base. You will use the **Union** and **Difference** options in Inkscape to design the windows digitally.
The dotted blue lines represent fold scorelines. The solid orange lines represent guides. Windows for light should not be placed outside the orange boxes.
To the left of the template are a few pre-made objects you can use in your design.
### To create a window or shape
1. Create an object that looks like the window style you want. Objects can be created using any of the shape tools in Inkscape's left toolbar. Alternately, you can download Creative Commons- or Public Domain-licensed clipart and import the PNG file into your project.
2. When you are happy with the shape of the object, turn it into a **Path** (rather than a **Shape**, which Inkscape sees as two different kinds of objects) by selecting **Object &gt; Object to Path** in the top menu.
![Object to path menu][7]
3. Place the object on top of the base shape.
4. Select both the object and the black base by clicking one, pressing and holding the Shift key, then selecting the other.
5. Select **Object &gt; Difference** from the top menu to remove the shape of the object from the base. This creates what will become a window in your lantern.
![Object > Difference menu][8]
### To add an object to a window
After making a window, you can add objects to it to create a scene.
**Tips:**
* All objects, including text, must be connected to the base of the lantern. If not, they will fall out after cutting and leave a blank space.
* Avoid small, intricate details. These are difficult to cut, even when using a machine like a laser cutter or a craft plotter.
1. Create or import an object.
2. Place the object inside the window so that it is touching at least two sides of the base.
3. With the object selected, choose **Object &gt; Object to Path** from the top menu.
![Object to path menu][9]
4. Select the object and the black base by clicking on each one while holding the Shift key).
5. Select **Object &gt; Union** to join the object and the base.
### Add text
Text can either be cut out from the base to create a window (as I did with the stars) or added to a window (which blocks the light from within the lantern). If you're creating a window, only follow steps 1 and 2 below, then use **Difference** to remove the text from the base layer.
1. Select the Text tool from the left sidebar to create text. Thick, bold fonts work best.
![Text tool][10]
2. Select your text, then choose **Path &gt; Object to Path** from the top menu. This converts the text object to a path. Note that this step means you can no longer edit the text, so perform this step _only after_ you're sure you have the word or words you want.
3. After you have converted the text, you can press **F2** on your keyboard to activate the **Node Editor** tool to clearly show the nodes of the text when it is selected with this tool.
![Text selected with Node editor][11]
4. Ungroup the text.
5. Adjust each letter so that it slightly overlaps its neighboring letter or the base.
![Overlapping the text][12]
6. To connect all of the letters to one another and to the base, re-select all the text and the base, then select **Path &gt; Union**.
![Connecting letters and base with Path > Union][13]
### Prepare for printing
The following instructions are for hand-cutting your lantern. If you're using a laser cutter or craft plotter, follow the techniques required by your hardware to prepare your files.
1. In the **Layer** panel, click the **Eye** icon beside the **Safety** layer to hide the safety lines. If you don't see the Layer panel, reveal it by selecting **Layer &gt; Layers** from the top menu.
2. Select the black base. In the **Fill and Stroke** panel, set the fill to **X** (meaning _no fill_) and the **Stroke** to solid black (that's #000000ff to fans of hexes).
![Setting fill and stroke][14]
3. Print your pattern with **File &gt; Print**.
4. Using a craft knife and ruler, carefully cut around each black line. Lightly score the dotted blue lines, then fold.
![Cutting out the lantern][15]
5. To finish off the windows, cut tracing paper to the size of each window and glue it to the inside of the lantern.
![Adding tracing paper][16]
6. Glue the lantern together at the tabs.
7. Turn on a battery-powered LED candle and place it inside your lantern.
![Completed lantern][17]
Now your lantern is complete and ready to light up your haunt. Happy Halloween!
How to make Halloween bottle labels with Inkscape, GIMP, and items around the house.
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/10/how-make-halloween-lantern-inkscape
作者:[Jess Weichler][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/cyanide-cupcake
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/halloween_bag_bat_diy.jpg?itok=24M0lX25 (Halloween - backlit bat flying)
[2]: https://opensource.com/article/18/1/inkscape-absolute-beginners
[3]: http://inkscape.org
[4]: https://www.dropbox.com/s/75qzjilg5ak2oj1/papercraft_lantern_A4_template.svg?dl=0
[5]: https://www.dropbox.com/s/8fswdge49jwx91n/papercraft_lantern_letter_template%20.svg?dl=0
[6]: https://opensource.com/sites/default/files/uploads/lanterntemplate_screen.png (Lantern template screen)
[7]: https://opensource.com/sites/default/files/uploads/lantern1.png (Object to path menu)
[8]: https://opensource.com/sites/default/files/uploads/lantern2.png (Object > Difference menu)
[9]: https://opensource.com/sites/default/files/uploads/lantern3.png (Object to path menu)
[10]: https://opensource.com/sites/default/files/uploads/lantern4.png (Text tool)
[11]: https://opensource.com/sites/default/files/uploads/lantern5.png (Text selected with Node editor)
[12]: https://opensource.com/sites/default/files/uploads/lantern6.png (Overlapping the text)
[13]: https://opensource.com/sites/default/files/uploads/lantern7.png (Connecting letters and base with Path > Union)
[14]: https://opensource.com/sites/default/files/uploads/lantern8.png (Setting fill and stroke)
[15]: https://opensource.com/sites/default/files/uploads/lantern9.jpg (Cutting out the lantern)
[16]: https://opensource.com/sites/default/files/uploads/lantern10.jpg (Adding tracing paper)
[17]: https://opensource.com/sites/default/files/uploads/lantern11.jpg (Completed lantern)

View File

@ -0,0 +1,77 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (The Difference Between DNF and YUM, Why is Yum Replaced by DNF?)
[#]: via: (https://www.2daygeek.com/comparison-difference-between-dnf-vs-yum/)
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
The Difference Between DNF and YUM, Why is Yum Replaced by DNF?
======
**[Yum Package Manager][1]** has been replaced by **[DNF Package Manager][2]** since many long-standing issues in Yum remain unresolved.
These problems include poor performance, excessive memory usage, slowdown for dependency resolution.
DNF uses “libsolv” for dependency resolution, developed and maintained by SUSE to improve performance.
It was written mostly in python, and it has its own way of coping with dependency resolution.
Its API is not fully documented, and its extension system only allows Python plugins.
Yum is a front-end tool for rpm that manages dependencies and repositories, and then uses RPM to install, download, and remove packages.
Why would they want to build a new tool instead of fixing existing problems?
Ales Kozamblak explained that the fixing was not technically feasible and that the yum team was not ready to accept the changes immediately.
Also, the big challenge is that there are 56K lines for yum, but only 29K lines for DNF.
So there is no way to fix it, except the fork.
However yum was working fine.
S.No | DNF (Dandified YUM) | YUM (Yellowdog Updater, Modified)
---|---|---
1 | DNF uses libsolv for dependency resolution, developed and maintained by SUSE. | YUM uses the public API for dependency resolution
2 | API is fully documented | API is not fully documented
3 | It is written in C, C++, Python | It is written only in Python
4 | DNF is currently used in Fedora, Red Hat Enterprise Linux 8 (RHEL), CentOS 8, OEL 8 and Mageia 6/7. | YUM is currently used in Red Hat Enterprise Linux 6/7 (RHEL), CentOS 6/7, OEL 6/7.
5 | DNf supports various extensions | Yum supports only Python based extension
6 | The API is well documented so it's easy to create new features | It is very difficult to create new features because the API is not properly documented.
7 | The DNF uses less memory when synchronizing the metadata of the repositories. | The YUM uses excessive memory when synchronizing the metadata of the repositories.
8 | DNF uses a satisfiability algorithm to solve dependency resolution (It's using a dictionary approach to store and retrieve package and dependency information). | Yum dependency resolution gets sluggish due to public API.
9 | All performance is good in terms of memory usage and dependency resolution of repository metadata. | Over all performance is poor in terms of many factors.
10 | DNF Update: If a package contains irrelevant dependencies during a DNF update process, the package will not be updated. | YUM will update a package without verifying this.
11 | If the enabled repository does not respond, dnf will skip it and continue the transaction with the available repositories. | If a repository is not available, YUM will stop immediately.
12 | dnf update and dnf upgrade equals. | It's different in yum
13 | The dependencies on package installation are not updated | Yum offered an option for this behavior
14 | Clean Up Package Removal: When removing a package, dnf automatically removes any dependency packages not explicitly installed by the user. | Yum didnt do this
15 | Repo Cache Update Schedule: By default, ten minutes after the system boots, updates to configured repositories are checked by dnf hourly. This action is controlled by the system timer unit named "/usr/lib/systemd/system/dnf-makecache.timer". | Yum do this too.
16 | Kernel packages are not protected by dnf. Unlike Yum, you can delete all kernel packages, including one that runs. | Yum will not allow you to remove the running kernel
17 | libsolv: for solving packages and reading repositories.
hawkey: hawkey, library providing simplified C and Python API to libsolv.
librepo: library providing C and Python (libcURL like) API for downloading linux repository metadata and packages.
libcomps: Libcomps is alternative for yum.comps library. Its written in pure C as library and theres bindings for python2 and python3 | Yum does not use separate libraries to perform this function.
18 | DNF contains 29k lines of code | Yum contains 56k lines of code
19 | DNF was developed by Ales Kozumplik | YUM was developed by Zdenek Pavlas, Jan Silhan and team members
--------------------------------------------------------------------------------
via: https://www.2daygeek.com/comparison-difference-between-dnf-vs-yum/
作者:[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/yum-command-examples-manage-packages-rhel-centos-systems/
[2]: https://www.2daygeek.com/linux-dnf-command-examples-manage-packages-fedora-centos-rhel-systems/

View File

@ -1,128 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (lxbwolf)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Getting started with Linux firewalls)
[#]: via: (https://opensource.com/article/20/2/firewall-cheat-sheet)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
Getting started with Linux firewalls
======
A firewall is your computer's first line of defense against network
intrusion. Download our cheat sheet to make sure you're secure.
![Cheat Sheet cover image][1]
A sensible firewall is your computer's first line of defense against network intrusion. When you're at home, you're probably behind a firewall built into the router supplied by your internet service provider. When you're away from home, though, the only firewall you have is the one running on your computer, so it's important to configure and control the firewall on your Linux computer. If you run a Linux server, it's just as important to know how to manage your firewall so that you can protect it from unwanted traffic both locally and remotely.
### Install a firewall
Many Linux distributions ship with a firewall already installed, and traditionally that was **iptables**. It is extremely effective and customizable, but it can be complex to configure. Luckily, developers have produced several frontends to help users control their firewall without writing lengthy iptables rules.
On Fedora, CentOS, Red Hat, and similar distributions, the firewall software installed by default is **firewalld**, which is configured and controlled with the **firewall-cmd** command. On Debian and most other distributions, firewalld is available to install from your software repository. Ubuntu ships with the Uncomplicated Firewall (ufw), so to use firewalld, you must enable the **universe** repository:
```
$ sudo add-apt-repository universe
$ sudo apt install firewalld
```
You must also deactivate ufw:
```
`$ sudo systemctl disable ufw`
```
There's no reason _not_ to use ufw. It's an excellent firewall frontend. However, this article focuses on firewalld because of its wide availability and integration into systemd, which is shipped with nearly every distribution.
Regardless of your distribution, for a firewall to be effective, it must be active, and it should be loaded at boot time:
```
`$ sudo systemctl enable --now firewalld`
```
### Understanding firewall zones
Firewalld aims to make firewall configuration as simple as possible. It does this by establishing _zones_. A zone is a set of sensible, common rules that suit the everyday needs of most users. There are nine by default:
* **trusted:** All network connections are accepted. This is the least paranoid firewall setting and should only be used in a trusted environment, such as a test lab or in a family home where everyone on the local network is known to be friendly.
* **home, work, internal:** In these three zones, most incoming connections are accepted. They each exclude traffic on ports that usually expect no activity. Any of them is a reasonable setting for use in a home setting where there is no reason to expect network traffic to obscure ports, and you generally trust the other users on the network.
* **public:** For use in public areas. This is a paranoid setting, intended for times when you do not trust other computers on the network. Only selected common and mostly safe incoming connections are accepted.
* **dmz:** DMZ stands for demilitarized zone. This zone is intended for computers that are publically accessible, located on an organization's external network with limited access to the internal network. For personal computers, this is usually not a useful zone, but it is an important option for certain types of servers.
* **external:** For use on external networks with masquerading enabled (meaning the addresses of your private network are mapped to and hidden behind a public IP address). Similar to the dmz zone, only selected incoming connections are accepted, including SSH.
* **block:** Only network connections initiated within this system are possible, and all incoming network connections are rejected with an **icmp-host-prohibited** message. This is an extremely paranoid setting and is an important option for certain types of servers or personal computers in an untrusted or hostile environment.
* **drop:** Any and all incoming network packets are dropped with no reply. Only outgoing network connections are possible. The only setting more paranoid than this one is turning off your WiFi and unplugging your Ethernet cable.
You can read about each zone and any other zones defined by your distribution or sysadmin by looking at the configuration files in **/usr/lib/firewalld/zones**. For instance, here's the FedoraWorkstation zone that ships with Fedora 31:
```
$ cat /usr/lib/firewalld/zones/FedoraWorkstation.xml
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;zone&gt;
  &lt;short&gt;Fedora Workstation&lt;/short&gt;
  &lt;description&gt;Unsolicited incoming network packets are rejected from port 1 to 1024, except for select network services. Incoming packets that are related to outgoing network connections are accepted. Outgoing network connections are allowed.&lt;/description&gt;
  &lt;service name="dhcpv6-client"/&gt;
  &lt;service name="ssh"/&gt;
  &lt;service name="samba-client"/&gt;
  &lt;port protocol="udp" port="1025-65535"/&gt;
  &lt;port protocol="tcp" port="1025-65535"/&gt;
&lt;/zone&gt;
```
### Getting your current zone
You can see what zone you're in at any time with the **\--get-active-zones** option:
```
`$ sudo firewall-cmd --get-active-zones`
```
In response, you receive the name of the active zone along with the network interface assigned to it. On a laptop, that usually means you have a WiFi card in the default zone:
```
FedoraWorkstation
  interfaces: wlp61s0
```
### Change your current zone
To change your zone, reassign your network interface to a different zone. For instance, to change the example **wlp61s0** card to the public zone:
```
$ sudo firewall-cmd --change-interface=wlp61s0 \
\--zone=public
```
You can change the active zone for an interface any time you please and for any reason—whether you're going out to a café and feel the need to increase your laptop's security policy, or you're going to work and need to open up some ports to get on the intranet, or for any other reason. The options for **firewall-cmd** auto-complete when you press the **Tab** key, so as long as you remember the keywords "change" and "zone," you can stumble through the command until you learn it by memory.
### Learn more
There's a lot more you can do with your firewall, including customizing existing zones, setting a default zone, and more. The more comfortable with firewalls you get, the more secure your online activities are, so we've created a [cheat sheet][2] for quick and easy reference.
### Download your [firewall cheat sheet][2]
David Both shares how he replaced his dedicated network firewall computer with a Raspberry Pi 2.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/2/firewall-cheat-sheet
作者:[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/coverimage_cheat_sheet.png?itok=lYkNKieP (Cheat Sheet cover image)
[2]: https://opensource.com/downloads/firewall-cmd-cheat-sheet

View File

@ -1,107 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Meet LBRY, A Blockchain-based Decentralized Alternative to YouTube)
[#]: via: (https://itsfoss.com/lbry/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
Meet LBRY, A Blockchain-based Decentralized Alternative to YouTube
======
_**LBRY is a new Blockchain-based, open source platform for sharing digital content. It is gaining popularity as a decentralized alternative to YouTube but LBRY is more than just a video sharing service.**_
### LBRY is an open source blockchain based platform for content sharing
At the core of it, [LBRY][1] is a new protocol which is a peer to peer, decentralized file sharing and payment network secured by [blockchain][2] technology. Anyone can build apps on top of LBRY protocol that interact with digital content on the LBRY network. But these technical stuff is for developers.
As a user you can use [LBRY platform][3] for watching videos, listening to music and reading eBooks.
As a content creator, you can use LBRY to share your digital content like video, music, images, podcasts, eBooks etc.
Unlike YouTube, your activities are not tracked to serve you ads. In fact, LBRY is ad free. If you are logged into the network, you wont see any ads anywhere on its website.
### No ads, and you may even earn cryptocurrency for viewing videos on LBRY
The LBRY is governed by its own cryptocurrency called LBC (LBRY Credits).
Like any other cryptocurrency, you can mine it, buy it or get it from someone else. Content creators can set a price in LBC for streaming their content or they can provide it for free and get tipped in LBC by the viewers.
Dont worry, you dont necessarily need to buy LBC. Since its new, youll get LBC as rewards for doing simple tasks as viewing videos, exploring LBRY, following channels etc. In fact, youll get a few LBC simply for creating an account at LBRY and setting up your profile.
![LBRY Rewards Sample][4]
Youll also get LBC in rewards for inviting other users to LBRY platform. For example, if you join [LBRY from Its FOSS invite link][5], both you and I get LBC as reward.
The LBRY reward system will change once the platform grows. Remember initially Bitcoins were also readily available and now it values thousands of dollars.
### Open source, peer to peer, blockchain: LBRY ticks all the right blocks for a privacy-aware user
![LBRY interface][6]
While the cyptocurrency is essential to create a fair and open marketplace in LBRY, its main feature is the peer to peer, decentralized network using blockchain. LBRY puts emphasis on treating you as user, not a product.
Everything built to power LBRY is open source. You can find the entire source code on its GitHub repository.
[LBRY on GitHub][7]
The [LBRY FAQ page][8] is a good resource to know more about LBRY and how it works.
### Using LBRY
![][9]
If you want to give LBRY a try, you can check out its [video sharing platform][3]. If you are logged in or using its app, you wont see any ads.
Creating an account on LBRY will also let you get the LBRY rewards (i.e. the LBC cryptocurrency). You can watch the videos on LBRY web site or on its application.
I have noticed that video streaming is slightly faster when you use the app instead of web browser. [LBRY app is available][10] for Linux, Windows, macOS, iOS and Android.
As a web publisher, Its FOSS is on all major social media channels. We appreciate and respect such decentralized services and try to make a presence on such offbeat platform. You can [find us on Mastodon][11], a [decentralized alternative to Twitter][12]. You can also find Its FOSS on LBRY.
While we will be putting our video content primarily on YouTube and Vimeo (for ad-free experience), our YouTube content will be automatically available on LBRY as well.
So if you are going to use LBRY, you can follow us there to watch all our videos on LBRY.
[Join LBRY and follow Its FOSS][5]
### Conclusion
There may not be a lot of content on LBRY right now. LBRY is trying to encourage and reward creators who publish on LBRY first instead of YouTube.
LBRY is in early stages but its team is working hard to become a viable alternative to YouTube. It has an open road map where they have shared an insight into all their future plans. You may [check it out yourself][13].
By the way, LBRY is not the only platform of this kind. [PeerTube][14] is a similar service that provides a peer to peer video sharing platform.
_**If you are someone who doesnt like tech giants like Google, Microsoft, Huawei spying on your data, keeping a profile of you to serve you targeted ads, you may try platforms like PeerTube and LBRY.**_
What do you think of LBRY? Are you already using something like LBRY or PeerTube? If not, are you willing to give it a try? Whats your overall feeling about P2P platforms like LBRY? Do share your views in the comment section.
--------------------------------------------------------------------------------
via: https://itsfoss.com/lbry/
作者:[Abhishek Prakash][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/abhishek/
[b]: https://github.com/lujun9972
[1]: https://lbry.com/
[2]: https://en.wikipedia.org/wiki/Blockchain
[3]: https://lbry.tv/
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/lbry-rewards-sample.png?ssl=1
[5]: https://lbry.tv/$/invite/@itsfoss:0
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/lbry.png?ssl=1
[7]: https://github.com/lbryio/
[8]: https://lbry.com/faq
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/lbry-interface.jpg?ssl=1
[10]: https://lbry.com/get
[11]: https://mastodon.social/@itsfoss
[12]: https://itsfoss.com/mastodon-open-source-alternative-twitter/
[13]: https://lbry.com/roadmap
[14]: https://joinpeertube.org/

View File

@ -1,75 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (A handy utility for creating Raspberry Pi SD card images)
[#]: via: (https://opensource.com/article/20/4/raspberry-pi-imager-mac)
[#]: author: (James Farrell https://opensource.com/users/jamesf)
A handy utility for creating Raspberry Pi SD card images
======
Getting started with Raspberry Pi Imager on a Mac.
![Raspberries with pi symbol overlay][1]
There are many ways to buy a Raspberry Pi, and depending on who you buy it from, it may or may not come with an operating system already installed on it. Getting an OS onto a Raspberry Pi is a matter of "flashing" an SD card with an OS image. To make this as easy as possible, the [Raspberry Pi Foundation][2] has introduced a Raspberry Pi Imager application, and you can download it for all major platforms. Here's a quick intro to this helpful new utility.
### Install the Imager
You can find the Raspberry Pi Imager over at the usual [Raspberry Pi Downloads][3] page. Versions exist for Mac, Ubuntu, and Windows. I will download and demonstrate the Mac version.
Installation on Mac consists of the usual DMG image that mounts to your desktop, and then a typical installer window appears:
![Raspberry Pi Imager installer][4]
Simply drag the cute raspberry icon to the Application folder, and you are done. Invoke that from Launchpad, and you are presented with a series of simple buttons and menus to choose from. It really cannot be simpler than this:
![Raspberry Pi Imager home screen][5]
### Images and options available
The default options contain a variety of images for various Raspberry Pi models. Raspbian is the top choice with two available options for smaller "Lite" and fatter "Full" versions available. The LibreELEC Kodi entertainment system is available in various model-specific builds. Ubuntu 18 and 19 have 32-bit and 64-bit builds available for different Pi models. There is an RPi 4 EEPROM recovery utility and a function to format your card using FAT32. Finally, a generic image installer option is available that I will try out a little later. Pretty handy for a simple and compact utility.
### Install some images
I had a 16g micro SD card that I decided to play with. I selected the default Raspbian image, chose my attached USB/SD device, and pressed WRITE. Here is a brief demo:
![Raspberry Pi Imager demo][6]
I didn't post the entire sequence there. I believe it downloaded the image as it was writing and took a few minutes on my wireless connection to finish. The process goes through a write and then a verify cycle before it is finished. When it was done, I ejected the device, popped the card into my RPi 3, and was treated to the usual graphical Raspbian setup wizard and desktop environment.
That wasn't quite enough for me; I get plenty of Linux on a daily basis and was looking for a little more today. I went back to the [Raspberry Pi Downloads][3] page and pulled down the RISC OS image. This process was nearly as easy. Download the RISCOSPi.5.24.zip file, extract it, and find the ro524-1875M.img file. From the Operating System button, I selected the Use Custom option and selected the desired image file. The process was pretty much the same; the only real difference being I had to hunt around my Downloads directory and select an image. Once the file was finished writing, back into the Pi 3, and RISC OS was ready to go.
### Gripes on USB C
This is just a silly aside, but how many of you are a bit frustrated with the total inconvenience of USB C these days? I'm using a MacBook Pro, which only has USB C ports, and I am subject to a never-ending swap of adapters to get things done. Take a look at this:
![USB C adapter][7]
Yes, that is a USB C to USB A adapter, then a USB to SD card reader, and an SD to micro SD adapter inside. I probably could have found something online to simplify this, but these are the parts I had on hand to support my family's myriad Mac, Windows, and Linux hosts. Enough about that, but I hope you got a chuckle from that insanity.
### Summary
The new Raspberry Pi Imager is a simple and effective tool for getting off the ground quickly with Raspberry Pi images. [BalenaEtcher][8] is a similar tool for imaging your removable devices, but this new Raspberry Pi Imager makes the process of common RPi OS installations (like Raspbian) a bit easier by eliminating the steps to fetch those common images.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/raspberry-pi-imager-mac
作者:[James Farrell][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/jamesf
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life-raspberrypi_0.png?itok=Kczz87J2 (Raspberries with pi symbol overlay)
[2]: https://www.raspberrypi.org/
[3]: https://www.raspberrypi.org/downloads/
[4]: https://opensource.com/sites/default/files/uploads/install_1.png (Raspberry Pi Imager installer)
[5]: https://opensource.com/sites/default/files/uploads/screen_2_0.png (Raspberry Pi Imager home screen)
[6]: https://opensource.com/sites/default/files/uploads/demo_3.gif (Raspberry Pi Imager demo)
[7]: https://opensource.com/sites/default/files/uploads/adapter_4.png (USB C adapter)
[8]: https://www.balena.io/etcher/

View File

@ -1,159 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to install Python on Linux)
[#]: via: (https://opensource.com/article/20/4/install-python-linux)
[#]: author: (Vijay Singh Khatri https://opensource.com/users/vijaytechnicalauthor)
How to install Python on Linux
======
Step-by-step instructions for installing the latest Python instead of
(or alongside) an older version on Linux.
![OpenStack source code \(Python\) in VIM][1]
[Python][2] is now the [most popular][3], most used programming language. Python's simple syntax and low learning curve make it the ultimate choice for beginners as well as professional developers. Python is also a very versatile programming language. It's used nearly everywhere—from web development to artificial intelligence—really anywhere other than mobile development.
If you're using Python, there's a good chance you're a developer (or want to become one), and Linux is a great platform for creating software. But when you're working with Python every day, you sometimes want to stay up to date with the very latest version. You may not want to replace the default install of Python on your system just to test drive the latest one, so this article explains how to install the latest version of Python 3 on Linux without replacing the version provided by your distribution.
Use the **python --version terminal** command to check whether Python is already installed and, if so, which version you have. If Python is not installed on your Linux system, or you want to install an updated version, follow the steps below.
### Step-by-step installation instructions
#### **Step 1:** First, install development packages required to build Python.
#### On Debian:
```
$ sudo apt update
$ sudo apt install build-essential zlib1g-dev \
libncurses5-dev libgdbm-dev libnss3-dev \
libssl-dev libreadline-dev libffi-dev curl
```
#### On Fedora:
```
`$ sudo dnf groupinstall development`
```
#### Step 2: Download the stable latest release of Python 3
Visit the [official Python website][4] and download the latest version of Python 3. After the download is complete, you hav a **.tar.xz** archive file (a "tarball") containing the source code of Python.
#### Step 3: Extract the tarball
Once the download is complete, extract the tarball by either using the extractor application of your choice or the [Linux **tar** command][5], for example:
```
`$ tar -xf Python-3.?.?.tar.xz`
```
#### Step 4: Configure the script
Once the Python tarball has been extracted, navigate to the configure script and execute it in your Linux terminal with:
```
$ cd Python-3.*
./configure
```
The configuration may take some time. Wait until it is successfully finishes before proceeding.
#### Step 5: Start the build process
If you already have a version of Python installed on your system and you want to install the new version alongside it, use this command:
```
`$ sudo make altinstall`
```
The build process may take some time.
If you want to replace your current version of Python with this new version, you should uninstall your current Python package using your package manager (such as **apt** or **dnf**) and then install:
```
`$ sudo make install`
```
However, it's generally preferable to install software as a package (such as a **.deb** or **.rpm** file) so your system can track and update it for you. Because this article assumes the latest Python isn't yet packaged yet, though, you probably don't have that option. In that case, you can either install Python with **altinstall** as suggested, or rebuild an existing Python package using the latest source code. That's an advanced topic and specific to your distribution, so it's out of scope for this article.
#### Step 6: Verify the installation
If you haven't encountered any errors, the latest Python is now installed on your Linux system. To verify it, write one of these commands in your terminal:
```
`python3 --version`
```
or
```
`python --version`
```
If the output says **Python 3.x**, Python 3 has been successfully installed.
### Create a virtual environment (optional)
Python provides a package known as **venv** (virtual environment), which helps you isolate a program directory or package from other ones.
To create a virtual environment, enter the following in the Python terminal (in this example, assume the version of Python you've installed is in the **3.8** series):
```
`python3.8 -m venv example`
```
This command creates a new directory (which I've named **example**), with some subdirectories.
To activate the virtual environment, enter:
```
$ source example/bin/activate
(example) $
```
Notice that your terminal prompt (**$**) is now preceeded by an environment name.
To deactivate the virtual environment, use the **deactivate** command:
```
`(example) $ deactivate`
```
### Conclusion
Python is a fun language that's developed and improved frequently. Getting familiar with new features is easy, once you understand how to install the latest release without interfering with the stable version provided from your distribution.
If you have any feedback or questions, please leave them in the comments.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/install-python-linux
作者:[Vijay Singh Khatri][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/vijaytechnicalauthor
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/openstack_python_vim_1.jpg?itok=lHQK5zpm (OpenStack source code (Python) in VIM)
[2]: https://www.python.org/
[3]: http://pypl.github.io/PYPL.html
[4]: http://python.org
[5]: https://opensource.com/article/17/7/how-unzip-targz-file

View File

@ -1,179 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to package Python applications for Linux)
[#]: via: (https://opensource.com/article/20/4/package-python-applications-linux)
[#]: author: (Moshe Zadka https://opensource.com/users/moshez)
How to package Python applications for Linux
======
Learn how to use dh_virtualenv to make your Python applications
installable as .deb packages.
![Python in a tree][1]
One way to make Python applications installable on Debian-based operating systems (such as Debian or [Elementary OS][2]) is by using the [dh_virtualenv][3] tool. It builds a **.deb** package that wraps a Python virtual environment around an application and deploys it upon installing.
In this article, I will explain how to use it with the example of building a package containing the [HTTPie][4] tool to test HTTP APIs from the command line without having to activate a virtual environment.
### Packaging with dh_virtualenv
First, you need to install the tools that dh_virtualenv needs. dh_virtualenv's [documentation][5] provides all of the installation options. On my Debian-based system, I entered:
```
`apt-get install dh-virtualenv devscripts`
```
While the [devscripts][6] package is not required, it will simplify doing the subsequent operations.
Now, create a directory to keep the sources. Since this is a local, unofficial, packaging of HTTPie, I called it **myhttp**. Next, let's create some files inside **myhttp** to provide metadata to the Debian build system.
First, create the **debian/control** file:
```
Source: myhttp
Section: python
Priority: extra
Maintainer: Jan Doe &lt;[jandoe@example.org][7]&gt;
Build-Depends: debhelper (&gt;= 9), python3.7, dh-virtualenv (&gt;= 0.8)
Standards-Version: 3.9.5
Package: myhttp
Architecture: any
Pre-Depends: dpkg (&gt;= 1.16.1), python3.7, ${misc:Pre-Depends}
Depends: ${misc:Depends}
Description: http client
 Useful for doing stuff
```
So what is all this information about? As the [Debian documentation][8] puts it:
> "Lines 17 are the control information for the source package. Lines 913 are the control information for the binary package."
Here's my take:
* the **section** value is mostly meaningless for our case, but needs to be there. It's meaningful to provide information to the guided UI installer, which is not relevant for this package.
* The extra **Priority** value is the right priority for 3rd party packages like this one.
* It is highly recommended to put real contact details in the **Maintainer** field. It does not have to be your personal e-mail, though -- "Infrastructure Team &lt;[infra-team-list@company.example.com][9]&gt;", for example, if the package is maintained by the team and you would like issues to be sent to the team's mail alias.
* The **build-depends** field indicates that you need debhelper, python, and dh-virtualenv to build the package: the package build process will make sure those dependencies are installed at package build time.
* The **standards version** is mostly for human consumption. It indicates which guide you are following. This guide is based on the official documentation of dh-virtualenv, which is based on the 3.9.5 guide from Debian. It is almost always the best choice to name the binary package and the source package the same.
* The **Architecture** field should be **Any** because a virtual environment might include some architecture-specific files: otherwise, the field would be better chosen as **all**.
* Keep the **pre-depends** list as-is: pre-depends is a pretty strict form of dependencies, and it is rare that you need anything more than the minimum suggested here. The dependencies are usually calculated accurately by the build system, so there is no reason to specify them manually.
* If your package is mostly for internal use, then the **Description** might only specify minimal information and a link to the company wiki; otherwise, more details might be useful.
Then create the **debian/compat** file, which [exists mostly for historical purposes][10]:
```
`$ echo "9" > debian/compat`
```
Next, create the changelog to tell package users what has changed since the last release. The easiest way is to use **dch --create** to create a template and then fill in the values.
Filled in, it looks like:
```
myhttp (2.0.0-1) stable; urgency=medium
  * Initial release.
 -- Jan Doe &lt;[jandoe@example.org][7]&gt;  Fri, 27 Mar 2020 01:09:22 +0000
```
Now you need to tell the tool to install HTTPie, but which version?
Create a **requirements.in** file that has loose versions:
```
`httpie`
```
In general, the loose requirements file will only contain direct dependencies of your project and will specify minimum versions if needed. It is not always necessary to specify the minimum versions: the tools are usually biased towards tightening the dependencies towards "latest version possible". In the case where your Debian package corresponds to one internal Python package, a common case in internal applications, the loose requirements file will look similar: just one line with the name of the package.
Then use **pip-compile** (which is available by installing the PyPI package **pip-tools**):
```
`$ pip-compile requirements.in > requirements.txt`
```
This will produce a strict dependency file called **requirements.txt**:
```
#
# This file is autogenerated by pip-compile
# To update, run:
#
#    pip-compile requirements.in
#
certifi==2019.11.28       # via requests
chardet==3.0.4            # via requests
httpie==2.0.0             # via -r requirements.in
idna==2.9                 # via requests
pygments==2.6.1           # via httpie
requests==2.23.0          # via httpie
urllib3==1.25.8           # via requests
```
Finally, write a **debian/rules** file for creating the package. Since dh_virtualenv does all the hard work, the rules file is simple:
```
#!/usr/bin/make -f
%:
        dh $@ --with python-virtualenv --python /usr/bin/python3.7
```
Be sure to specify the Python interpreter. By default, it will use the interpreter in **/usr/bin/python**, which is Python 2, but you should use a [supported version of Python][11].
The writing is finished; all that's left is to build the package:
```
`$ debuild -b -us -uc`
```
This will produce a file in the parent directory with a name like **myhttp_2.0.0-1_amd64.deb**. This file can be installed on any compatible operating system.
In general, it's best to build Debian packages that are intended for a specific platform, such as Debian 10.0, on the same platform.
You can store this Debian package in a repository and install it on all relevant systems with, for example, [Ansible][12].
### Conclusion
Packaging applications for Debian-based operating systems is a multi-step process. Using dh_virtualenv will make the process straightforward.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/package-python-applications-linux
作者:[Moshe Zadka][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/moshez
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life-python.jpg?itok=F2PYP2wT (Python in a tree)
[2]: https://opensource.com/article/19/12/pantheon-linux-desktop
[3]: https://dh-virtualenv.readthedocs.io/en/latest/
[4]: https://opensource.com/article/19/8/getting-started-httpie
[5]: https://dh-virtualenv.readthedocs.io/en/1.1/tutorial.html
[6]: http://man.he.net/man1/devscripts
[7]: mailto:jandoe@example.org
[8]: https://www.debian.org/doc/manuals/maint-guide/dreq.en.html#control
[9]: mailto:infra-team-list@company.example.com
[10]: https://www.debian.org/doc/manuals/maint-guide/dother.en.html#compat
[11]: https://opensource.com/article/19/11/end-of-life-python-2
[12]: https://opensource.com/resources/what-ansible

View File

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

View File

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

View File

@ -0,0 +1,116 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (A stress-free guide to keeping WordPress sites updated)
[#]: via: (https://opensource.com/article/20/4/updating-wordpress)
[#]: author: (Sara Kelly https://opensource.com/users/sarapk)
A stress-free guide to keeping WordPress sites updated
======
This practical guide to a necessary task will show you how to maximize
site performance and avoid bugs and other issues with regular updates.
![Working from home at a laptop][1]
We all know how important it is to keep WordPress sites updated. New updates provide the latest bug and security fixes against any nasties lurking on the web. But, more critically, an outdated site can also lead to poor performance, such as slow loading speed or an outdated look and feel.
Unfortunately, keeping your WordPress site up-to-date is not as easy as clicking a button. There are several components to consider, from theme to plugins to PHP. Even worse, updating too quickly can wreak another kind of havoc. Have you ever experienced the dreaded, "There has been a critical error on your website" warning after an innocent little update? I know I have, many times!
Here is a practical guide on what to look out for, as well as when and what to update, to ensure your WordPress site works well.
### Updating WordPress
Let's start with the basics. Check your WordPress version is up-to-date by visiting Dashboard &gt; Updates.
![WordPress update screen][2]
### Choosing a WordPress theme
Before we deep dive into updating themes, I'd like to take a few steps back. Choose an up-to-date theme from the get-go and do your homework before installing it! There is nothing worse than pouring your heart and soul into customizing a new theme, only to discover it is buggy.
Questions to ask when choosing a theme include:
* When was it first created?
* What is the current version available?
* Does the theme provider still maintain an active demo site and helpdesk?
* What do recent reviews say about the theme?
If the theme provider is no longer maintaining the theme, save yourself the trouble and move on. Also, don't assume that just because you paid for a theme, that is necessarily maintained. I recently fell into this trap when I purchased [Pinable][3]. I loved the Pinterest look and feel. However, soon after installation, I noticed the lack of customization within the theme settings, major compatibility issues arose with my plugins, and the customer service was nonexistent. I should have known better. The theme was created in 2013 and selling for a bargain.
If you already have a theme, then pay attention to how frequently updates become available. If there are never any updates, the theme provider may have closed up shop. It is only a matter of time before the impact of an outdated theme will cause problems.
A quick aside while we are on the topic—up-to-date themes also give access to the two new alignment options in the WordPress block editor, which enable wide-width and full-width images. These help your blog posts look more professional. While there are a number of [tutorials][4] on the web that show you how to manually update your functions, PHP file, and CSS to enable the new alignment blocks, the code does not always work on older themes (especially masonry themes).
![Wordpress theme][5]
### Updating themes
To check the current version of your theme, go to Appearance &gt; Themes and click on the active theme to see the current version. If an upgrade is available, there will be an alert banner. Click on "update now" to initiate the update. You can also check for updates by going to Dashboard &gt; Updates.
![Themify screenshot][6]
If you purchased a theme from a marketplace such as [Envato][7] or [Themify][8], check the theme documentation to learn what is required to initiate updates, as it will not show up automatically in the dashboard. In most cases, you will be required to download and install a specific plugin or manually upload new versions when they become available. In the latter case, you will need to delete or rename the old theme file via your cPanel before you can install the new one. A guide to installing themes via cPanel is available [here][9].
If you plan to customize your theme extensively and are worried about the impact of this when upgrading, consider creating a child theme first. A child theme lets you make changes without touching the original theme's code. You can then update your site without losing any customizations you've made. Read more about child themes [here][10].
As I said before, the source of most issues tends to be the theme. Learn what is required to keep your theme up to date, and do so regularly. If your theme provider is no longer creating updates, then find a new theme.
### Easy does it for plugins
If you manage multiple plugins, then you will be used to the frequent dashboard reminders to update! Before we get onto that, though, let's touch on some basics.
As a general rule, you don't want to have too many plugins. They slow down the speed of your site by creating more code that the browser has to load. Always delete any inactive plugins. I prefer to manage plugins on the Plugins tab. Here you can see all active and inactive plugins, the current version, and whether an update is available. To update the plugin, simply click "update."
![Plugin update page][11]
Nonetheless, I implore you to wait a week or two before installing new updates. Updating my plugins too quickly has caused me no end of grievances. To begin with, updates are prone to human error. Don't be the guinea pig that tests out the latest version. Sometimes, the newest version of a plugin is not compatible with an older version of WordPress or your theme. Check these are up-to-date first.
### Website down after updating plugins?
If your site has stopped working or performance has dropped noticeably after updating your plugins, then all is not lost. Forget about those newfangled plugins that promise to test speed and identify buggy plugins (the last thing you want is more plugins)! Disable all your plugins, then activate one at a time while you test the speed and performance of your site on a website such as [Pingdom][12]. This is a great exercise to perform periodically, even if your website has not crashed. Once you identify the plugin causing the problem, delete it.
In the event you cannot access WordPress because there is a critical error, then you will need to access your files via cPanel and delete all the plugin folders from there ([full instructions here][13]). Don't worry; doing this will not impact your website's content. You can then proceed to reinstall and activate the plugins one-by-one via WordPress.
Cache plugins tend to be the biggest culprit in my experience. Issues with cache plugins can be minimized by clearing the cache frequently. Do not install multiple cache plugins that perform the same function, as they will only serve to slow down your site. The only way to truly get around cache plugin issues is to either not use them, use a plugin recommended by your hosting provider, or become an expert on cache. [This blog][14] on common cache issues in WordPress is a good place to start.
### Back up before updating PHP
If you are concerned about your website speed and have spent enough time browsing Google for answers, then you likely have seen the advice, "You gotta update your PHP!" Please tread carefully with manual PHP updates, though! If you have a good hosting provider, you should never need to do this. Rather, select the option for automatic PHP version management with your host. Newer versions of PHP may not be stable or compatible with the version of WordPress you are running. Let your hosting provider be the one to determine when updates are ready.
However, if you are adamant that an old version of PHP is causing your website to be slow, take care to follow these steps before initiating an update. First, back up your site. Investing in a premium version of [Jetpack][15] is worth its weight in gold. Jetpack can perform real-time as well as daily backups, depending on your plan. Not to mention, their customer service and troubleshooting support are excellent. Secondly, inform your hosting provider that you plan to update the PHP and seek their advice first. If your host is unable to advise or wants to charge you for the privilege, you should probably think about changing hosts.
You can update PHP either via cPanel or via your hosting platform under Devs &gt; PHP Manager. After that, you are on your own, as that is where my expertise on PHP ends.
If you have any other tips or pitfalls regarding updating WordPress, drop them in the comments box below.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/updating-wordpress
作者:[Sara Kelly][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/sarapk
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/wfh_work_home_laptop_work.png?itok=VFwToeMy (Working from home at a laptop)
[2]: https://opensource.com/sites/default/files/uploads/wp_update_1.png (Wordpress update screen)
[3]: https://www.theme-junkie.com/themes/pinable/
[4]: https://www.billerickson.net/full-and-wide-alignment-in-gutenberg/
[5]: https://opensource.com/sites/default/files/uploads/wp_theme_2.png (Wordpress theme)
[6]: https://opensource.com/sites/default/files/uploads/themify_3.png (Themify screenshot)
[7]: https://elements.envato.com/
[8]: https://themify.me/
[9]: https://hostadvice.com/how-to/how-to-install-a-wordpress-theme-using-cpanel/
[10]: https://developer.wordpress.org/themes/advanced-topics/child-themes/
[11]: https://opensource.com/sites/default/files/uploads/plugins_4.png (Plugin update page)
[12]: https://tools.pingdom.com/
[13]: https://www.wpbeginner.com/plugins/how-to-deactivate-all-plugins-when-not-able-to-access-wp-admin/
[14]: https://mhthemes.com/support/knb/solving-common-cache-issues-on-wordpress-websites/
[15]: https://jetpack.com/upgrade/backup/?utm_source=google&utm_campaign=google_jetpack_search_brand_desktop_sg_en&utm_medium=paid_search&utm_term=%2Bwordpress%20%2Bjetpack%20%2Bbackup&creative=379260213317&campaignid=2061290863&utm_content=77066462603&matchtype=b&device=c&network=g&gclid=Cj0KCQjwu6fzBRC6ARIsAJUwa2RuPx5Dzr72eBEtZegsf11MmOBgLiwLX2HcEUXVaULIgv1MdZqGmeAaArmFEALw_wcB&gclsrc=aw.ds

View File

@ -0,0 +1,250 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Getting Started With Pacman Commands in Arch-based Linux Distributions)
[#]: via: (https://itsfoss.com/pacman-command/)
[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/)
Getting Started With Pacman Commands in Arch-based Linux Distributions
======
_**Brief: This beginners guide shows you what you can do with pacmancommands in Linux, how to use them to find new packages, install and upgrade new packages, and clean your system.**_
The [pacman][1] package manager is one of the main difference between [Arch Linux][2] and other major distributions like Red Hat and Ubuntu/Debian. It combines a simple binary package format with an easy-to-use [build system][3]. The aim of pacman is to easily manage packages, either from the [official repositories][4] or the users own builds.
If you ever used Ubuntu or Debian-based distributions, you might have used the apt-get or apt commands. Pacman is the equivalent in Arch Linux. If you [just installed Arch Linux][5], one of the first few [things to do after installing Arch Linux][6] is to learn to use pacman commands.
In this beginners guide, Ill explain some of the essential usage of the pacmand command that you should know for managing your Arch-based system.
### Essential pacman commands Arch Linux users should know
![][7]
Like other package managers, pacman can synchronize package lists with the software repositories to allow the user to download and install packages with a simple command by solving all required dependencies.
#### Install packages with pacman
You can install a single package or multiple packages using pacman command in this fashion:
```
pacman -S _package_name1_ _package_name2_ ...
```
![Installing a package][8]
The -S stands for synchronization. It means that pacman first synchronizes
The pacman database categorises the installed packages in two groups according to the reason why they were installed:
* **explicitly-installed**: the packages that were installed by a generic pacman -S or -U command
* **dependencies**: the packages that were implicitly installed because [required][9] by another package that was explicitly installed.
#### Remove an installed package
To remove a single package, leaving all of its dependencies installed:
```
pacman -R package_name_
```
![Removing a package][10]
To remove a package and its dependencies which are not required by any other installed package:
```
pacman -Rs _package_name_
```
To remove dependencies that are no longer needed. For example, the package which needed the dependencies was removed.
```
pacman -Qdtq | pacman -Rs -
```
#### Upgrading packages
Pacman provides an easy way to [update Arch Linux][11]. You can update all installed packages with just one command. This could take a while depending on how up-to-date the system is.
The following command synchronizes the repository databases _and_ updates the systems packages, excluding “local” packages that are not in the configured repositories:
```
pacman -Syu
```
* S stands for sync
* y is for refresh (local
* u is for system update
Basically it is saying that sync to central repository (master package database), refresh the local copy of the master package database and then perform the system update (by updating all packages that have a newer version available).
![System update][12]
Attention!
If you are an Arch Linux user before upgrading, it is advised to visit the [Arch Linux home page][2] to check the latest news for out-of-the-ordinary updates. If manual intervention is needed an appropriate news post will be made. Alternatively you can subscribe to the [RSS feed][13] or the [arch-announce mailing list][14].
Be also mindful to look over the appropriate [forum][15] before upgrading fundamental software (such as the kernel, xorg, systemd, or glibc), for any reported problems.
**Partial upgrades are unsupported** at a rolling release distribution such as Arch and Manjaro. That means when new library versions are pushed to the repositories, all the packages in the repositories need to be rebuilt against the libraries. For example, if two packages depend on the same library, upgrading only one package, might break the other package which depends on an older version of the library.
#### Use pacman to search for packages
Pacman queries the local package database with the -Q flag, the sync database with the -S flag and the files database with the -F flag.
Pacman can search for packages in the database, both in packages names and descriptions:
```
pacman -Ss _string1_ _string2_ ...
```
![Searching for a package][16]
To search for already installed packages:
```
pacman -Qs _string1_ _string2_ ...
```
To search for package file names in remote packages:
```
pacman -F _string1_ _string2_ ...
```
To view the dependency tree of a package:
```
pactree _package_naenter code hereme_
```
#### Cleaning the package cache
Pacman stores its downloaded packages in /var/cache/pacman/pkg/ and does not remove the old or uninstalled versions automatically. This has some advantages:
1. It allows to [downgrade][17] a package without the need to retrieve the previous version through other sources.
2. A package that has been uninstalled can easily be reinstalled directly from the cache folder.
However, it is necessary to clean up the cache periodically to prevent the folder to grow in size.
The [paccache(8)][18] script, provided within the [pacman-contrib][19] package, deletes all cached versions of installed and uninstalled packages, except for the most recent 3, by default:
```
paccache -r
```
![Clear cache][20]
To remove all the cached packages that are not currently installed, and the unused sync database, execute:
```
pacman -Sc
```
To remove all files from the cache, use the clean switch twice, this is the most aggressive approach and will leave nothing in the cache folder:
```
pacman -Scc
```
#### Installing local or third-party packages
Install a local package that is not from a remote repository:
```
pacman -U _/path/to/package/package_name-version.pkg.tar.xz_
```
Install a remote package, not contained in an official repository:
```
pacman -U http://www.example.com/repo/example.pkg.tar.xz
```
### Bonus: Troubleshooting common errors with pacman
Here are some common errors you may encounter while managing packages with pacman.
#### Failed to commit transaction (conflicting files)
If you see the following error:
```
error: could not prepare transaction
error: failed to commit transaction (conflicting files)
package: /path/to/file exists in filesystem
Errors occurred, no packages were upgraded.
```
This is happening because pacman has detected a file conflict and will not overwrite files for you.
A safe way to solve this is to first check if another package owns the file (pacman -Qo _/path/to/file_). If the file is owned by another package, file a bug report. If the file is not owned by another package, rename the file which exists in filesystem and re-issue the update command. If all goes well, the file may then be removed.
Instead of manually renaming and later removing all the files that belong to the package in question, you may explicitly run _**pacman -S overwrite glob package**_ to force pacman to overwrite files that match _glob_.
#### Failed to commit transaction (invalid or corrupted package)
Look for .part files (partially downloaded packages) in /var/cache/pacman/pkg/ and remove them. It is often caused by usage of a custom XferCommand in pacman.conf.
#### Failed to init transaction (unable to lock database)
When pacman is about to alter the package database, for example installing a package, it creates a lock file at /var/lib/pacman/db.lck. This prevents another instance of pacman from trying to alter the package database at the same time.
If pacman is interrupted while changing the database, this stale lock file can remain. If you are certain that no instances of pacman are running then delete the lock file.
Check if a process is holding the lock file:
```
lsof /var/lib/pacman/db.lck
```
If the above command doesnt return anything, you can remove the lock file:
```
rm /var/lib/pacman/db.lck
```
If you find the PID of the process holding the lock file with lsof command output, kill it first and then remove the lock file.
I hope you like my humble effort in explaining the basic pacman commands. Please leave your comments below and dont forget to subscribe on our social media. Stay safe!
--------------------------------------------------------------------------------
via: https://itsfoss.com/pacman-command/
作者:[Dimitrios Savvopoulos][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/dimitrios/
[b]: https://github.com/lujun9972
[1]: https://www.archlinux.org/pacman/
[2]: https://www.archlinux.org/
[3]: https://wiki.archlinux.org/index.php/Arch_Build_System
[4]: https://wiki.archlinux.org/index.php/Official_repositories
[5]: https://itsfoss.com/install-arch-linux/
[6]: https://itsfoss.com/things-to-do-after-installing-arch-linux/
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/essential-pacman-commands.jpg?ssl=1
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/sudo-pacman-S.png?ssl=1
[9]: https://wiki.archlinux.org/index.php/Dependency
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/sudo-pacman-R.png?ssl=1
[11]: https://itsfoss.com/update-arch-linux/
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/sudo-pacman-Syu.png?ssl=1
[13]: https://www.archlinux.org/feeds/news/
[14]: https://mailman.archlinux.org/mailman/listinfo/arch-announce/
[15]: https://bbs.archlinux.org/
[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/sudo-pacman-Ss.png?ssl=1
[17]: https://wiki.archlinux.org/index.php/Downgrade
[18]: https://jlk.fjfi.cvut.cz/arch/manpages/man/paccache.8
[19]: https://www.archlinux.org/packages/?name=pacman-contrib
[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/sudo-paccache-r.png?ssl=1

View File

@ -0,0 +1,99 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (New open source GIS projects for Kubernetes applications)
[#]: via: (https://opensource.com/article/20/4/gis-kubernetes)
[#]: author: (Adam Timm https://opensource.com/users/timmam)
New open source GIS projects for Kubernetes applications
======
pg_tileserv and pg_featureserv make it easier for developers to add
location services to Kubernetes applications.
![A map with a route highlighted][1]
Spatial data from geographic information systems (GIS) is all around us. From smartphones that make our lives better and more convenient to precision agriculture that is increasing the amount of food farmers can produce while reducing the cost, whether or not we realize it, almost every part of our lives is touched by spatial data.
This increase of spatial data is simultaneously bringing an increase of open spatial datasets that people can consume and use to build all sorts of new applications. However, these types of datasets have not always been easy to work with. Also, due to the size of some of the geographic data, they can be difficult to bring to modern application deployment frameworks such as Kubernetes.
To help with these issues, [Crunchy Data][2] recently announced two new open source projects, [pg_tileserv][3] and [pg_featureserv][4], to make it easier to develop cloud-native spatial applications. These projects, part of open source [Crunchy Spatial][5], help developers leverage the robust [PostGIS][6] geospatial database extension to [PostgreSQL][7] without having to write complex SQL statements.
So what are pg_tileserv and pg_featuresev, how do they make it easier for developers to add location services to their Kubernetes applications, and what does this mean for the future of spatial applications?
### Traditional GIS vs. modern spatial microservices
Traditionally, when an organization or individual works with spatial data, they start with a product that grew up as a GIS. There are many high-quality open source GIS products ([QGIS][8], [GeoServer][9], [GeoNode][10], etc.), but they may not align with modern, cloud-native approaches to software design.
The popularity of Kubernetes creates challenges for these legacy applications around automation and deployment, as they require a lot of manual configuration, for example, when data sources are added and modified. In many setups, these spatial applications must exist outside Kubernetes and cannot leverage many of the conveniences it provides.
In contrast, modern spatial services should be driven by the spatial data that they are processing and serving out. They should align with modern software development practices and scale efficiently and integrate easily with developer workflows.
Applications that are spatially aware also need to ensure they can handle the unique characteristics of spatial data (e.g., geometries, projections, etc.). To do all of this in independent microservices can be challenging unless you have a highly capable database to do the majority of the work for you. This is where pg_tileserv and pg_featureserv help, as both projects leverage the power of PostGIS, an open source geospatial extension to PostgreSQL, to provide advanced spatial capabilities from a simple REST framework
### Generate map vector tiles with pg_tileserv
![pg_tileserv][11]
pg_tileserv is a lightweight vector tile server written in Go that enables you to generate [vector tiles][12] directly from PostGIS. It does this by implementing the **ST_AsMVT()** function in a best-practice method that translates an HTTP request to the database. It includes common defaults that allow you to pass a database connection URL to the server and be up and running in no time. There's no heavyweight software to install and configure, and it's designed for cloud-native GIS applications.
For specific examples on how to use it, check out our blog posts on [tile serving][13] and [spatial tile serving with PostgreSQL functions][14].
### Annotate your maps with pg_featureserv
![pg_featureserv][15]
pg_featureserv is a lightweight service written in Go that enables you to serve features directly out of PostGIS. It implements the [OGC API][16] for features and provides a standard REST endpoint for your spatial data and functions contained in PostGIS. Just like pg_tileserv, there's no heavyweight software to install; just pass a database connection URL to your PostGIS database, and you're off to the races. For a specific example of how to use it, check out our post on [querying spatial features][17].
### Focus on spatial data, not GIS
With our deep background in developing PostGIS and building PostGIS-backed applications, we wanted to help developers unlock all the value of spatial data in a way that is easy to deploy, scale, and maintain. As the source code of pg_tileserv and pg_featureserv show, we are just leveraging functions already in PostGIS. This allows developers to quickly add spatial data to their applications and data scientists to focus on the data.
![GIS architecture][18]
The benefits of this approach are:
* Faster performance because PostgreSQL and PostGIS are doing the work for you
* Less configuration to maintain because the database structure is the configuration
* By design, it runs in the cloud at enterprise scale from the start
* Shorter times to update customer-facing applications—when you update your data in the database, your application is updated instantly
* Ability to focus more on maintaining your data and delivering value to your users and less on wrangling software
Also, since these services respond to the configuration of your database, they also expose functions contained in the database. Rather than developing their data functions to incorporate them into software later, data scientists can create functions in the database that are immediately made available via a REST API. The software begins to fade into the background so an organization can focus on the data.
Suffice it to say, we're pretty excited about these new geospatial services, and we definitely want your feedback on them. Feel free to check out [pg_tileserve][3] and [pg_featureserv][4], try deploying them alongside your PostGIS databases with the [PostgreSQL Operator][19], and share your feedback in the comments.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/gis-kubernetes
作者:[Adam Timm][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/timmam
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/map_route_location_gps_path.png?itok=RwtS4DsU (A map with a route highlighted)
[2]: https://www.crunchydata.com/
[3]: https://github.com/CrunchyData/pg_tileserv
[4]: https://github.com/CrunchyData/pg_featureserv
[5]: https://www.crunchydata.com/products/crunchy-spatial/
[6]: https://postgis.net/
[7]: https://www.postgresql.org
[8]: https://www.qgis.org/en/site/
[9]: http://geoserver.org/
[10]: http://geonode.org/
[11]: https://opensource.com/sites/default/files/pg_tileserv.jpg (pg_tileserv)
[12]: https://info.crunchydata.com/blog/dynamic-vector-tiles-from-postgis
[13]: https://info.crunchydata.com/blog/crunchy-spatial-tile-serving
[14]: https://info.crunchydata.com/blog/crunchy-spatial-tile-serving-with-postgresql-functions
[15]: https://opensource.com/sites/default/files/pg_featureserv.jpg (pg_featureserv)
[16]: http://www.ogcapi.org/
[17]: https://info.crunchydata.com/blog/crunchy-spatial-querying-spatial-features-with-pg_featureserv
[18]: https://opensource.com/sites/default/files/uploads/architecture_0.png (GIS architecture)
[19]: https://github.com/CrunchyData/postgres-operator

View File

@ -0,0 +1,99 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How I use Hugo for my classroom's open source CMS)
[#]: via: (https://opensource.com/article/20/4/hugo-classroom)
[#]: author: (Peter Cheer https://opensource.com/users/petercheer)
How I use Hugo for my classroom's open source CMS
======
This open source software streamlines text editing while leaving room
for customization.
![Digital hand surrounding by objects, bike, light bulb, graphs][1]
People love Markdown text with good reason—it is easy to write, easy to read, easy to edit, and it can be converted to a wide range of other text mark up formats. While Markdown text is very good for content creation and manipulation, it imposes limitations on the options for content display.
If we could combine the virtues of Markdown with the power and flexibility of Cascading Style Sheets, HTML5, and JavaScript, that would be something special. One of the programs trying to do this is [Hugo][2]. Hugo was created in 2013 by Steve Francia; it is cross-platform and open source under an Apache 2.0 license with an active developer community and a growing user base.
The basic concept is that pieces of content, such as web pages or blog posts, written in Markdown and associated with metadata, are converted into HTML and combined with templates and themes to produce a complete web site. The power and flexibility come through these themes and templates or changing the default behaviors of Hugo. This power comes with a degree of unavoidable complexity, but there are lots of [pre-built templates][3] available if you lack the time or inclination to make your own.
Installing Hugo on my Linux machine was quick and easy. Starting a new project is as simple as typing **hugo new site quickstart** at the command line which creates a new project with this folder structure:
* **archetypes**: Content template files that contain preconfigured front matter metadata (date, title, draft). You can create new archetypes with custom front matter fields.
* **assets**: Stores all the files, which are processed by Hugo Pipes (e.g., CSS/Sass files). This directory is not created by default.
* **config.toml**: The default site config file.
* **content**: Where all the content Markdown files live.
* **data**: Used to store configuration files that can be used by Hugo when generating your website.
* **layouts**: Stores templates as .html files.
* **static**: Stores all the static content—images, CSS, JavaScript, etc.
* **themes**: For the Hugo theme of your choice.
The Markdown files in the content folder can be created manually or by Hugo and edited with any text editor or your Markdown creation tool of choice. If created manually, you will need to add any metadata that is needed. I prefer to use [Ghostwriter][4] for writing Markdown. Images are usually kept in a sub-folder in the static folder. Site development can proceed quickly, as Hugo includes a web server for testing and pre-viewing.
To check your work, type **hugo server** at the command line to start the server. By default, Hugo will not publish:
* Content with a future **publishdate** value.
* Content with **draft: true** status.
* Content with a past **expirydate** value.
Adding **hugo server -D** will include draft articles, and Hugo can be configured to mark all new articles as draft. After starting the web server, you can see your work in a web browser at localhost:1313. Once the server is started by default, it will automatically reload the browser window when it detects a change to one of your files.
There are tasks Markdown cannot do that need some HTML code. Hugo recognizes this but believes in keeping Markdown code as clean, simple, and uncluttered as possible. Hugo does this with shortcodes such as **{{&lt; youtube id= "w7Ft2ymGmfc" autoplay= "true"&gt;}}**, which will embed the YouTube video with id. w7Ft2ymGmfc. There are quite a few pre-built shortcodes for common tasks, but it is also possible to create your own for particular jobs.
I work in education quite a lot and wanted to include some interactive puzzles and questions on my Hugo-generated website. To get the output looking like this:
![JClic shortcode][5]
I created the activities with an open source Java program called [JClic][6], exported them as HTML5, put that into static/activities/excel, and displayed it in an iframe.
The HTML code, which would spoil the nice clean Markdown content, looks like this:
```
    &lt;[iframe][7]
       src="/activity/excel/index.html"
       title="Activity"
       height="400"
       frameborder="0"
       marginwidth="0"
       marginheight="0"
       scrolling="no"
       style="border: 1px solid #CCC; border-width: 1px; margin-bottom: 20px; width: 100%;"
       allowfullscreen="true"&gt;
    &lt;/[iframe][7]&gt;
```
The code is saved in layouts/shortcodes as **activity.html**
This makes the shortcode placed inside my Markdown file **{{&lt;activity&gt;}}**, which is much neater.
When your project is ready, you can build it with the **hugo** command; this will create a public folder and generate the website in it. Hugo has a number of built-in deployment options for different hosting providers—basically, you deploy your site by copying the public folder to your production web server. There is a lot more to Hugo that I haven't even gotten to yet, including configuration options, importing content from other static site generators and Wordpress, display data from JSON files, syntax highlighting of source code, and the fact that it is very fast (an advantage when working with large sites).
In many software tools, ease-of-use comes at the expense of flexibility, or vice-versa; Hugo makes a largely successful attempt at including both. For basic use with Markdown content and a pre-built theme, Hugo is easy to use and produces rapid results. Alternatively, if you have the need to alter the configuration settings or dive in and create your own themes, shortcodes, templates, or metadata schemes, that choice is open to you.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/hugo-classroom
作者:[Peter Cheer][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/petercheer
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003588_01_rd3os.combacktoschoolseriesk12_rh_021x_0.png?itok=fvorN0e- (Digital hand surrounding by objects, bike, light bulb, graphs)
[2]: https://gohugo.io/
[3]: https://themes.gohugo.io/
[4]: http://github.com/wereturtle/ghostwriter
[5]: https://opensource.com/sites/default/files/uploads/jclic_shortcode.png (JClic shortcode)
[6]: https://clic.xtec.cat/legacy/en/index.html
[7]: http://december.com/html/4/element/iframe.html

View File

@ -0,0 +1,170 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How I use Python to map the global spread of COVID-19)
[#]: via: (https://opensource.com/article/20/4/python-map-covid-19)
[#]: author: (AnuragGupta https://opensource.com/users/999anuraggupta)
How I use Python to map the global spread of COVID-19
======
Create a color coded geographic map of the potential spread of the virus
using these open source scripts.
![Globe up in the clouds][1]
The spread of disease is a real concern for a world in which global travel is commonplace. A few organizations track significant epidemics (and any pandemic), and fortunately, they publish their work as open data. The raw data can be difficult for humans to process, though, and that's why data science is so vital. For instance, it could be useful to visualize the worldwide spread of COVID-19 with Python and Pandas.
It can be hard to know where to start when you're faced with large amounts of raw data. The more you do it, however, the more patterns begin to emerge. Here's a common scenario, applied to COVID-19 data:
1. Download COVID-19 country spread daily data into a Pandas DataFrame object from GitHub. For this, you need the Python Pandas library.
2. Process and clean the downloaded data and make it suitable for visualizing. The downloaded data (as you will see for yourself) is in quite good condition. The one problem with this data is that it uses the names of countries, but it's better to use three-digit ISO 3 codes. To generate the three-digit ISO 3 codes, use a small Python library called pycountry. Having generated these codes, you can add an extra column to our DataFrame and populate it with these codes.
3. Finally, for the visualization, use the **express** module of a library called Plotly. This article uses what are called choropleth maps (available in Plotly) to visualize the worldwide spread of the disease.
### Step 1: Corona data
We will download the latest corona data from:
<https://raw.githubusercontent.com/datasets/covid-19/master/data/countries-aggregated.csv>
We will load the data directly into a Pandas DataFrame. Pandas provides a function, **read_csv()**, which can take a URL and return a DataFrame object as shown below:
```
import pycountry
import plotly.express as px
import pandas as pd
URL_DATASET = r'<https://raw.githubusercontent.com/datasets/covid-19/master/data/countries-aggregated.csv>'
df1 = pd.read_csv(URL_DATASET)
print(df1.head(3))  # Get first 3 entries in the dataframe
print(df1.tail(3))  # Get last 3 entries in the dataframe
```
The screenshot of output (on Jupyter) is:
![Jupyter screenshot][2]
From output, you can see that the DataFrame (df1) has the following columns:
1. Date
2. Country
3. Confirmed
4. Recovered
5. Dead
Further, you can see that the **Date** column has entries starting from January 22 to March 31. This database is updated daily, so you will get the current values.
### Step 2: Cleaning and modifying the data frame
We need to add another column to this DataFrame, which has the three-letter ISO alpha-3 codes. To do this, I followed these steps:
1. Create a list of all countries in the database. This was required because in the **df**, in the column **Country**, each country was figuring for each date. So in effect, the **Country** column had multiple entries for each country. To do this, I used the **unique().tolist()** functions.
2. Then I took a dictionary **d_country_code** (initially empty) and populated it with keys consisting of country names and values consisting of their three-letter ISO codes.
3. To generate the three-letter ISO code for a country, I used the function **pycountry.countries.search_fuzzy(country)**. You need to understand that the return value of this function is a "list of **Country** objects." I passed the return value of this function to a name country_data. Further, in this list of objects, the first object i.e., at index 0, is the best fit. Further, this **\** object has an attribute **alpha_3**. So, I can "access" the 3 letter ISO code by using **country_data[0].alpha_3**. However, it is possible that some country names in the DataFrame may not have a corresponding ISO code (For example, disputed territories). So, for such countries, I gave an ISO code of "i.e. a blank string. Further, you need to wrap this code in a try-except block. The statement: **print(_could not add ISO 3 code for -&gt;'_, country)** will give a printout of those countries for which the ISO 3 codes could not be found. In fact, you will find such countries as shown with white color in the final output.
4. Having got the three-letter ISO code for each country (or an empty string for some), I added the country name (as key) and its corresponding ISO code (as value) to the dictionary **d_country_code**. For adding these, I used the **update()** method of the Python dictionary object.
5. Having created a dictionary of country names and their codes, I added them to the DataFrame using a simple for loop.
### Step 3: Visualizing the spread using Plotly
A choropleth map is a map composed of colored polygons. It is used to represent spatial variations of a quantity. We will use the express module of Plotly conventionally called **px**. Here we show you how to create a choropleth map using the function: **px.choropleth**.
The signature of this function is:
```
`plotly.express.choropleth(data_frame=None, lat=None, lon=None, locations=None, locationmode=None, geojson=None, featureidkey=None, color=None, hover_name=None, hover_data=None, custom_data=None, animation_frame=None, animation_group=None, category_orders={}, labels={}, color_discrete_sequence=None, color_discrete_map={}, color_continuous_scale=None, range_color=None, color_continuous_midpoint=None, projection=None, scope=None, center=None, title=None, template=None, width=None, height=None)`
```
The noteworthy points are that the **choropleth()** function needs the following things:
1. A geometry in the form of a **geojson** object. This is where things are a bit confusing and not clearly mentioned in its documentation. You may or may not provide a **geojson** object. If you provide a **geojson** object, then that object will be used to plot the earth features, but if you don't provide a **geojson** object, then the function will, by default, use one of the built-in geometries. (In our example here, we will use a built-in geometry, so we won't provide any value for the **geojson** argument)
2. A pandas DataFrame object for the attribute **data_frame**. Here we provide our DataFrame ie **df1** we created earlier.
3. We will use the data of **Confirmed** column to decide the color of each country polygon.
4. Further, we will use the **Date** column to create the **animation_frame**. Thus as we slide across the dates, the colors of the countries will change as per the values in the **Confirmed** column.
The complete code is given below:
```
import pycountry
import plotly.express as px
import pandas as pd
# ----------- Step 1 ------------
URL_DATASET = r'<https://raw.githubusercontent.com/datasets/covid-19/master/data/countries-aggregated.csv>'
df1 = pd.read_csv(URL_DATASET)
# print(df1.head) # Uncomment to see what the dataframe is like
# ----------- Step 2 ------------
list_countries = df1['Country'].unique().tolist()
# print(list_countries) # Uncomment to see list of countries
d_country_code = {}  # To hold the country names and their ISO
for country in list_countries:
    try:
        country_data = pycountry.countries.search_fuzzy(country)
        # country_data is a list of objects of class pycountry.db.Country
        # The first item  ie at index 0 of list is best fit
        # object of class Country have an alpha_3 attribute
        country_code = country_data[0].alpha_3
        d_country_code.update({country: country_code})
    except:
        print('could not add ISO 3 code for -&gt;', country)
        # If could not find country, make ISO code ' '
        d_country_code.update({country: ' '})
# print(d_country_code) # Uncomment to check dictionary  
# create a new column iso_alpha in the df
# and fill it with appropriate iso 3 code
for k, v in d_country_code.items():
    df1.loc[(df1.Country == k), 'iso_alpha'] = v
# print(df1.head)  # Uncomment to confirm that ISO codes added
# ----------- Step 3 ------------
fig = px.choropleth(data_frame = df1,
                    locations= "iso_alpha",
                    color= "Confirmed",  # value in column 'Confirmed' determines color
                    hover_name= "Country",
                    color_continuous_scale= 'RdYlGn',  #  color scale red, yellow green
                    animation_frame= "Date")
fig.show()
```
The output is something like the following:
![Map][3]
You can download and run the [complete code][4].
To wrap up, here are some excellent resources on choropleth in Plotly:
* <https://github.com/plotly/plotly.py/blob/master/doc/python/choropleth-maps.md>
* [https://plotly.com/python/reference/#choropleth][5]
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/python-map-covid-19
作者:[AnuragGupta][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/999anuraggupta
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/cloud-globe.png?itok=_drXt4Tn (Globe up in the clouds)
[2]: https://opensource.com/sites/default/files/uploads/jupyter_screenshot.png (Jupyter screenshot)
[3]: https://opensource.com/sites/default/files/uploads/map_2.png (Map)
[4]: https://github.com/ag999git/jupyter_notebooks/blob/master/corona_spread_visualization
[5]: tmp.azs72dmHFd#choropleth

View File

@ -0,0 +1,273 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to take advantage of Linux's extensive vocabulary)
[#]: via: (https://www.networkworld.com/article/3539011/how-to-takke-advantage-of-linuxs-extensive-vocabulary.html)
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
How to take advantage of Linux's extensive vocabulary
======
Linux systems don't only know a lot of words, it has commands that can help you use them by finding words that are on the tip of your tongue or fixing your typos.
Sandra Henry-Stocker
While you might not think of Linux as a writing tutor, it does have some commendable language skills at least when it comes to English. While the average American probably has a vocabulary between 20,000 and 50,000 words, Linux can claim over 100,000 words (spellings, not definitions). And you can easily put this vocabulary to work for you in a number of ways. Lets look at how Linux can help with your word challenges.
### Help with finding words
First, lets focus on finding words.If you use the **wc** command to count the number of words in the **/usr/share/dict/words** file on your system, you should see something like this:
```
$ wc -l /usr/share/dict/words
102402 /usr/share/dict/words
```
As you can see, the **words** file on this system contains 102,402 words. So, when youre trying to nail down just the right word and are having trouble, you stand a good chance of finding it on your system by remembering (or guessing at) some part of it. But you'll need a little help narrowing down those 102,402 words to a group worth your time to review. In this command, were looking for words that start with the letters “revi”.
[[Get regularly scheduled insights by signing up for Network World newsletters.]][1]
```
$ grep ^reviv /usr/share/dict/words
revival
revival's
revivalist
revivalist's
revivalists
revivals
revive
revived
revives
revivification
revivification's
revivified
revivifies
revivify
revivifying
reviving
```
Thats sixteen words that start with the string “revi”. The **^** character represents the beginning of the word and, as you might have suspected, each word in the file is on a line by itself.
A good number of the words in the **/usr/share/dict/words** file are names. If you want to  find words regardless of whether they're capitalized, add the **-i** (ignore case) option to your **grep** command.
```
$ grep -i ^wool /usr/share/dict/words
Woolf
Woolf's
Woolite
Woolite's
Woolongong
Woolongong's
Woolworth
Woolworth's
wool
...
```
You can also look for words that end in or contain a certain string of letters. In this next command, we look for words that contain the string “nativ” at any location.
```
$ grep 'nativ' /usr/share/dict/words
alternative
alternative's
alternatively
alternatives
imaginative
imaginatively
native
native's
natives
nativities
nativity
nativity's
nominative
nominative's
nominatives
unimaginative
```
In this next command, we look for words that end in “emblance”, the **$** character representing the end of the line. Only two words in the **words** file fit the bill.
[][2]
```
$ grep 'emblance$' /usr/share/dict/words
resemblance
semblance
```
If we, for some reason, want to find words with exactly 21 letters, we could use this command:
```
$ grep '^.....................$' /usr/share/dict/words
counterintelligence's
electroencephalograms
electroencephalograph
```
On the other hand, making sure we've typed the correct number of dots can be tedious. This next command is little easier to manage:
```
$ grep -E '^[[:alpha:]]{21}$' /usr/share/dict/words
electroencephalograms
electroencephalograph
```
This command does the same thing:
```
$ grep -E '^\w{21}$' /usr/share/dict/words
electroencephalograms
electroencephalograph
```
The one important difference between these commands is that the one with the dots matches any string of 21 characters. The two specifying "alpha" or "\w" only match letters, so they find only two matching words.
Now lets look for words that contain 20 letters (or more) in a row.
```
$ grep -E '(\w{20})' /usr/share/dict/words
Andrianampoinimerina
Andrianampoinimerina's
counterrevolutionaries
counterrevolutionary
counterrevolutionary's
electroencephalogram
electroencephalogram's
electroencephalograms
electroencephalograph
electroencephalograph's
electroencephalographs
uncharacteristically
```
That command returns words with apostrophes because they contain 20 letters in a row before they get to that point.
Next, well check out words with 21 or more characters. The 1 and 20 in combination with the **v** (invert) option in this command cause **grep** to skip over words with anywhere from 1 to 20 characters.
```
$ grep -vwE '\w{1,20}' /usr/share/dict/words
counterrevolutionaries
electroencephalograms
electroencephalograph
electroencephalographs
```
In this next command, we look for words that start with “ex” and have four additional letters.
```
$ grep '^ex.\{4\}$' /usr/share/dict/words
exacts
exalts
exam's
exceed
excels
except
excess
excise
excite
excuse
```
In case you're curious, the **words** file on this system contains 43 such words:
```
$ grep '^ex.\{4\}$' /usr/share/dict/words | wc -l
43
```
To get help with spelling, you should try **aspell**. It can help you with individual words or run a spell check scan through an entire text file. In this first example, we ask **aspell** to help with a single word. It finds the word were after along with a couple other possibilities.
### Checking a word
```
$ aspell -a
@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.7)
prolifferate <== entered word
& prolifferate 3 0: proliferate, proliferated, proliferates <== replacement options
```
If **aspell** doesnt provide a list of words, that means that the spelling you offered was correct. Here's an example:
```
$ aspell -a
@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.7)
proliferate <== entered text
* <== no suggestions
```
Typing **^C** (control-c) exits **aspell**.
### Checking a file
When checking a file with **aspell**, you get suggestions for each misspelled word. When **aspell** spots typos, it highlights the misspelled words one at a time and gives you a chance to choose from a list of properly spelled words that are similar enough to the misspelled words to be good candidates for replacing them.
To start checking a file, type **aspell -c** followed by the file name.
```
$ aspell -c thesis
```
You'll see something like this:
```
This thesis focusses on …
1) focuses 6) Fosse's
2) focused 7) flosses
3) cusses 8) courses
4) fusses 9) focus
5) focus's 0) fuses
i) Ignore I) Ignore all
r) Replace R) Replace all
a) Add l) Add Lower
b) Abort x) Exit
```
Make your selection by pressing the key listed next to the word you want (1, 2, etc.) and **aspell** will replace the misspelled word in the file and move on to the next one if there are others. Notice that you also have options to replace the word by typing another one. Press "x" when you're done.
### Help with crossword puzzles
If youre working on a crossword puzzle and need to find a five-letter word that starts with a “d” and has a “u” as its fourth letter, you can use a command like this:
```
$ grep -i '^d..u.$' /usr/share/dict/words
datum
debug
debut
demur
donut
```
### Help with word scrambles
If youre working on a puzzle that requires you to de-scramble the letters in a string until you've found a proper word, you can offer the list of letters to grep like this example in which **grep** turns the letters "yxusonlia" into the word “anxiously”.
```
$ grep -P '^(?:([yxusonlia])(?!.*?\1)){9}$' /usr/share/dict/words
anxiously
```
Linuxs word skills are impressive and sometimes even fun. Whether you're hoping to find words you can't quite call to mind or get a little help cheating on word puzzles, Linux offers some clever options.
Join the Network World communities on [Facebook][3] and [LinkedIn][4] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3539011/how-to-takke-advantage-of-linuxs-extensive-vocabulary.html
作者:[Sandra Henry-Stocker][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.networkworld.com/author/Sandra-Henry_Stocker/
[b]: https://github.com/lujun9972
[1]: https://www.networkworld.com/newsletters/signup.html
[2]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy)
[3]: https://www.facebook.com/NetworkWorld/
[4]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,255 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Using Python to visualize COVID-19 projections)
[#]: via: (https://opensource.com/article/20/4/python-data-covid-19)
[#]: author: (AnuragGupta https://opensource.com/users/999anuraggupta)
Using Python to visualize COVID-19 projections
======
I'll demonstrate how to create two visualizations of the spread of a
virus across the globe, provided open data and using open source
libraries.
![Colorful sound wave graph][1]
Using [Python][2] and some graphing libraries, you can project the total number of confirmed cases of COVID-19, and also display the total number of deaths for a country (this article uses India as an example) on a given date. Humans sometimes need help interpreting and processing the meaning of data, so this article also demonstrates how to create an animated horizontal bar graph for five countries, showing the variation of cases by date.
### Projecting confirmed cases and deaths for India
This is done in three steps.
#### 1\. Download data
Scientific data isn't always open, but fortunately, many modern science and healthcare organizations are eager to share information with each other and the public. Data about COVID-19 cases is available online, and it's updated frequently.
To parse the data, you first must download it: <https://raw.githubusercontent.com/datasets/covid-19/master/data/countries-aggregated.csv>
Load the data directly into a Pandas DataFrame. Pandas provides a function, **read_csv()**, which can take a URL and give back a DataFrame object, as shown below:
```
import pycountry
import plotly.express as px
import pandas as pd
URL_DATASET = r'<https://raw.githubusercontent.com/datasets/covid-19/master/data/countries-aggregated.csv>'
df1 = pd.read_csv(URL_DATASET)
print(df1.head(3))  # Get first 3 entries in the dataframe
print(df1.tail(3))  # Get last 3 entries in the dataframe
```
The top row of the data set contains column names:
1. Date
2. Country
3. Confirmed
4. Recovered
5. Deaths
The output of the **head** query includes a unique identifier (not listed as a column) plus an entry for each column:
```
0 2020-01-22 Afghanistan 0 0 0
1 2020-01-22 Albania 0 0 0
1 2020-01-22 Algeria 0 0 0
```
The output of the **tail** query is similar but contains the tail end of the data set:
```
12597 2020-03-31 West Bank and Gaza 119 18 1
12598 2020-03-31 Zambia 35 0 0
12599 2020-03-31 Zimbabwe 8 0 1
```
From the output, you can see that the DataFrame (**df1**) has the following columns:
1. Date
2. Country
3. Confirmed
4. Recovered
5. Dead
Further, you can see that the **Date** column has entries starting from January 22 to March 31. This database is updated daily, so you will have current values.
#### 2\. Select data for India
In this step, we will select only those rows in the DataFrame that include India. This is shown in the script below:
```
#### ----- Step 2 (Select data for India)----
df_india = df1[df1['Country'] == 'India']
print(df_india.head(3))
```
#### 3\. Plot data
Here we create a bar chart. We will put the dates on the X-axis and the number of confirmed cases and the number of deaths on the Y-axis. There are a few noteworthy things about this part of the script which are as follows:
* The line of code: **plt.rcParams["_figure.figsize"_]=20,20** is meant only for Jupyter. So remove it if you are using some other IDE.
* Notice the line of code: **ax1 = plt.gca()**. To ensure that both the plots i.e. for confirmed cases as well as for deaths are plotted on the same graph, we need to give to the second graph the **ax** object of the plot. So we use **gca()** to do this. (By the way, 'gca' stands for 'get current axis').
The complete script is given below:
```
#  Author:- Anurag Gupta # email:- [999.anuraggupta@gmail.com][3]
%matplotlib inline
import matplotlib.pyplot as plt
import pandas as pd
#### ----- Step 1 (Download data)----
URL_DATASET = r'<https://raw.githubusercontent.com/datasets/covid-19/master/data/countries-aggregated.csv>'
df1 = pd.read_csv(URL_DATASET)
# print(df1.head(3))  # Uncomment to see the dataframe
#### ----- Step 2 (Select data for India)----
df_india = df1[df1['Country'] == 'India']
print(df_india.head(3))
#### ----- Step 3 (Plot data)----
# Increase size of plot
plt.rcParams["figure.figsize"]=20,20  # Remove if not on Jupyter
# Plot column 'Confirmed'
df_india.plot(kind = 'bar', x = 'Date', y = 'Confirmed', color = 'blue')
ax1 = plt.gca()
df_india.plot(kind = 'bar', x = 'Date', y = 'Deaths', color = 'red', ax = ax1)
plt.show()
```
The entire script is [available on GitHub][4].
### Creating an animated horizontal bar graph for five countries
Note for Jupyter: To run this in Jupyter as a dynamic animation rather than as a static png, you need to add a magic command at the beginning of your cell, namely: **%matplotlib notebook**. This will keep the figure alive instead of displaying a static png file and can hence also show animations. If you are on another IDE, remove this line.
#### 1\. Download the data
This step is exactly the same as in the previous script, and therefore, it need not be repeated.
#### 2\. Create a list of all dates
If you examine the data you downloaded, you notice that it has a column **Date**. Now, this column has a date value for each country. So the same date is occurring a number of times. We need to create a list of dates with only unique values. This will be used on the X-axis of our bar charts. We have a line of code like: **list_dates = df[_Date_].unique()**. The **unique()** method will pick up only the unique values for each date.
#### 3\. Pick five countries and create an **ax** object
Take a list of five countries. (You can choose whatever countries you prefer, or even increase or decrease the number of countries). I have also taken a list of five colors for the bars of each country. (You can change this too if you like). One important line of code here is: **fig, ax = plt.subplots(figsize=(15, 8))**. This is needed to create an **ax** object.
#### 4\. Write the call back function
If you want to do animation in Matplotlib, you need to create an object of a class called **matplotlib.animation.FuncAnimation**. The signature of this class is available online. The constructor of this class, apart from other parameters, also takes a parameter called **func**, and you have to give this parameter a callback function. So in this step, we will write the callback function, which is repeatedly called in order to render the animation.
#### 5\. Create **FuncAnimation** object
This step has partly been explained in the previous step.
Our code to create an object of this class is:
```
my_anim = animation.FuncAnimation(fig = fig, func = plot_bar,
                    frames= list_dates, blit=True,
                    interval=20)
```
The three important parameters to be given are:
* **fig**, which must be given a fig object, which we created earlier.
* **func**, which must be the call back function.
* **frames**, which must contain the variable on which the animation is to be done. Here in our case, it will be the list of dates we created earlier.
#### 6\. Save the animation to an mp4 file
You can save the animation created into an mp4 file. But for this you need **ffmpeg**. You can download this using pip by **pip install ffmpeg-python**, or using conda (on Jupyter) **install -c conda-forge ffmpeg**.
And finally, you can run the animation using **plt.show()**. Please note that on many platforms, the **ffmpeg** may not work properly and may require further "tweaking."
```
%matplotlib notebook
#  Author:- Anurag Gupta # email:- [999.anuraggupta@gmail.com][3]
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from time import sleep
#### ---- Step 1:- Download data
URL_DATASET = r'<https://raw.githubusercontent.com/datasets/covid-19/master/data/countries-aggregated.csv>'
df = pd.read_csv(URL_DATASET, usecols = ['Date', 'Country', 'Confirmed'])
# print(df.head(3)) # uncomment this to see output
#### ---- Step 2:- Create list of all dates
list_dates = df['Date'].unique()
# print(list_dates) # Uncomment to see the dates
#### --- Step 3:- Pick 5 countries. Also create ax object
fig, ax = plt.subplots(figsize=(15, 8))
# We will animate for these 5 countries only
list_countries = ['India', 'China', 'US', 'Italy', 'Spain']
# colors for the 5 horizontal bars
list_colors = ['black', 'red', 'green', 'blue', 'yellow']
### --- Step 4:- Write the call back function
# plot_bar() is the call back function used in FuncAnimation class object
def plot_bar(some_date):
    df2 = df[df['Date'].eq(some_date)]
    ax.clear()
    # Only take Confirmed column in descending order
    df3 = df2.sort_values(by = 'Confirmed', ascending = False)
    # Select the top 5 Confirmed countries
    df4 = df3[df3['Country'].isin(list_countries)]
    # print(df4)  # Uncomment to see that dat is only for 5 countries
    sleep(0.2)  # To slow down the animation
    # ax.barh() makes a horizontal bar plot.
    return ax.barh(df4['Country'], df4['Confirmed'], color= list_colors)
###----Step 5:- Create FuncAnimation object---------
my_anim = animation.FuncAnimation(fig = fig, func = plot_bar,
                    frames= list_dates, blit=True,
                    interval=20)
### --- Step 6:- Save the animation to an mp4
# Place where to save the mp4. Give your file path instead
path_mp4 = r'C:\Python-articles\population_covid2.mp4'  
# my_anim.save(path_mp4, fps=30, extra_args=['-vcodec', 'libx264'])
my_anim.save(filename = path_mp4, writer = 'ffmpeg',
             fps=30,
             extra_args= ['-vcodec', 'libx264', '-pix_fmt', 'yuv420p'])
plt.show()
```
The complete script is [available on GitHub][5].
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/python-data-covid-19
作者:[AnuragGupta][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/999anuraggupta
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/colorful_sound_wave.png?itok=jlUJG0bM (Colorful sound wave graph)
[2]: https://opensource.com/resources/python
[3]: mailto:999.anuraggupta@gmail.com
[4]: https://raw.githubusercontent.com/ag999git/jupyter_notebooks/master/corona_bar_india
[5]: https://raw.githubusercontent.com/ag999git/jupyter_notebooks/master/corona_bar_animated

View File

@ -0,0 +1,202 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux)
[#]: via: (https://www.2daygeek.com/linux-unix-check-network-interfaces-names-nic-speed-ip-mac-address/)
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux
======
By default when you set up the server you will configure the primary network interface.
This is part of the build work that everyone does.
Sometimes you may need to configure an additional network interface for several reasons.
This could be a network bonding/teaming or high availability or a separate interface for application requirements or backups.
To do so, you need to know how many interfaces your computer has and their speed to configure it.
There are many commands to check for available network interfaces, but we only use the IP command.
Later we will write a separate article with all these tools.
In this tutorial, we will show you the Available Network Interface Card (NIC) information, such as the interface name, associated IP address, MAC address, and interface speed.
### Whats IP Command
**[IP command][1]** is similar to ifconfig, which is used to for assigning Static IP Address, Route &amp; Default Gateway, etc.,
```
# ip a
1: lo: mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether fa:16:3e:a0:7d:5a brd ff:ff:ff:ff:ff:ff
inet 192.168.1.101/24 brd 192.168.1.101 scope global eth0
inet6 fe80::f816:3eff:fea0:7d5a/64 scope link
valid_lft forever preferred_lft forever
```
### Whats ethtool Command
The ethtool is used to query or control network driver and hardware settings.
```
# ethtool eth0
```
### 1) How to Check the Available Network Interfaces on Linux Using the IP Command
When you run the IP command without any arguments, it gives you plenty of information, but if you only need the available network interfaces, use the following customized IP command.
```
# ip a |awk '/state UP/{print $2}'
eth0:
eth1:
```
### 2) How to Check the IP Address of a Network Interface on Linux Using the IP Command
If you only want to see which IP address is assigned to which interface, use the following customized IP command.
```
# ip -o a show | cut -d ' ' -f 2,7
or
ip a |grep -i inet | awk '{print $7, $2}'
lo 127.0.0.1/8
192.168.1.101/24
192.168.1.102/24
```
### 3) How to Check the Network Interface Card MAC Address on Linux Using the IP Command
If you only want to see the network interface name and the corresponding MAC address, use the following format.
To check a specific network interface MAC address.
```
# ip link show dev eth0 |awk '/link/{print $2}'
00:00:00:55:43:5c
```
To check MAC address for all network interface.
```
# vi /opt/scripts/mac-addresses.sh
#!/bin/sh
ip a |awk '/state UP/{print $2}' | sed 's/://' | while read output;
do
echo $output:
ethtool -P $output
done
```
Run the below shell script to get the MAC address for multiple network interfaces.
```
# sh /opt/scripts/mac-addresses.sh
eth0:
Permanent address: 00:00:00:55:43:5c
eth1:
Permanent address: 00:00:00:55:43:5d
```
### 4) How to Check the Network Interface Port Speed on Linux Using the ethtool Command
If you want to check the network interface port speed on Linux, use the ethtool command.
To check the speed of a particular network interface port.
```
# ethtool eth0 |grep "Speed:"
Speed: 10000Mb/s
```
To check the port speed for all network interfaces.
```
# vi /opt/scripts/port-speed.sh
#!/bin/sh
ip a |awk '/state UP/{print $2}' | sed 's/://' | while read output;
do
echo $output:
ethtool $output |grep "Speed:"
done
```
Run the below shell script to get the port speed for multiple network interfaces.
```
# sh /opt/scripts/port-speed.sh
eth0:
Speed: 10000Mb/s
eth1:
Speed: 10000Mb/s
```
### 5) Shell Script to Verify Network Interface Card Information
This **[shell script][2]** allows you to gather all of the above information, such as network interface names, IP addresses of network interfaces, MAC addresses of network interfaces, and the speed of a network interface port.
```
# vi /opt/scripts/nic-info.sh
#!/bin/sh
hostname
echo "-------------"
for iname in $(ip a |awk '/state UP/{print $2}')
do
echo "$iname"
ip a | grep -A2 $iname | awk '/inet/{print $2}'
ip a | grep -A2 $iname | awk '/link/{print $2}'
ethtool $iname |grep "Speed:"
done
```
Run the below shell script to check network card information.
```
# sh /opt/scripts/nic-info.sh
vps.2daygeek.com
----------------
eth0:
192.168.1.101/24
00:00:00:55:43:5c
Speed: 10000Mb/s
eth1:
192.168.1.102/24
00:00:00:55:43:5d
Speed: 10000Mb/s
```
--------------------------------------------------------------------------------
via: https://www.2daygeek.com/linux-unix-check-network-interfaces-names-nic-speed-ip-mac-address/
作者:[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/ip-command-configure-network-interface-usage-linux/
[2]: https://www.2daygeek.com/category/shell-script/

View File

@ -0,0 +1,129 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Things You Should Know About Ubuntu 20.04)
[#]: via: (https://itsfoss.com/ubuntu-20-04-faq/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
Things You Should Know About Ubuntu 20.04
======
[Ubuntu 20.04 release][1] is just around the corner and you may have a few questions and doubts regarding upgrades, installation etc.
I hosted some Q&amp;A sessions on various social media channels to answer doubts of readers like you.
I am going to list these common questions about Ubuntu 20.04 with their answers. I hope it helps you clear the doubts you have. And if you still have questions, feel free to ask in the comment section below.
### Ubuntu 20.04: Your Questions Answered
![][2]
Just to clarify, some of the answers here maybe influenced by my personal opinion. If you are an experienced Ubuntu user, some of the questions may sound _silly_ to you but it not to the new Ubuntu users.
#### When will Ubuntu 20.04 be released?
Ubuntu 20.04 LTS is releasing on 23rd April 2020. All the participating flavors like Kubuntu, Lubuntu, Xubuntu, Budgie, MATE etc will have their 20.04 release available on the same day.
#### What are the system requirements for Ubuntu 20.04?
For the default GNOME version, you should have a minimum 4 GB of RAM, 2 GHz dual core processor and at least 25 GB of disk space.
Other [Ubuntu flavors][3] may have different system requirements.
#### Can I use Ubuntu 20.04 on 32-bit systems?
No, not at all. You cannot use Ubuntu 20.04 on 32-bit systems. Even if you are using 32-bit Ubuntu 18.04, you cannot upgrade to Ubuntu 20.04. There is ISO for 32-bit systems for past several years.
![Error while upgrading 32-bit Ubuntu 18.04 to Ubuntu 20.04][4]
#### Can I use Wine on Ubuntu 20.04?
Yes, you can still use Wine on Ubuntu 20.04 as the 32-bit lib support is still there for packages needed by Wine and [Steam Play][5].
#### Do I have to pay for Ubuntu 20.04 or purchase a license?
No, Ubuntu is completely free to use. You dont have to buy a license key or activate Ubuntu like you do in Windows.
The download section of Ubuntu requests you to donate some money but its up to you if you want to give some money for developing this awesome operating system.
#### What GNOME version does it have?
Ubuntu 20.04 has GNOME 3.36.
#### Does Ubuntu 20.04 have better performance than Ubuntu 18.04?
Yes, in several aspects. Ubuntu 20.04 installs faster and it even boost faster. I have shown the performance comparison in the video below at 4:40 minutes.
The scroll, Windows animation and other UI elements are more fluid and give a smoother experience in GNOME 3.36.
#### How long will Ubuntu 20.04 be supported?
It is a long-term support (LTS) release and like any LTS release, it will be supported for five years. Which means that Ubuntu 20.04 will get security and maintenance updates until April 2025.
#### Will I lose data while upgrading to Ubuntu 20.04?
You can upgrade to Ubuntu 20.04 from Ubuntu 19.10 or Ubuntu 18.04. You dont need to create a live USB and install from it. All you need is a good internet connection that can download around 1.5 GB of data.
Upgrading from an existing system doesnt harm your files. You should have all your files as it is and most of your existing software should be either have the same version or upgraded versions.
If you have used some third-party tools or [additional PPA][6], the upgrade procedure will disable them. You can enable these additional repositories again if they are available for Ubuntu 20.04.
Upgrading takes like an hour and after a restart, you will be logged in to the newer version.
Though your data will not be touched and you wont lose system files and configurations, it is always a good idea to make backup of important data externally.
#### When will I get to upgrade to Ubuntu 20.04?
![][7]
If you are using Ubuntu 19.10 and have correct update settings in place (as mentioned in the earlier sections), you should be notified for upgrading to Ubuntu 20.04 within a few days of Ubuntu 18.04 release.
For Ubuntu 18.04 users, it may take some weeks before they are officially notified of the availability of Ubuntu 18.04. Probably, you may get the prompt after the first point release of Ubuntu 20.04.1.
#### If I upgrade to Ubuntu 20.04, can I downgrade to 19.10 or 18.04?
No, you cannot. While upgrading to a newer version is easy, there is no option to downgrade.  If you want to go back to Ubuntu 18.04, youll have [install Ubuntu 18.04][8] again.
#### I am using Ubuntu 18.04 LTS. Should I Upgrade to Ubuntu 20.04 LTS?
That depends upon you. If you are impressed by the new features in Ubuntu 20.04 and want to get your hands on it, you should upgrade.
If you want a more stable system, I advise waiting for the first point release Ubuntu 20.04.1 release that will have bug fixes in the new release. 20.04.1 should typically be coming approximately two months after the release of Ubuntu 20.04.
In either case, I recommend upgrading to Ubuntu 20.04 sooner or later. Ubuntu 20.04 has newer kernel, performance improvement and above all newer versions of software available in the repository.
Make a backup on external disk and with a good internet connectivity, the upgrade should not be an issue.
#### Should I do a fresh install of Ubuntu 20.04 or upgrade to it from 18.04/19.10?
If you have a choice, make a backup of your data and do a fresh install of Ubuntu 20.04.
Upgrading to 20.04 from an existing version is a convenient option. However, in my opinion, it still keeps some traces/packages of the older version. A fresh install is always cleaner.
#### Any other questions about Ubuntu 20.04?
If you have any other doubts regarding Ubuntu 20.04, please feel free to leave a comment below. If you think some other information should be added to the list, please let me know.
--------------------------------------------------------------------------------
via: https://itsfoss.com/ubuntu-20-04-faq/
作者:[Abhishek Prakash][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/abhishek/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/ubuntu-20-04-release-features/
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu_20_04_faq.jpg?ssl=1
[3]: https://itsfoss.com/which-ubuntu-install/
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-32-bit.jpg?ssl=1
[5]: https://itsfoss.com/steam-play/
[6]: https://itsfoss.com/ppa-guide/
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/upgrade-ubuntu-20-04.jpg?ssl=1
[8]: https://itsfoss.com/install-ubuntu/

View File

@ -0,0 +1,139 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (4 open source chat applications you should use right now)
[#]: via: (https://opensource.com/article/20/4/open-source-chat)
[#]: author: (Sudeshna Sur https://opensource.com/users/sudeshna-sur)
4 open source chat applications you should use right now
======
Collaborating remotely is an essential capability now, making open
source real-time chat an essential piece of your toolbox.
![Chat bubbles][1]
The first thing we usually do after waking up in the morning is to check our cellphone to see if there are important messages from our colleagues and friends. Whether or not it's a good idea, this behavior has become part of our daily lifestyle.
> _"Man is a rational animal. He can think up a reason for anything he wants to believe."_
> _ Anatole France_
No matter the soundness of the reason, we all have a suite of communication tools—email, phone calls, web-conferencing tools, or social networking—we use on a daily basis. Even before COVID-19, working from home already made these communication tools an essential part of our world. And as the pandemic has made working from home the new normal, we're facing unprecedented changes to how we communicate, which makes these tools not merely essential but now required.
### Why chat?
When working remotely as a part of a globally distributed team, we must have a collaborative environment. Chat applications play a vital role in helping us stay connected. In contrast to email, chat applications provide fast, real-time communications with colleagues around the globe.
There are a lot of factors involved in choosing a chat application. To help you pick the right one for you, in this article, I'll explore four open source chat applications and one open source video-communication tool (for when you need to be "face-to-face" with your colleagues), then outline some of the features you should look for in an effective communication application.
### 4 open source chat apps
#### Rocket.Chat
![Rocket.Chat][2]
[Rocket.Chat][3] is a comprehensive communication platform that classifies channels as public (open to anyone who joins) or private (invitation-only) rooms. You can also send direct messages to people who are logged in; share documents, links, photos, videos, and GIFs; make video calls; and send audio messages without leaving the platform.
Rocket.Chat is free and open source, but what makes it unique is its self-hosted chat system. You can download it onto your server, whether it's an on-premises server or a virtual private server on a public cloud.
Rocket.Chat is completely free, and its [source code][4] is available on GitHub. Many open source projects use Rocket.Chat as their official communication platform. It is constantly evolving with new features and improvements.
The things I like the most about Rocket.Chat are its ability to be customized according to user requirements and that it uses machine learning to do automatic, real-time message translation between users. You can also download Rocket.Chat for your mobile device and use it on the go.
#### IRC
![IRC on WeeChat 0.3.5][5]
[Internet Relay Chat (IRC)][6] is a real-time, text-based form of communication. Although it's one of the oldest forms of electronic communication, it remains popular among many well-known software projects.
IRC channels are discrete chat rooms. It allows you to have conversations with multiple people in an open channel or chat with someone privately one-on-one. If a channel name starts with a #, you can assume it to be official, whereas chat rooms that begin with ## are unofficial and usually casual.
[Getting started with IRC][7] is easy. Your IRC handle or nickname is what allows people to find you, so it must be unique. But your choice of IRC client is completely your decision. If you want a more feature-rich application than a standard IRC client, you can connect to IRC with [Riot.im][8].
Given its age, why should you still be on IRC? For one reason, it remains the home for many of the free and open source projects we depend on. If you want to participate in open source software and communities, IRC is the option to get started.
#### Zulip
![Zulip][9]
[Zulip][10] is a popular group-chat application that follows the topic-based threading model. In Zulip, you subscribe to streams, just like in IRC channels or Rocket.Chat. But each Zulip stream opens a topic that is unique, which helps you track conversations later, thus making it more organized.
Like other platforms, it supports emojis, inline images, video, and tweet previews. It also supports LaTeX for sharing math formulas or equations and Markdown and syntax highlighting for sharing code.
Zulip is cross-platform and offers APIs for building your own integrations. Something I especially like about Zulip is its integration feature with GitHub: if I'm working on an issue, I can use Zulip's marker to link back to the pull request ID.
Zulip is open source (you can access its [source code][11] on GitHub) and free to use, but it has paid offerings for on-premises support, [LDAP][12] integration, and more storage.
#### Let's Chat
![Let's Chat][13]
[Let's Chat][14] is a self-hosted chat solution for small teams. It runs on Node.js and MongoDB and can be deployed to local servers or hosted services with a few clicks. It's free and open source, with the [source code][15] available on GitHub.
What differentiates Let's Chat from other open source chat tools is its enterprise features: it supports LDAP and [Kerberos][16] authentication. It also has all the features a new user would want: you can search message history in the archives and tag people with mentions like @username.
What I like about Let's Chat is that it has private and password-protected rooms, image embeds, GIPHY support, and code pasting. It is constantly evolving and adding more features to its bucket.
### Bonus: Open source video chat with Jitsi
![Jitsi][17]
Sometimes text chat isn't enough, and you need to talk to someone face-to-face. In times like these, when in-person meetings aren't an option, video chat is the best alternative. [Jitsi][18] is a complete, open source, multi-platform, and WebRTC-compliant videoconferencing tool.
Jitsi began with Jitsi Desktop and has evolved into multiple [projects][19], including Jitsi Meet, Jitsi Videobridge, jibri, and libjitsi, with [source code][20] published for each on GitHub.
Jitsi is secure and scalable and supports advanced video-routing concepts such as simulcast and bandwidth estimation, as well as typical capabilities like audio, recording, screen-sharing, and dial-in features. You can set a password to secure your video-chat room and protect it against intruders, and it also supports live-streaming over YouTube. You can also build your own Jitsi server and host it on-premises or on a virtual private server, such as a Digital Ocean Droplet.
What I like most about Jitsi is that it is free and frictionless; anyone can start a meeting in no time by visiting [meet.jit.si][21], and users are good to go with no need for registration or installation. (However, registration gives you calendar integrations.) This low-barrier-to-entry alternative to popular videoconferencing services is helping Jitsi's popularity spread rapidly.
### Tips for choosing a chat application
The variety of open source chat applications can make it hard to pick one. The following are some general guidelines for choosing a chat app.
* Tools that have an interactive interface and simple navigation are ideal.
* It's better to look for a tool that has great features and allows people to use it in various ways.
* Integrations with tools you use can play an important role in your decision. Some tools have great and seamless integrations with GitHub, GitLab, and certain applications, which is a useful feature.
* It's convenient to use tools that have a pathway to hosting on cloud-based services.
* The security of the chat service should be taken into account. The ability to host services on a private server is necessary for many organizations and individuals.
* It's best to select communication tools that have rich privacy settings and allow for both private and public chat rooms.
Since people are more dependent than ever on online services, it is smart to have a backup communication platform available. For example, if a project is using Rocket.Chat, it should also have the option to hop into IRC, if necessary. Since these services are continuously updating, you may find yourself connected to multiple channels, and this is where integration becomes so valuable.
Of the different open source chat services available, which ones do you like and use? How do these tools help you work remotely? Please share your thoughts in the comments.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/open-source-chat
作者:[Sudeshna Sur][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/sudeshna-sur
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/talk_chat_communication_team.png?itok=CYfZ_gE7 (Chat bubbles)
[2]: https://opensource.com/sites/default/files/uploads/rocketchat.png (Rocket.Chat)
[3]: https://rocket.chat/
[4]: https://github.com/RocketChat/Rocket.Chat
[5]: https://opensource.com/sites/default/files/uploads/irc.png (IRC on WeeChat 0.3.5)
[6]: https://en.wikipedia.org/wiki/Internet_Relay_Chat
[7]: https://opensource.com/article/16/6/getting-started-irc
[8]: https://opensource.com/article/17/5/introducing-riot-IRC
[9]: https://opensource.com/sites/default/files/uploads/zulip.png (Zulip)
[10]: https://zulipchat.com/
[11]: https://github.com/zulip/zulip
[12]: https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol
[13]: https://opensource.com/sites/default/files/uploads/lets-chat.png (Let's Chat)
[14]: https://sdelements.github.io/lets-chat/
[15]: https://github.com/sdelements/lets-chat
[16]: https://en.wikipedia.org/wiki/Kerberos_(protocol)
[17]: https://opensource.com/sites/default/files/uploads/jitsi_0_0.jpg (Jitsi)
[18]: https://jitsi.org/
[19]: https://jitsi.org/projects/
[20]: https://github.com/jitsi
[21]: http://meet.jit.si

View File

@ -0,0 +1,283 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (16 Things to do After Installing Ubuntu 20.04)
[#]: via: (https://itsfoss.com/things-to-do-after-installing-ubuntu-20-04/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
16 Things to do After Installing Ubuntu 20.04
======
_**Here is a list of tweaks and things to do after installing Ubuntu 20.04, to get a smoother and better desktop Linux experience.**_
[Ubuntu 20.04 LTS brings plenty of new features][1] and visual changes. If you choose to install Ubuntu 20.04, let me show you a few recommended steps that you can follow to get started with it.
### 16 Things to do after installing Ubuntu 20.04 LTS “Focal Fossa”
![][2]
The steps I am going to mention here are my recommendation. You may ignore a few customization or tweaks if they dont suit your need and interest.
Similarly, some steps may seem too simple but essential for someone completely new to Ubuntu.
A number of suggestions here are suited for the default Ubuntu 20.04 with GNOME desktop. So please check [which Ubuntu version][3] and [which desktop environment][4] you are using.
Lets get started with the list of things to do after installing Ubuntu 20.04 LTS codenamed Focal Fossa.
#### 1\. Get your system ready by updating and enabling additional repos
The first thing you should do after installing Ubuntu or any other Linux distribution is to update it. Linux works on a local database of available packages. And this cache needs to be synced in order for you to be able to install any software.
It is very easy to update Ubuntu. You can run the software updater from the menu (press Windows key and search for software updater):
![Software Updater in Ubuntu 20.04][5]
You may also use the following command in the terminal to update your system:
```
sudo apt update && sudo apt upgrade
```
Next, you should make sure that you have [universe and multiverse repositories enabled][6]. Youll have access to a lot more software with these repositories. I also recommend reading about [Ubuntu repositories][6] to learn the basic concept behind it.
Search for Software &amp; Updates in the menu:
![Software & Updates Settings][7]
Make sure to check the boxes in front of the repositories:
![Enable additional repositories][8]
#### 2\. Install media codecs to play MP3, MPEG4 and other media files
If you want to play media files like MP3, MPEG4, AVI etc, youll need to install media codecs. Ubuntu doesnt install it by default because of copyright issues in various countries.
As an individual, you can install these media codecs easily [using the Ubuntu Restricted Extra package][9]. This will install media codecs, Adobe Flash player and [Microsoft True Type Fonts in your Ubuntu system][10].
You can install it by [clicking this link][11] (it will asked to be open in software center) or use this command:
```
sudo apt install ubuntu-restricted-extras
```
If you encounter the EULA or the license screen, remember to use the tab key to select between the options and then hit enter to confirm your choice.
![Press tab to select OK and press enter][12]
#### 3\. Install software from the software center or the web
Now that you have set up the repositories and updated the package cache, you should start installing software that you need.
There are several ways of [installing applications in Ubuntu][13]. The easiest and the official way is to use the Software Center.
![Ubuntu Software Center][14]
If you want some recommendation about software, please refer to this extensive [list of Ubuntu applications for different purposes][15].
Some software vendors provide .deb files to easily install their application. You may get the deb files from their website. For example, to [install Google Chrome on Ubuntu][16], you can get the deb file from its website and double click on it to start the installation.
#### 4\. Enjoy gaming with Steam Proton and GameMode
[Gaming on Linux][17] has come a long way. You are not restricted to a handful of games included by default. You can [install Steam on Ubuntu][18] and enjoy a good number of games.
[Steams new P][19][r][19][oton project][19] enables you to play a number of Windows-only games on Linux. In addition to that, Ubuntu 20.04 comes with [Feral Interactives GameMode][20] installed by default.
The GameMode automatically adjust Linux system performance to give more priority to games than other background processes.
This means some games that support the GameMode (like [Rise of Tomb Raiders][21]) should have improved performance on Ubuntu.
#### 5\. Manage auto-updates (for intermediate and experts)
Recently, Ubuntu has started to automatically download and install security updates that are essential to your system. This is a security feature as a regular user, you should leave it as it is,
But if you like to do everything on your own and this auto-update is frequently leading you to [“Unable to lock the administration directory” error][22], maybe you can change the auto updates behavior.
You can opt for the Show immediately so that it notifies you of security updates as soon as they are available instead of automatically installing.
![Control the auto updates settings][23]
#### 6\. Control automatic suspend and screenlock for laptops
If you are using Ubuntu 20.04 on a laptop then you may want to pay attention to a few power and screenlock settings.
If your laptop is on battery mode, Ubuntu will suspend the system after 20 minutes of inactivity. This is done to save battery power. Personally, I dont like it and thus I disable it.
Similarly, if you leave your system for a few minutes, it automatically locks the screen. I dont like this behavior as well so I prefer disabling it.
![Power Settings in Ubuntu 20.04][24]
#### 7\. Enjoy dark mode
One of the [most talked about features of Ubuntu 20.04][25] is the dark mode. You can enable the dark mode by going into Settings and selecting it under Appearance section.
![Enable Dark Theme Ubuntu][26]
You may have to do some [additional tweaking to get full dark mode in Ubuntu 20.04][27].
#### 8\. Control desktop icons and launcher
If you want a minimal looking desktop, you can disable the icons on the desktop. You can also disable the launcher from the left side and the appindicators in the top panel.
All this can be controlled via the new GNOME Extensions that is already available by default.
![][28]
By the way, you can also change the position of the launcher to the bottom or to the right by going to the Settings-&gt;Appearance.
#### 9\. Use emojis (smileys) and special characters or disable it from the search
Ubuntu provides an easy way to use smiley or the emoticons. There is a dedicated application called Characters installed by default. It basically gives you [Unicode][29] of the emojis.
Not only emojis, you can use it to get the unicode for French, German, Russian and Latin characters. Clicking on the symbol gives you the opportunity to copy the unicode and when you paste this code, your chosen symbol should be typed.
![Emoji Ubuntu][30]
Youll find these special characters and emoticons appearing in the desktop search as well. You can copy them from the search results as well.
![Emojis appear in desktop search][31]
If you dont want to see them in search results, you should disable their access to the search feature. The next section discuss how to do that.
#### 10\. Master the desktop search
The GNOME desktop has a powerful search feature. Most people use it for searching installed applications but it is more than just that.
Press the super key (Windows key) and search for something. It will show any applications that matches that search term, followed by system settings and matching applications available in the software center.
![Desktop search][32]
Not only that, the search can also find text inside files. If you are using the calendar, it can also find your meetings and reminders. You can even do quick calculations in the search and copy its result.
![Quick Calculations Ubuntu Search][33]
You can control what can be searched and in which order by going into Settings.
![][34]
#### 11\. Use nightlight feature to reduce eye strain at night
If you use your computer or smartphone at night, you should use the night light feature to reduce eye strain. I feel that it helps a lot.
The night light feature adds a yellow tint to the screen which is less pinching than the white light.
You can enable night light in the Settings -&gt; Displays and switching to Night Light tab. You can set the yellowness as per your liking.
![Nightlight feature][35]
#### 12\. Got a 2K/4K screen? Use fractional scaling to get bigger icons and fonts
If you feel that the icons, fonts, folders everything looks too small on your HiDPI screen, you can take advantage of the fractional scaling.
Enabling fractional scaling gives you more options to increase the size between 100% to 200%. You can choose the scaling size that suits your preference.
![Enable fractional scaling from Settings -> Displays][36]
#### 13\. Explore GNOME Extensions to extend the usability of GNOME desktop
The GNOME desktop has tiny plugins or add-ons called Extensions. You should [learn to use GNOME extensions][37] to extend the usability of your system.
As you can see in the image below, the weather extension shows the weather information in the top panel. A tiny but useful thing. You may also take a look at some of [best GNOME extensions][38] here. Dont install all of them, use only those that are useful to you.
![Weather Extension][39]
#### 14\. Enable do not disturb mode and focus on work
If you want to concentrate on work, disabling desktop notifications would come handy. You can easily enable do not disturb mode and mute all notifications.
![Enable Do Not Disturb to get rid of desktop notifications][40]
These notifications will still be in the message tray so that you can read them later but they wont pop up on the desktop anymore.
#### 15\. Clean your system
This is something you dont need to do right after installing Ubuntu. But keeping it in mind will help you.
Over the time, your system will have significant amount of packages that wont be needed anymore. You can remove them all in one go with this command:
```
sudo apt autoremove
```
There are other [ways to clean Ubuntu to free disk space][41] but this is the easiest and safest.
#### 16\. Tweak and customize the GNOME desktop to your liking
I highly recommend [installing GNOME Tweaks tool][42]. This will give you access to a few additional settings to tweak.
![Gnome Tweaks Tool][43]
For example, you can [display battery percentage][44], [fix right click in touchpad issue][45], change shell theme, change mouse pointer speed, display date and week numbers, change application window behavior etc.
There is no end to customization and I cannot probably most of them here. This is why I recommend [reading these articles][42] about [customizing GNOME desktop][46].
You can also [install new themes in Ubuntu][47] though personally, I like the default theme in this release. This is the first time that I have stuck with the default icons and theme in an Ubuntu release.
#### What do you do after installing Ubuntu?
If you are an Ubuntu beginner, I recommend [going through this collection of Ubuntu tutorials][48] to get started with it.
So these were my recommendations. What are the steps you follow after installing Ubuntu? Share your favorite things and I might update this article with your suggestions.
--------------------------------------------------------------------------------
via: https://itsfoss.com/things-to-do-after-installing-ubuntu-20-04/
作者:[Abhishek Prakash][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/abhishek/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/ubuntu-20-04-release-features/
[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/things-to-do-after-installing-ubuntu-20-04.jpg?ssl=1
[3]: https://itsfoss.com/how-to-know-ubuntu-unity-version/
[4]: https://itsfoss.com/find-desktop-environment/
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/software-updater-ubuntu-20-04.jpg?ssl=1
[6]: https://itsfoss.com/ubuntu-repositories/
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/software-updates-settings-ubuntu-20-04.jpg?ssl=1
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/extra-repositories-ubuntu-20.jpg?ssl=1
[9]: https://itsfoss.com/install-media-codecs-ubuntu/
[10]: https://itsfoss.com/install-microsoft-fonts-ubuntu/
[11]: https://ubuntu-restricted-extras/
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/installing_ubuntu_restricted_extras.jpg?ssl=1
[13]: https://itsfoss.com/remove-install-software-ubuntu/
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/software-center-ubuntu-20.png?resize=800%2C509&ssl=1
[15]: https://itsfoss.com/best-ubuntu-apps/
[16]: https://itsfoss.com/install-chrome-ubuntu/
[17]: https://itsfoss.com/linux-gaming-guide/
[18]: https://itsfoss.com/install-steam-ubuntu-linux/
[19]: https://itsfoss.com/steam-play/
[20]: https://github.com/FeralInteractive/gamemode
[21]: https://en.wikipedia.org/wiki/Rise_of_the_Tomb_Raider
[22]: https://itsfoss.com/could-not-get-lock-error/
[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/auto-updates-ubuntu.png?resize=800%2C361&ssl=1
[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/power-settings-ubuntu-20-04.png?fit=800%2C591&ssl=1
[25]: https://www.youtube.com/watch?v=lpq8pm_xkSE
[26]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/enable-dark-theme-ubuntu.png?ssl=1
[27]: https://itsfoss.com/dark-mode-ubuntu/
[28]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/disable-dock-ubuntu-20-04.png?ssl=1
[29]: https://en.wikipedia.org/wiki/List_of_Unicode_characters
[30]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/emoji-ubuntu.jpg?ssl=1
[31]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/emojis-desktop-search-ubuntu.jpg?ssl=1
[32]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-desktop-search-1.jpg?ssl=1
[33]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/quick-calculations-ubuntu-search.jpg?ssl=1
[34]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/search-settings-control-ubuntu.png?resize=800%2C534&ssl=1
[35]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/nightlight-ubuntu-20-04.png?ssl=1
[36]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/fractional-scaling-ubuntu.jpg?ssl=1
[37]: https://itsfoss.com/gnome-shell-extensions/
[38]: https://itsfoss.com/best-gnome-extensions/
[39]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/weather-extension-ubuntu.jpg?ssl=1
[40]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/do-not-distrub-option-ubuntu-20-04.png?ssl=1
[41]: https://itsfoss.com/free-up-space-ubuntu-linux/
[42]: https://itsfoss.com/gnome-tweak-tool/
[43]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/gnome-tweaks-tool-ubuntu-20-04.png?fit=800%2C551&ssl=1
[44]: https://itsfoss.com/display-battery-ubuntu/
[45]: https://itsfoss.com/fix-right-click-touchpad-ubuntu/
[46]: https://itsfoss.com/gnome-tricks-ubuntu/
[47]: https://itsfoss.com/install-themes-ubuntu/
[48]: https://itsfoss.com/getting-started-with-ubuntu/

View File

@ -0,0 +1,55 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (What you need to know about open source ad blockers)
[#]: via: (https://opensource.com/article/20/4/ad-blockers)
[#]: author: (Joshua Pearce https://opensource.com/users/jmpearce)
What you need to know about open source ad blockers
======
Three open source ad blockers were tested against a "no ad blocker"
control.
![Browser of things][1]
A new [study][2] meant to investigate energy conservation of free and open source ad blockers has unexpectedly shown that Internet ads are wasting shocking amounts of your time.
More importantly, the results show how you can get that time back. The study estimates that the average Internet user would save over 100 hours a year by using [uBlock Origi][3][n][3][,][3] a free and open source ad blocker. uBlock Origin was the most effective ad blocker tested, but all ad blockers save time, energy and money according to the study.
![Ad blocker screen comparison][4]
The results show that page load time dropped 11% with [AdBlock+][5], 22% with [Privacy Badger][6], and 28% with [uBlock Origi][3][n][3]. These are not significant on a single page, but Internet users spend more than half of their time online rapidly clicking through websites, spending less than 15 seconds on a given page. With all these clicks, the additional time to load ads really starts to add up.
The article _[Energy Conservation with Open Source Ad Blockers][7]_, published in the journal _Technologies,_ was originally conceived to address rising energy consumption. Internet-related electricity consumption is rising rapidly as global Internet users spend more than 6.5 hours per day online. Americans, for example, have more than doubled the time they spend online since 2000 to almost 24 hours a week. Open source ad blockers have the potential to reduce the time, and thus the electricity, spent by eliminating ads during Internet browsing and video streaming.
In the study, three open source ad blockers were tested against a "no ad blocker" control. Page load times were recorded for browsing a representative selection of the most-accessed websites worldwide, including web searching (Google, Yahoo, Bing), information (Weather.com, Wikipedia), and news sites (CNN, Fox, New York Times). In addition, the study analyzed the time spent watching ads on videos for both trending and non-trending content. This part of the study was more challenging due to the lack of data on the ratio of YouTube watching time spent on trending vs. non-trending content. The time wasted viewing ads per video ranged from 0.06% up to a staggering 21%. Thus, the total hours lost to loading ads was only recorded for browsing.
Overall, the results showed that the energy wasted loading ads is not trivial. As a lot of the electricity used for running computers continues to come from coal, which causes air pollution and premature death, the study analyzed the potential for ad blockers to save American lives. The results were shocking: the energy conserved if everyone in the United States used the open source ad blocker would save over 36 American lives per year.
Electricity costs money, so cutting ads could also save consumers money. In the United States, if all Internet users enabled Privacy Badger on their computers, Americans would save more than $91 million annually. Globally, the results of the investigation were even more striking. uBlock Origin could save global consumers more than $1.8 billion a year.
This study was done before everyone was forced to stay home because of the COVID-19 pandemic, so all the values can be viewed as conservative underestimates. Overall, the study found open source ad blockers are a potentially effective technology for energy conservation.
Although free and open source ad blockers save energy and are good for the environment, you are probably going to use them primarily to block annoying ads and save yourself time.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/ad-blockers
作者:[Joshua Pearce][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/jmpearce
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_desktop_website_checklist_metrics.png?itok=OKKbl1UR (Browser of things)
[2]: https://www.mdpi.com/2227-7080/8/2/18
[3]: https://github.com/gorhill/uBlock
[4]: https://opensource.com/sites/default/files/uploads/os_ad_blocker_story_.png (Ad blocker screen comparison)
[5]: https://adblockplus.org/
[6]: https://privacybadger.org/
[7]: https://www.academia.edu/42434401/Energy_Conservation_with_Open_Source_Ad_Blockers

View File

@ -0,0 +1,76 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (What Happened to IPv5? Why there is IPv4, IPv6 but no IPv5?)
[#]: via: (https://itsfoss.com/what-happened-to-ipv5/)
[#]: author: (John Paul https://itsfoss.com/author/john/)
What Happened to IPv5? Why there is IPv4, IPv6 but no IPv5?
======
If you have spent any amount of time in the world of the internet, you should have heard about the IPv4 and IPv6 protocols that our computers use every day.
One question that you might be asking is: Why there is no IPv5? Why IPv6 came after IPv4 and not IPv5? Was there ever a IPv5 and if yes, whatever happened to IPv5?
The answer is yes, there was an IPv5…sort of. Let me quickly explain a few things around it.
### The early history of the internet
![ARPA Logical Map in 1977 | Image courtesy: Wikipedia][1]
In the late 1960s, the US Department of Defenses [Advanced Research Projects Agency][2] (ARPA) started a [project][3] to link computers across the country. The initial goal was to create a networked system of all of the ARPA-funded computers across the country.
Since this was the first time a network of this scale was put together, they were also creating the technology and hardware as they went. One of the first things they worked was an internet protocol (IP) named [Transmission Control Protocol][4] (TCP). This protocol “reliable, ordered, and error-checked delivery of a stream of octets (bytes) between applications running on hosts communicating via an IP network”. Basically, it made sure data got where it needed to go safely.
Originally, TCP was designed to be [“a host-level, end-to-end protocol and a packaging and routing protocol”][5]. However, they realized that they needed to split the protocol to make it more manageable. It was decided that IP would handle packaging and routing.
By this time TCP had gone through three versions, so the new protocol became known as IPv4.
### The birth of IPv5
IPv5 started life under a different name: Internet Stream Protocol (or ST). It was created to experiment with streaming voice and video [“by Apple, NeXT, and Sun Microsystems”][6].
This new protocol was capable of “transferring data packets on specific frequencies while maintaining communication”.
### So what happened to IPv5?
![][7]
IPv5 was never accepted as an official internet protocol. This was mainly due to the 32-bit limitation.
IPV5 used the same addressing system as IPv4. Each address was made up of four sets of numbers between 0 and 255. This limited the number of possible addresses to [4.3 billion][6].
In the early 1970s, that might have seemed like more than the world would ever need. However, the explosive growth of the Internet proved that idea wrong. In 2011, the world officially ran out of the IPv4 addresses.
In the 1990s, a new project was started to work on the next generation of internet protocol (IPng). This led to the 128-bit IPv6. An IPv6 address contains a [“series of eight 4-character hexadecimal numbers”][6] that can contain numbers from 0 to 9 and letters from A to F. Unlike IPv4, IPv6 had trillions of possible addresses, so we should be safe for a while.
Meanwhile, IPv5 laid the groundwork for the voice-over-IP technology that we use to communicate all over the world today. **So, I guess in some small way, you could say that IPv5 still survives to this day**.
I hope you liked this anecdote about internet history. You may read some other [trivia article about Linux and tech in general][8].
If you found this article interesting, please take a minute to share it on social media, Hacker News or [Reddit][9].
--------------------------------------------------------------------------------
via: https://itsfoss.com/what-happened-to-ipv5/
作者:[John Paul][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/john/
[b]: https://github.com/lujun9972
[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/Arpa_internet.png?fit=800%2C573&ssl=1
[2]: https://en.wikipedia.org/wiki/DARPA
[3]: https://en.wikipedia.org/wiki/ARPANET
[4]: https://en.wikipedia.org/wiki/Transmission_Control_Protocol
[5]: https://fcw.com/articles/2006/07/31/what-ever-happened-to-ipv5.aspx
[6]: https://www.lifewire.com/what-happened-to-ipv5-3971327
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/what-happened-to-ipv5.png?ssl=1
[8]: https://itsfoss.com/category/story/
[9]: https://reddit.com/r/linuxusersgroup

View File

@ -1,229 +0,0 @@
[#]: collector: "lujun9972"
[#]: translator: "mr-ping"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: subject: "Different Ways To Update Linux Kernel For Ubuntu"
[#]: via: "https://www.ostechnix.com/different-ways-to-update-linux-kernel-for-ubuntu/"
[#]: author: "SK https://www.ostechnix.com/author/sk/"
升级Ubuntu Linux核心的几种不同方法
======
![](https://www.ostechnix.com/wp-content/uploads/2019/01/ubuntu-linux-kernel-720x340.png)
这个指南里介绍了7种为Ubuntu升级Linux核心的不同方法。这7种方法里有5种需要重启系统来使新核心生效其他两种则不用。升级之前**强烈建议您将重要数据进行备份!** 这里提到的所有方法只在Ubuntu中测试过。我们并不确定这些方法是不是也能适用于其他Ubuntu的特色发行版Xubuntu和衍生发行版Linux Mint
### 第一部分: 需要重启的核心升级
以下方法需要您重启系统以便新的核心生效。所有方法都建议在个人系统或测试系统中进行。重要的事儿再说一遍请备份好您Ubuntu中的重要数据、配置文件和其他重要的东西。
### 方法  使用dpkg升级Linux核心(手动方式)
这个方法里会帮助你手动从**[kernel.ubuntu.com][1]**网站下载可用的最新Linux核心。如果你打算安装最新版而不是稳定版或者正式发布版那这种方法对你会很有用。从以上链接下载Linux核心版本。编写这个指南的时候最新的可用版本是**5.0-rc1**,最新的稳定版是**v4.20**.
![][3]
基于你的选择点击相应的Linux核心版本链接找到你对应的架构Build for XXX的那部分。然后下载符合以下格式的两个文件(其中 X.Y.Z 是最高版本号)
1. linux-image-*X.Y.Z*-generic-*.deb
2. linux-modules-X.Y.Z*-generic-*.deb
在终端中修改文件所在的目录,然后执行命令,手动安装核心:
```
$ sudo dpkg --install *.deb
```
重启系统,使用新核心:
```
$ sudo reboot
```
检查是否如你所愿:
```
$ uname -r
```
对于分步的说明请查看以下名为“Install Linux Kernel 4.15 LTS On DEB based systems”的文章。
+ [Install Linux Kernel 4.15 In RPM And DEB Based Systems](https://www.ostechnix.com/install-linux-kernel-4-15-rpm-deb-based-systems/)
以上的指南是针对的是4.15版本,不过安装最新版本的所有的步骤都是一样的。
**优势:** 不必联网你可以从任何系统中下载Linux核心来使用
**缺点:** 手动更新,需要重启系统。
#### 方法2 - 用apt-get来升级Linux核心推荐方法
这是在类Ubuntu系统中升级Linux核心的推荐方法。不同于上一个方法这种方法会从Ubuntu官方仓库下载、安装核心版本而不是从 **kernel.ubuntu.com**网站。
要升级包括核心的整个系统,只需要执行:
```
$ sudo apt-get update
$ sudo apt-get upgrade
```
如果只希望升级核心,运行:
```
$ sudo apt-get upgrade linux-image-generic
```
**优势:** 简单。推荐方法。
**缺点:** 需要联网,需要重启。
从官方库中升级核心是最接近开箱即用的方法并且不会出什么问题。如果是生产环境的系统这是最为推荐的升级Linux核心的方法。
方法1和方法2都需要用户去介入到升级Linux核心的过程中。而下边的方法3、 4、 5则几乎是全自动的。
#### 方法3 - 使用Ukuu升级Linux核心
**Ukuu**是一个用于从**kernel.ubuntu.com**下载Linux核心并且将其自动安装到Ubuntu桌面系统和服务器系统中的Gtk图形化界面和命令行工具。Ukku并不是单单简化了手动下载、安装新核心的过程同时也会帮助你移除旧的和不再需要的核心。更多细节可以参照以下指南。
+ [Ukuu An Easy Way To Install And Upgrade Linux Kernel In Ubuntu-based Systems](https://www.ostechnix.com/ukuu-an-easy-way-to-install-and-upgrade-linux-kernel-in-ubuntu-based-systems/)
**优势:** 易于安装使用。自动安装主线核心。
**缺点:** 需要联网,需要重启。
#### 方法4 - 使用UKTools升级Linux核心
跟Ukuu差不多**UKTools**也会从**kernel.ubuntu.com**网站获取最新的核心并且自动安装到Ubuntu以及类似于Linux Mint的延伸发行版中。
+ [UKTools Upgrade Latest Linux Kernel In Ubuntu And Derivatives](https://www.ostechnix.com/uktools-upgrade-latest-linux-kernel-in-ubuntu-and-derivatives/)
**优势:** 简单,自动
**缺点:** 需要联网,需要重启。
#### 方法5 - 使用Linux核心工具集(Linux Kernel Utilities)安装Linux核心
**Linux Kernel Utilities**是目前另一个用于升级类Ubuntu系统Linux核心的程序。实质上它是一个由一系列Bash脚本构成的合集用于编译并且可以选择性地为Debian译者注Ubuntu的上游发行版及其衍生发行版升级核心。它包含三个工具集一个用于手动编译、安装来自于 [**http://www.kernel.org**][4] 网站的源码核心,另一个用于安装来自**<https://kernel.ubuntu.com>**网站的事先编译好的核心,第三个脚本用于移除旧核心。更多细节请浏览以下链接。
+ [Linux Kernel Utilities Scripts To Compile And Update Latest Linux Kernel For Debian And Derivatives](https://www.ostechnix.com/linux-kernel-utilities-scripts-compile-update-latest-linux-kernel-debian-derivatives/)
**优势:** 简单,自动
**缺点:** 需要联网,需要重启。
### 第二部分 Kernel Updates without reboot
我之前说过,上边所有的方法都需要你去重启服务器(译者注:也可以是桌面版)来启用新核心。如果是个人系统或者测试系统,可以这么办。但对于无法停机的生产环境系统该怎么办呢?一点问题没有,这时候**实时补丁(livepatching)**就派上用场了。
**实时补丁**(或者叫热补丁)允许你在不需要重启的情况下安装Linux升级或补丁来保证你的服务器处于最新的安全等级之下。这对web主机、游戏服务器这类需要不间断在线的服务器来说是很有价值的。事实上任何情况下服务器都应该保持在不间断运行的状态下。由于Linux供应商只会在出于修复安全漏洞的目的下维护补丁所以如果安全性是你的点这种方式再适合不过了。
以下两种方法可以在不需要重启的情况下为生产环境和执行关键任务的Ubuntu服务器更新Linux核心。
#### 方法6 使用Canonical实时补丁服务Canonical Livepatch Service来更新Linux核心
![][5]
[**Canonical Livepatch Service**][6] 可以在不需要重启Ubuntu系统的情况下执行核心升级、补丁和安全的热修复等操作在减少服务器宕机的情况下保障其安全。Canonical Livepatch Service 可以在安装过程当中或安装之后尽心设置. 如果你使用的是Ubuntu桌面版软件更新器会自动检查核心补丁的更新并且通知你。在基于控制台的系统中则需要你主动运行apt-get update命令来进行升级。由于需要你手动运行“apt-get upgrade”命令它才会安装核心的安全补丁所以算是半自动的。
Livepatch对三个及以下系统免费如果多于三个你需要升级成名为**Ubuntu Advantage**的企业支持方案套件。这个套件包括**Kernel Livepatching**及以下服务:
* Extended Security Maintenance Ubuntu生命周期后的重要安全更新
* Landscape 针对大规模使用Ubuntu的系统管理工具
* Knowledge Base 由Ubuntu专家撰写的私人文章和教程
* 电话和网站支持
**价格**
Ubuntu Advantage包含三种付费计划 必备Essential, 标准Standard 高级Advanced.最基础的计划Essential 计划)从 **单物理节点 225 美元/年**和**单VPS 75美元/年**开始计价。看上去应该不支持针对Ubuntu服务器版和桌面版的按月订阅。你可以在 [**此处**][7]浏览所有计划的细节信息。
**优势:** 简单。半自动化。无需重启。支持三个免费系统。
**缺点:** 4个以上主机的话非常昂贵. 没有补丁回滚。
**开启 Canonical Livepatch Service**
如果你想在安装后设置实时补丁服务,依照以下方法逐步执行:
从 [**https://auth.livepatch.canonical.com/**][8] 获取一个秘钥.
```
$ sudo snap install canonical-livepatch
$ sudo canonical-livepatch enable your-key
```
#### 方法 使用KernelCare升级Linux内核
![][9]
[**KernelCare**][10] 是所有实时补丁方案中最新的一个. 它是 [CloudLinux][11]推出的产品. KernelCare 可以运行在Ubuntu和其他的Linux特殊发行版中. 它每四个小时检查一遍补丁的发布,并在无需确认的情况下安装它们. 如果更新后存在问题,可以将补丁进行回滚。
**价格**
费用,每台服务器:**4 美元/月** , **45 美元/年**.
跟Ubuntu Livepatch相比kernelCare看起来非常便宜、实惠。好的方面在于**也可以按月订阅**。另一个前者不具备的功能是支持如Red Hat, CentOS, Debian, Oracle Linux, Amazon Linux 以及 OpenVZ, Proxmox 这种虚拟平台等等的其他Linux发行版。
你可以在 [**此处**][12] 了解KernelCare的所有特性和简介以及所有的付费计划的细节。
**优势:** 简单。全自动化。范围更广的操作系统覆盖。补丁回滚。无需重启。对非盈利组织提供免费许可。价格低廉。
**缺点:** 除了30天试用外无免费计划。
**开启 KernelCare Service**
此处 [**https://cloudlinux.com/kernelcare-free-trial5**][14] 获取30天免费试用秘钥。
执行以下命令开启KernelCare并注册秘钥。
```
$ sudo wget -qq -O - https://repo.cloudlinux.com/kernelcare/kernelcare_install.sh | bash
$ sudo /usr/bin/kcarectl --register KEY
```
如果你的目标是价格实惠并且通过可靠的社区服务来保障你的Linux服务器核心的更新那KernelCare是个不错的选择。
*由来自Cloud Linux的技术撰稿人和内容作者**Paul A. Jacobs**撰写。*
**推荐阅读:**
到此,希望这边文章能对你有所帮助。如果你觉得还有其他的工具和方法需要列在这里,可以在留言区给我们留言。我会根据反馈检查和更新这篇指南的。
接下来会有更多好东西给大家呈现,敬请期待。
Cheers!
--------------------------------------------------------------------------------
via: https://www.ostechnix.com/different-ways-to-update-linux-kernel-for-ubuntu/
作者:[SK][a]
选题:[lujun9972][b]
译者:[mr-ping](https://github.com/mr-ping)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.ostechnix.com/author/sk/
[b]: https://github.com/lujun9972
[1]: http://kernel.ubuntu.com/~kernel-ppa/mainline/
[2]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
[3]: http://www.ostechnix.com/wp-content/uploads/2019/01/Ubuntu-mainline-kernel.png
[4]: http://www.kernel.org
[5]: http://www.ostechnix.com/wp-content/uploads/2019/01/Livepatch.png
[6]: https://www.ubuntu.com/livepatch
[7]: https://www.ubuntu.com/support/plans-and-pricing
[8]: https://auth.livepatch.canonical.com/
[9]: http://www.ostechnix.com/wp-content/uploads/2019/01/KernelCare.png
[10]: https://www.kernelcare.com/
[11]: https://www.cloudlinux.com/
[12]: https://www.kernelcare.com/update-kernel-linux/
[13]: https://www.kernelcare.com/pricing/
[14]: https://cloudlinux.com/kernelcare-free-trial5

View File

@ -0,0 +1,98 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (What is Silverblue?)
[#]: via: (https://fedoramagazine.org/what-is-silverblue/)
[#]: author: (Tomáš Popela https://fedoramagazine.org/author/tpopela/)
何谓 Silverblue
======
![][1]
Fedora Silverblue 在 Fedora 世界内外越来越受欢迎。因此,根据社区的反馈,以下是关于这个项目的一些有趣问题的答案。如果你有任何其他与 Silverblue 相关的问题,请在评论区留言,我们会在未来的文章中回答。
### 何谓 Silverblue
Silverblue 是新一代桌面操作系统的代号,之前被称为 Atomic Workstation。该操作系统是通过利用 [rpm-ostree 项目][2]创建的映像来交付的。这种系统的主要优点是速度、安全性、原子更新和不变性。
### “Silverblue”到底是什么意思
“Team Silverblue” 或简称 “Silverblue”没有任何隐藏的含义。该项目以前被称为 Atomic Workstation大约两个月后更名时选中了这个名字。在这个过程中审查过 150 多个单词或单词组合。最终选择了 “Silverblue”因为它有一个可用的域名以及社交网络账号。人们可以把它看成是 Fedora 的蓝色品牌的一个新的品牌形象可以用在诸如“加油Silverblue 团队!”或“想加入该团队,改进 Silverblue 吗?”这样的短语中。
### 何谓 ostree
[OSTree 或 libostree 是一个项目][3],它结合了一个类似 Git 的提交和下载可引导文件系统树的模型以及用于部署它们和管理引导加载程序配置的层。OSTree 被 rpm-ostree 所使用,这是 Silverblue 使用的一个基于包/镜像的混合系统。它原子化地复制了一个基础操作系统,并允许用户在需要时在基础操作系统之上 "分层 "传统的 RPM。
### 为何使用 Silverblue
因为它可以让你专注于你的工作,而不是你正在运行的操作系统。因为系统的更新是原子式的,所以它更稳健。你唯一需要做的事情就是重新启动到新的镜像中。此外,如果当前启动的镜像有什么问题,你可以很容易地重启/回滚到之前可以工作的镜像,如果有的话。如果没有,你可以使用 `ostree` 命令下载并启动过去生成的任何其他镜像。
另一个好处是可以在不同的分支(或者用旧的语境说就是 Fedora 版本)之间轻松切换。你可以轻松地尝试 [Rawhide][4] 或 [updates-testing][5] 分支,然后返回到包含当前稳定版本的分支。另外,如果你想尝试一些新奇的东西,也可以考虑试试 Silverblue。
### 不可变的操作系统有什么好处?
其中一个主要的好处是安全。基础操作系统是以只读的形式挂载的,因此不能被恶意软件修改。唯一可以改变系统的方法是通过 `rpm-ostree` 实用程序。
另一个好处是健壮性。普通用户几乎不可能在不小心或无意中删除了一些系统库后,让操作系统恢复到不启动或无法正常工作的状态。试着想想你过去的这些经历,就可以明白 Silverblue 如何帮助你。
### 如何在 Silverblue 中管理应用程序和包?
对于图形化用户界面的应用程序,建议使用 [Flatpak][6],如果应用程序是以 Flatpak 的形式提供的话。用户可以选择来自 Fedora 的 Flatpak和从 Fedora 包及 Fedora 自己的基础架构中构建的 Flatpak或者目前有更广泛的交付的 Flathub。用户可以通过已经支持 Fedora Silverblue 的 GNOME “软件”轻松安装它们。
用户首先发现的一件事就是操作系统中没有预装 `dnf`。主要原因是它不能在 Silverblue 上工作 —— 它的部分功能被 `rpm-ostree` 命令所取代。用户可以通过使用 `rpm-ostree install PACKAGE` 来层叠传统的软件包。但只有在没有其他方法的情况下,才应该使用这种方式。这是因为从存储库中提取新的系统镜像时,每次更改系统镜像时都必须重新构建系统镜像,以容纳分层的包或从基础操作系统中删除或替换为其他版本的包。
Fedora Silverblue 自带的默认 GUI 应用程序集是基础操作系统的一部分。团队正在努力将它们移植到 Flatpak 上,这样它们就可以通过这种方式分发。其中一个好处是,基础操作系统将变得更小,更容易维护和测试,用户可以更容易修改他们的默认安装环境。如果你想看一下它是怎么做的,或者有什么帮助,可以看看官方的 [文档][7]。
### 什么是 Toolbox
[Toolbox][8] 是一个让普通用户可以轻松使用容器的项目。它通过使用 podman 的无 root 容器来实现。Toolbox 可以让你在常规的 Fedora 安装中轻松、快速地创建一个容器,你可以在这个容器上折腾或开发,而与你的操作系统分离。
### Silverblue 有路线图吗?
形式上没有,因为我们正在关注在测试过程中发现的问题和社区的反馈。我们目前正在使用 Fedora 的 [Taiga][9] 来进行规划。
### Silverblue 的发布周期是多少?
它和普通的 Fedora Workstation 是一样的。每 6 个月发布一次新版本,支持期为 13 个月。团队计划每两周(或更长时间)发布一次更新,而不是像现在这样每天发布一次。这样一来,更新可以在发送给其他用户之前,由 QA 和社区志愿者进行更彻底的测试。
### 不可变操作系统的未来前景如何?
从我们的角度来看桌面的未来涉及到了不可变的操作系统。这对用户来说是最安全的Android、ChromeOS、ChromeOS、最近的 macOS Catalina 全都在底层采用了这种方式。而对于 Linux 桌面来说一些第三方软件期望写到操作系统的问题还是存在的。HP 打印机驱动程序就是一个很好的例子。
另一个问题是系统中的部分软件如何分发和安装。字体就是一个很好的例子。目前在 Fedora 中,它们是以 RPM 包的形式分发的。如果你想使用它们,你必须层叠它们,然后重新启动到新创建的包含它们的镜像中。
### 标准版 Workstation 的前景如何?
Silverblue 有可能会取代普通的Workstation版本。但 Silverblue 要提供与Workstation版本相同的功能和用户体验还有很长的路要走。在此期间这两款桌面产品将同时推出。
### Atomic Workstation或 Fedora CoreOS 与这些有什么关系?
Atomic Workstation 是在更名为 Fedora Silverblue 之前的项目名称。
Fedora CoreOS 是一个不同但相似的项目。它与 Silverblue 共享一些基本技术,如 `rpm-ostree`、`toolbox` 等。尽管如此CoreOS 是一个更简约、专注于容器、自动更新的操作系统。
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/what-is-silverblue/
作者:[Tomáš Popela][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://fedoramagazine.org/author/tpopela/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/what-is-fedora-silverblue-816x345.jpg
[2]: https://rpm-ostree.readthedocs.io/en/latest/
[3]: https://ostree.readthedocs.io/en/latest/
[4]: https://fedoraproject.org/wiki/Releases/Rawhide
[5]: https://fedoraproject.org/wiki/QA:Updates_Testing
[6]: https://flatpak.org/
[7]: https://docs.fedoraproject.org/en-US/flatpak/tutorial/
[8]: https://github.com/debarshiray/toolbox
[9]: https://teams.fedoraproject.org/project/silverblue/

View File

@ -1,255 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (messon007)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (9 open source cloud native projects to consider)
[#]: via: (https://opensource.com/article/19/8/cloud-native-projects)
[#]: author: (Bryant Son https://opensource.com/users/brsonhttps://opensource.com/users/marcobravo)
值得考虑的9个开源的云原生项目
======
工作中用了容器?熟悉这些出自云原生计算基金会的项目?
![clouds in the sky with blue pattern][1]
随着用容器来开发应用的实践变得流行,[云原生应用][2]也在增长。云原生应用的定义为:
> "云原生技术被用于开发应用程序这些应用通过将服务打包在容器中来完成构建被部署为微服务并通过敏捷的DevOps流程和持续集成工作流在弹性基础设施上管理。"
这个定义提到了构成云原生应用的4个元素
1. 容器
2. 微服务
3. DevOps
4. 持续集成和持续交付 (CI/CD)
尽管这些技术各有各自独特的历史,但它们相互补充,共同导致了云原生应用和工具在短时间内惊人的指数级增长。这个[云原生计算基金会][4]信息图呈现了当今云原生应用生态的规模和广度。
![Cloud-Native Computing Foundation applications ecosystem][5]
云原生计算基金会项目
我想说瞧着吧这仅仅是一个开始。正如NodeJS的出现引发了无休止的JavaScript工具的爆炸式增长一样容器技术的普及也推动了云原生应用的指数增长。
好消息是,有几个组织负责监管这些技术并将它们融合在一起。 其中之一是[**Open Containers InitiativeOCI)**][6]它是一个轻量级的开放的治理机构或项目“它是在Linux基金会的主持下形成的其明确目的是创建开放的行业标准的容器格式和运行时。” 另一个是** CNCF **,“它是一个致力于使云原生计算具有通用性和可持续性的开源软件基金会”。
除了常见的围绕云原生应用建立社区之外CNCF还帮助项目基于其云原生应用建立结构化的管理。CNCF创建了成熟等级的概念沙箱级孵化级或毕业级分别与下图中的“创新者”“早期采用者”和“早期大量应用”相对应。
![CNCF project maturity levels][7]
CNCF项目成熟等级
CNCF为每个成熟等级制定了详细的[标准][8](为方便读者而列在下面)。 获得技术监督委员会TOC三分之二的同意才能转为孵化或毕业级。
### 沙箱级
> 要想成为沙箱级一个项目必须至少有两个TOC赞助商。 有关详细过程,请参见《 CNCF沙箱指南v1.0》。
### 孵化级
>注意:孵化级是我们期望对项目进行全面尽职调查的起点。
>
>要进入孵化阶段,项目除了满足沙箱阶段的要求之外还要满足:
>
> *证明至少有三个独立的最终用户已成功将其用于生产且TOC判断这些最终用户具有足够的质量和范围。
> *合入者的数量要合理。合入者定义为具有合入权的人。即可以接受对部分或全部项目贡献的人。
> *演示有大量正在进行的提交和合并的贡献。
> *由于这些指标可能会根据项目的类型范围和大小而有很大差异因此TOC对足以满足这些标准的活动级别拥有最终决策权
### 毕业级
>要从沙箱或孵化级毕业,或者要使一个新项目作为已毕业项目加入,项目除了必须满足孵化级的标准外还要满足:
>
> *至少有两个组织的提交者。
> *已获得并维护了“核心基础设施计划最佳实践徽章”。
> *已完成独立和第三方安全审核,并发布了具有与以下示例类似的范围和质量的结果(包括已解决的关键漏洞):<https://github.com/envoyproxy/envoy#security-audit>和所有关键毕业之前需要解决漏洞。
> *采用CNCF行为准则。
> *明确定义项目治理和提交流程。最好将其排布在GOVERNANCE.md文件中并引用显示当前提交者和荣誉提交者的OWNERS.md文件。
> *至少有主仓的项目采用者的公开列表例如ADOPTERS.md或项目网站上的徽标
> *获得TOC的多数票进入毕业阶段。如果项目能够证明足够的成熟度则可以尝试直接从沙箱过渡到毕业。项目可以无限期保持孵化状态但是通常预计它们会在两年内毕业。
## 值得考虑的9个项目
本文不可能涵盖所有的CNCF项目我将介绍最有趣的9个“已毕业和孵化中”的开源项目。
名称|授权类型|简要描述
---|---|---
[Kubernetes][9] | Apache 2.0 | 容器编排平台
[Prometheus][10] | Apache 2.0 | 系统和服务监控工具
[Envoy][11] | Apache 2.0 | 边缘和服务代理
[rkt][12] | Apache 2.0 | Pod原生的容器引擎
[Jaeger][13] | Apache 2.0 | 分布式跟踪系统
[Linkerd][14] | Apache 2.0 | 无感服务网格
[Helm][15] | Apache 2.0 | Kubernetes包管理器
[Etcd][16] | Apache 2.0 | 分布式键值存储
[CRI-O][17] | Apache 2.0 | 专门用于Kubernetes的轻量级运行时环境
我也创建了视频材料来介绍这些项目。
## 毕业项目
已毕业的项目被认为是成熟的已被许多组织采用的并且严格遵守了CNCF的准则。 以下是三个最受欢迎的开源CNCF毕业项目。 (请注意,其中一些描述来源于项目的网站并被做了改编。)
### Kubernetes
Kubernetes! 我们如何在不提及Kubernetes的情况下谈论云原生应用程序 Google发明的Kubernetes无疑是最著名的基于容器的应用程序的容器编排平台而且它还是一个开源工具。
什么是容器编排平台? 通常,一个容器引擎本身可以管理几个容器。 但是,当您谈论数千个容器和数百个服务时,管理这些容器变得非常复杂。 这就是容器编排引擎的用武之地。容器编排引擎通过自动化容器的部署,管理,网络和可用性来帮助管理大量的容器。
Docker Swarm和Mesosphere Marathon也是容器编排引擎但是可以肯定地说Kubernetes在竞争中胜出至少现在是这样。Kubernetes还诞生了容器即服务CaaS平台如[OKD][18]它是Origin社区针对Kubernetes的发行版并成了[Red Hat OpenShift][19]的一部分。
想开始学习请访问[Kubernetes GitHub仓库][9],并从[Kubernetes文档][20]页面访问其文档和学习资源。
### Prometheus
Prometheus是2012年在SoundCloud上构建的一个开源系统监控和告警工具。之后许多公司和组织都使用了Prometheus并且该项目拥有非常活跃的开发者和用户群体。 现在,它是一个独立于公司的独立维护的开源项目。
![Prometheus architecture][21]
Prometheus的架构
理解Prometheus的最简单方法是可视化一个生产系统该系统需要24(小时)x365天都可以正常运行。 没有哪个系统是完美的,也有减少故障的技术(称为容错系统)。 但是,如果出现问题,最重要的是尽快识别它。 这就是像Prometheus这样的监控工具的用武之地。Prometheus不仅是容器监控工具它在云原生应用公司中也最受欢迎。 此外,其他开源监视工具,包括[Grafana][22]都借鉴了Prometheus。
开始使用Prometheus的最佳方法是下载其[GitHub仓库][10]。 在本地运行Prometheus很容易但是您需要安装一个容器引擎。 您可以在[Prometheus网站][23]上查看详细的文档。
### Envoy
Envoy或Envoy代理是专为云原生应用设计的开源的边缘代理和服务代理。 由Lyft创建的Envoy是为单一服务和应用而设计的高性能的C++分布式代理,同时也是为由大量微服务组成的服务网格架构而设计的通信总线和通用数据平面。 基于对NginxHAProxy硬件负载均衡器和云负载均衡器等方案了解的基础上Envoy与每个应用相伴(并行)运行,并对网络进行了高度抽象,最终以平台无关的方式来提供通用功能。
当基础设施中的所有服务流量都经过一个Envoy网格时很容易就可以通过连贯的监测来可视化问题域调整整体性能并在单个位置添加基础功能。基本上Envoy代理是一个可帮助组织为生产环境构建容错系统的服务网格工具。
服务网格应用有很多替代方案例如Uber的[Linkerd][24](下面会讨论)和[Istio][25]。 Istio通过将其部署为[Sidecar][26]并利用了[Mixer][27]的配置模型实现了对Envoy的扩展。 Envoy的显著特性有
*所有的“table stakes(入场筹码,引申为基础必备特性)”特性与控制平面例如Istio组合时
*带载运行时99%数据可达到低延时
*将L3/L4过滤器作为核心支持额外的L7过滤器
*支持gRPC和HTTP / 2上行/下行)
   *由API驱动并支持动态配置和热重载
*重点关注指标收集,跟踪和整体可监测性
要想了解Envoy证实其能力并意识到其全部优势需要丰富的在生产级环境运行的经验。 您可以在[详细文档][28]或访问其[GitHub][11]仓库了解更多信息。
## 孵化项目
下面是最流行的开源的CNCF孵化项目中的六个。
### rkt
rkt, 拼为"rocket", 是一个pod原生的容器引擎。它有一个命令行接口用来在Linux上运行容器。从某种意义上讲它和其他容器如[Podman][29], Docker和CRI-O相似。
rkt最初由CoreOS开发后来被Red Hat收购您可以在其网站上找到详细的[文档][30],以及在[GitHub][12]上访问其源代码。
### Jaeger
Jaeger是面向云原生应用的开源的端到端的分布式跟踪系统。 在某种程度上它是像Prometheus这样的监控解决方案。但它有所不同因为其使用场景有所扩展
* 分布式事务监控
* 性能和延时优化
* 根因分析
* 服务的依赖分析
* 分布式上下文传播
Jaeger是Uber建立的开源的技术。 您可以在其网站上找到[详细文档][31]以及在GitHub上找到其[源码][13]。
### Linkerd
像创建Envoy代理的Lyft一样Uber开发了Linkerd开源解决方案用于生产级的服务维护。在某些方面Linkerd就像Envoy一样因为两者都是服务网格工具旨在提供平台级的可观测性可靠性和安全性而无需进行配置或代码更改。
但是,两者之间存在一些细微的差异。 尽管Envoy和Linkerd充当代理并可以通过所连接的服务进行上报但是Envoy并不像Linkerd那样被设计为Kubernetes Ingress控制器。 Linkerd的显著功能包括
*支持多种平台DockerKubernetesDC / OSAmazon ECS或单机
*内置服务发现抽象将多个系统集成在一起
*支持gRPCHTTP / 2和HTTP / 1.x请求和所有的TCP流量
您可以在[Linkerd网站][32]上阅读有关它的更多信息,并在[GitHub][14]上访问其源码。
### Helm
Helm基本上是Kubernetes的软件包管理器。 如果您使用过Apache MavenMaven Nexus或类似的服务您就会理解Helm的作用。 Helm可帮助您管理Kubernetes应用程序。 它使用“Helm图”来定义安装和升级最复杂的Kubernetes应用程序。 Helm并不是实现此功能的唯一方法 另一个流行的概念是[Kubernetes Operators][33]它被Red Hat OpenShift 4所使用。
您可以按照其文档中的[快速开始指南][34]或[GitHub指南][15]来试用Helm。
### Etcd
Etcd是用于分布式系统中最关键数据的分布式的可靠的键值存储。 其主要特性有:
*定义明确的面向用户的APIgRPC
*客户端证书验证可选的自动TLS
*速度可达每秒10,000次写入
*可靠性使用Raft实现分布式
Etcd是Kubernetes和许多其他技术的默认的内置数据存储方案。也就是说它很少独立运行或作为单独的服务运行 相反它利用了集成到KubernetesOKD / OpenShift或其他服务中的一个。 还有[etcd Operator][35]来管理其生命周期并解锁其API管理功能
您可以在[etcd文档][36]中了解更多信息并在GitHub上访问其[源码][16]。
### CRI-O
CRI-O是Kubernetes运行时接口的OCI兼容实现。CRI-O用于各种功能包括
*使用runc或遵从OCI运行时规范的任何实现和OCI运行时工具运行
*使用容器/镜像进行镜像管理
*使用容器/存储来存储和管理镜像层
*通过容器网络接口CNI来提供网络支持
CRI-O提供了大量的[文档][37],包括指南,教程,文章,甚至播客,您还可以访问其[GitHub页面][17]。
* * *
我错过了其他有趣且开源的云原生项目吗? 请在评论中提醒我。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/8/cloud-native-projects
作者:[Bryant Son][a]
选题:[lujun9972][b]
译者:[messon007](https://github.com/messon007)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/brsonhttps://opensource.com/users/marcobravo
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003601_05_mech_osyearbook2016_cloud_cc.png?itok=XSV7yR9e (clouds in the sky with blue pattern)
[2]: https://opensource.com/article/18/7/what-are-cloud-native-apps
[3]: https://thenewstack.io/10-key-attributes-of-cloud-native-applications/
[4]: https://www.cncf.io
[5]: https://opensource.com/sites/default/files/uploads/cncf_1.jpg (Cloud-Native Computing Foundation applications ecosystem)
[6]: https://www.opencontainers.org
[7]: https://opensource.com/sites/default/files/uploads/cncf_2.jpg (CNCF project maturity levels)
[8]: https://github.com/cncf/toc/blob/master/process/graduation_criteria.adoc
[9]: https://github.com/kubernetes/kubernetes
[10]: https://github.com/prometheus/prometheus
[11]: https://github.com/envoyproxy/envoy
[12]: https://github.com/rkt/rkt
[13]: https://github.com/jaegertracing/jaeger
[14]: https://github.com/linkerd/linkerd
[15]: https://github.com/helm/helm
[16]: https://github.com/etcd-io/etcd
[17]: https://github.com/cri-o/cri-o
[18]: https://www.okd.io/
[19]: https://www.openshift.com
[20]: https://kubernetes.io/docs/home
[21]: https://opensource.com/sites/default/files/uploads/cncf_3.jpg (Prometheus architecture)
[22]: https://grafana.com
[23]: https://prometheus.io/docs/introduction/overview
[24]: https://linkerd.io/
[25]: https://istio.io/
[26]: https://istio.io/docs/reference/config/networking/v1alpha3/sidecar
[27]: https://istio.io/docs/reference/config/policy-and-telemetry
[28]: https://www.envoyproxy.io/docs/envoy/latest
[29]: https://podman.io
[30]: https://coreos.com/rkt/docs/latest
[31]: https://www.jaegertracing.io/docs/1.13
[32]: https://linkerd.io/2/overview
[33]: https://coreos.com/operators
[34]: https://helm.sh/docs
[35]: https://github.com/coreos/etcd-operator
[36]: https://etcd.io/docs/v3.3.12
[37]: https://github.com/cri-o/cri-o/blob/master/awesome.md

View File

@ -0,0 +1,188 @@
[#]: collector: (lujun9972)
[#]: translator: (robsean)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to make a Halloween lantern with Inkscape)
[#]: via: (https://opensource.com/article/19/10/how-make-halloween-lantern-inkscape)
[#]: author: (Jess Weichler https://opensource.com/users/cyanide-cupcake)
如何使用 Inkscape 制作万圣节灯笼
======
使用开源软件为你最喜欢的万圣节灯笼制作一个有趣和怪异的装饰品。
![万圣节 - 背光飞行的蝙蝠][1]
闹鬼的季节快到了!今年,使用开源软件装饰一个独一无二的万圣节灯笼!
灯笼的一部分结构体是不透明的,以阻挡内部的光线。灯笼之所以成为灯笼,是因为其去掉了一些东西 :从结构体上切下的窗户,这样光线就可以射出。虽然照明不实用,但是一个有着怪异形状窗户和隐藏暗色轮廓的灯笼却可以令人兴奋,并创造出很多乐趣。
这篇演示如何使用 [Inkscape][2] 创建你自己的灯笼。如果还没有 Inkscape ,在 Linux 上,你可以从软件包存储库中安装它,在 MacOS 和 Windows 上,你可以从[Inkscape 网站][3] 上下载它.
### 使用材料
* 模板 ([A4][4] 或 [Letter][5] 大小)
* 卡片纸 (黑色是传统色)
* 描图纸 (可选)
* 裁纸刀,尺子, 切割垫板 (可使用工艺切割机/激光切割机代替)
* 工艺胶
* LED 茶灯"蜡烛"
_安全注意事项:_ 这个项目只使用电池操作的蜡烛。
### 理解模板
首先,从什么的链接下载你所在区域 (A4 或 Letter) 的合适的模板,然后在 Inkscape 中打开它。
* * *
* * *
* * *
**![灯笼模板荧光屏][6]**
灰白色的棋盘格背景是透明的(从技术角度来说,它是 _alpha 通道_。)
黑色基板构成了灯笼。现在,没有窗口可以让光线穿过;灯笼有一个非镂空的黑色基板。你将在 Inkscape 中使用 **并集****差集** 选项来数字化的设计窗户。
蓝色虚线表示折线。橙色实线表示参考线。采光窗户不应该放在橙色盒子的外面。
模板的左侧是你可以在你设计中使用的一些预先制作好的对象。
### 来创建一个窗户或形状
1. 创建一个看起来像你想要的窗口样式的对象。可以使用 Inkscape 左侧工具栏中的一些形状工具来创建对象。此外,你可以下载 Creative Commons- 或 Public Domain-licensed 剪贴画,并导入 PNG 文件到你的项目中。
2. 当你对对象满意时,在顶部菜单中选择 **路径 > 对象转化成路径** 将其转换为一个 **路径** (而不是一个 **形状** Inkscape 视其为两个不同的目标)。
![对象到路径菜单][7]
3. 在基板形状的上面放置目标。
4. 选择目标和黑色基板。通过先单击一个,并按住 Shift 按键,再选择另一个来完成。
5. 从顶部菜单选择 **路径 > 差集** 来从基板的对象中移除形状。这将创建灯笼中的一个窗户。
![路径 > 差集 菜单][8]
### 添加一个对象到一个窗户中
在制作一个窗户后,你可以添加对象到其中来创建一个景色绘画。
**提示:**
* 所有的对象,包括文本,必须连接到灯笼的基板,否则,在切割后会掉落下来,并留下一片空白区。
* 避免小而复杂的细微之处。即使使用激光切割机或工艺切割机等机器,也很难切割这些细微之处。
1. 创建或导入一个对象。
2. 放置对象到窗口内,以便它至少接触基板的两侧。
3. 选择对象后,从顶部菜单选择 **连接 > 对象转化成路径**
![对象到路径 菜单][9]
4. 选择对象和黑色基板,通过在按住 Shift 按键的同时单击每一个来完成。
5. 选择 **路径 > 并集** 来使对象和基板合二为一。
### 添加文本
文本可以从创建一个窗户的基板上剪下来(就像我对星星所做的那样),或者也可以添加到一个窗户上(它在独挡来自灯笼内部的光线)。如果你正在创建一个窗户只需要执行下面的步骤1和步骤2然后使用 **差集** 来从基板层移除文本。
1. 从左侧边栏中选择文本工具来创建文本。粗体字体效果最好。
![文本工具][10]
2. 选择你的文本,然后从顶部菜单选择 **路径 > 对象转化成路径** 。这将转换文本对象为一个路径。注意这个步骤意味着你将不能再编辑该文本所以_只有当_ 你确定你拥有想要的单词后,执行这个步骤。
3. 在你转换文本后,你可以按键盘上的 **F2** 来激活 **节点编辑器** 工具,当选择使用这个工具时,可以清楚地显示文本的节点。
![选中的文本使用节点编辑器][11]
4. 取消文本分组。
5. 调整每个字母,以便使其与相邻字母或基板稍微重叠。
![重叠文本][12]
6. 为将所有的字母彼此连接并连接到基板,重新选择所有文本和基板,然后选择 **路径 > 并集**
![使用 路径 > 并集 连接字母和基板][13]
### 准备打印
下面是手工切割灯笼的说明。如果使用激光切割机或工艺切割机,遵循硬件所需要的技巧来准备好你的文件。
1. 在 **图层** 面板中,单击 **安全** 图层旁边的**眼睛** 图标来隐藏安全线。如果你看不到图层面板,通过顶部菜单选择 **图层 > 图层** 来显示它。
2. 选择黑色基板。在 **填充和笔划** 面板中,设置填充为 **X** (意味着 _不填充_),设置 **笔划** 为纯黑色(对于巫法的粉丝来说是 #000000ff )。
![设置填充和笔划][14]
3. 使用 **文件 > 打印** 来打印你的图案样本。
4. 使用一把工艺刀和直尺,小心地绕着每一条黑线切割。在蓝色虚线上轻划,然后折叠。
![裁剪灯笼][15]
5. 为完成窗户的制作,剪切摹图纸到每个窗户的大小,然后粘贴它到灯笼的内侧。
![添加摹图纸][16]
6. 在折条处把灯笼的粘在一起。
7. 接通电池供电的 LED 蜡烛,并放置它到你灯笼中。
![完成灯笼][17]
现在你的灯笼已经完成并准备好照亮你的诡异的装饰品。万圣节快乐!
如何使用 InkscapeGIMP 制作万圣节瓶子标签和家用物品。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/10/how-make-halloween-lantern-inkscape
作者:[Jess Weichler][a]
选题:[lujun9972][b]
译者:[robsean](https://github.com/robsean)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/cyanide-cupcake
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/halloween_bag_bat_diy.jpg?itok=24M0lX25 (Halloween - backlit bat flying)
[2]: https://opensource.com/article/18/1/inkscape-absolute-beginners
[3]: http://inkscape.org
[4]: https://www.dropbox.com/s/75qzjilg5ak2oj1/papercraft_lantern_A4_template.svg?dl=0
[5]: https://www.dropbox.com/s/8fswdge49jwx91n/papercraft_lantern_letter_template%20.svg?dl=0
[6]: https://opensource.com/sites/default/files/uploads/lanterntemplate_screen.png (Lantern template screen)
[7]: https://opensource.com/sites/default/files/uploads/lantern1.png (Object to path menu)
[8]: https://opensource.com/sites/default/files/uploads/lantern2.png (Object > Difference menu)
[9]: https://opensource.com/sites/default/files/uploads/lantern3.png (Object to path menu)
[10]: https://opensource.com/sites/default/files/uploads/lantern4.png (Text tool)
[11]: https://opensource.com/sites/default/files/uploads/lantern5.png (Text selected with Node editor)
[12]: https://opensource.com/sites/default/files/uploads/lantern6.png (Overlapping the text)
[13]: https://opensource.com/sites/default/files/uploads/lantern7.png (Connecting letters and base with Path > Union)
[14]: https://opensource.com/sites/default/files/uploads/lantern8.png (Setting fill and stroke)
[15]: https://opensource.com/sites/default/files/uploads/lantern9.jpg (Cutting out the lantern)
[16]: https://opensource.com/sites/default/files/uploads/lantern10.jpg (Adding tracing paper)
[17]: https://opensource.com/sites/default/files/uploads/lantern11.jpg (Completed lantern)

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (lxbwolf)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
@ -7,155 +7,136 @@
[#]: via: (https://opensource.com/article/20/2/git-great-teeming-workspaces)
[#]: author: (Daniel Gryniewicz https://opensource.com/users/dang)
Manage complex Git workspaces with Great Teeming Workspaces
使用 Great Teeming Workspaces 管理复杂的 Git 工作空间
======
GTWS is a set of scripts that make it easy to have development
environments for different projects and different versions of a project.
GTWS 是一系列脚本,这些脚本能让我们在开发环境中管理一个有不同项目和不同版本的工程时变得更简单。
![Coding on a computer][1]
Great Teeming Workspaces ([GTWS][2]) is a complex workspace management package for Git that makes it easy to have development environments for different projects and different versions of a project.
[GTWS][2] 是一个 Git 的复杂工作空间管理工具包,可以让我们在开发环境中管理一个有不同项目和不同版本的工程时变得更简单。
Somewhat like Python [venv][3], but for languages other than Python, GTWS handles workspaces for multiple versions of multiple projects. You can create, update, enter, and leave workspaces easily, and each project or version combination has (at most) one local origin that syncs to and from the upstream—all other workspaces update from the local origin.
### Layout
有点像 Python 的 [venv][3],但不是为 Python 语言准备的。GTWS 用来处理多项目的多个版本的工作空间。你可以很容易地创建、更新、进入和离开工作空间,每个项目或版本的组合(最多)有一个本地的 origin用来与 upstream 同步 — 其余的所有工作空间都从本地的 origin 更新。
### 部署
```
${GTWS_ORIGIN}/&lt;project&gt;/&lt;repo&gt;[/&lt;version&gt;]
${GTWS_BASE_SRCDIR}/&lt;project&gt;/&lt;version&gt;/&lt;workspacename&gt;/{&lt;repo&gt;[,&lt;repo&gt;...]}
```
Each level in the source tree (plus the homedir for globals) can contain a **.gtwsrc** file that maintains settings and Bash code relevant to that level. Each more specific level overrides the higher levels.
源目录的每一级(包括全局的 home 目录)可以包含一个 **.gtwsrc** 文件,这个文件中维护与当前级相关的设置和 bash 代码。每一级的配置会覆盖上一级。
### Setup
Check out GTWS with:
### 安装
用下面的命令检出 GTWS
```
`git clone https://github.com/dang/gtws.git`
```
Set up your **${HOME}/.gtwsrc**. It should include **GTWS_ORIGIN** and optionally **GTWS_SETPROMPT**.
Add the repo directory to your path:
配置你的 **${HOME}/.gtwsrc**。它应该包含 **GTWS_ORIGIN**,也可以再包含 **GTWS_SETPROMPT**
把仓库目录加到环境变量中:
```
`export PATH="${PATH}:/path/to/gtws`
```
### Configuration
### 配置
Configuration is via cascading **.gtwsrc** files. It walks the real path down from the root, and each **.gtwsrc** file it finds is sourced in turn. More specific files override less specific files.
通过级联 **.gtwsrc** 文件来进行配置。它从根目录向下遍历,会执行在每级目录中找到的 **.gtwsrc** 文件。下级目录的文件会覆盖上一级。
Set the following in your top-level **~/.gtws/.gtwsrc**:
在你最上层的文件 **~/.gtws/.gtwsrc** 中进行如下设置:
* **GTWS_BASE_SRCDIR:** This is the base of all the projects' source trees. It defaults to **$HOME/src**.
* **GTWS_ORIGIN:** This sets the location of the origin Git trees. It defaults to **$HOME/origin**.
* **GTWS_SETPROMPT:** This is optional. If it's set, the shell prompt will have the workspace name in it.
* **GTWS_DEFAULT_PROJECT:** This is the project used when no project is given or known. If it is not given, projects must be specified on the command line.
* **GTWS_DEFAULT_PROJECT_VERSION:** This is the default version to check out. It defaults to **master**.
* **GTWS_BASE_SRCDIR:** 所有项目源文件目录树的 base。默认为 **$HOME/src**。
* **GTWS_ORIGIN:** 指定 origin git 目录树的路径。默认为 **$HOME/origin**。
* **GTWS_SETPROMPT:** 可选配置。如果配置了这个参数shell 提示符会有工作空间的名字。
* **GTWS_DEFAULT_PROJECT:** 不指定项目或项目未知时默认的项目名。如果不指定,使用命令行时必须指明项目。
* **GTWS_DEFAULT_PROJECT_VERSION:** 检出的默认版本。默认为 **master**
在每个项目的根目录进行以下设置:
* **GTWS_PROJECT:** 项目的名字(和 base 目录)。
* **gtws_project_clone:** 这个函数用于克隆一个项目的指定版本。如果未定义,它会假定项目的 origin 对每一个版本都有一个单独的目录,这样会导致克隆一堆 Git 仓库。
* **gtws_project_setup:** 在克隆完所有的仓库后,可以选择是否调用这个函数,调用后可以对项目进行必要的配置,如在 IDE 中配置工作空间。
Set the following at the project level of each project:
在项目版本级进行以下设置:
* **GTWS_PROJECT:** The name (and base directory) of the project.
* **gtws_project_clone:** This function is used to clone a specific version of a project. If it is not defined, then it is assumed that the origin for the project contains a single directory per version, and that contains a set of Git repos to clone.
* **gtws_project_setup:** This optional function is called after all cloning is done and allows any additional setup necessary for the project, such as setting up workspaces in an IDE.
* **GTWS_PROJECT_VERSION:** 项目的版本。用于正确地从 origin 拉取代码。类似 Git 中的分支名字。
下面这些参数可以在目录树的任意地方进行配置,如果能生效,它们可以被重写多次:
* **GTWS_PATH_EXTRA:** 这些是工作空间中加到路径后的额外的路径元素。
* **GTWS_FILES_EXTRA:** 这些是不在版本控制内,但应该在工作空间中被检出的额外的文件。这些文件包括 **.git/info/exclude**,每个文件都与仓库的 base 相关联。
Set this at the project version level:
### origin 目录
* **GTWS_PROJECT_VERSION:** This is the version of the project. It's used to pull from the origin correctly. In Git, this is likely the branch name.
**GTWS_ORIGIN** (大部分脚本中)指向拉取和推送的原始 Git 检出目录。
These things can go anywhere in the tree and can be overridden multiple times, if it makes sense:
* **GTWS_PATH_EXTRA:** These are extra path elements to be added to the path inside the workspace.
* **GTWS_FILES_EXTRA:** These are extra files not under version control that should be copied into each checkout in the workspace. This includes things like **.git/info/exclude**, and each file is relative to the base of its repo.
### Origin directories
**GTWS_ORIGIN** (in most scripts) points to the pristine Git checkouts to pull from and push to.
Layout of **${GTWS_ORIGIN}**:
**${GTWS_ORIGIN}** 部署:
* **/&lt;project&gt;**
* This is the base for repos for a project.
* If **gtws_project_clone** is given, this can have any layout you desire.
* If **gtws_project_clone** is not given, this must contain a single subdirectory named **git** that contains a set of bare Git repos to clone.
* 这是一个项目的仓库 base。
* 如果指定了 **gtws_project_clone**,你可以配置任意的部署路径。
* 如果没有指定 **gtws_project_clone**,这个路径下必须有个名为 **git** 的子目录,且 **git** 目录下有一系列用来克隆的裸 Git 仓库。
### 工作流示例
假设你有一个项目名为 **Foo**,它的 upstream 为 **github.com/foo/foo.git**。这个仓库有个名为 **bar** 的子模块,它的 upstream 是 **github.com/bar/bar.git**。Foo 项目在 master 分支开发,使用稳定版本的分支。
### Workflow example
为了能在 Foo 中使用 GTWS你首先要配置目录结构。本例中假设你使用默认的目录结构。
Suppose you have a project named **Foo** that has an upstream repository at **github.com/foo/foo.git**. This repo has a submodule named **bar** with an upstream at **github.com/bar/bar.git**. The Foo project does development in the master branch and uses stable version branches.
Before you can use GTWS with Foo, first you must set up the directory structure. These examples assume you are using the default directory structure.
* Set up your top level **.gtwsrc**:
* 配置你最上层的 **.gtwsrc**
* **cp ${GTWS_LOC}/examples/gtwsrc.top ~/.gtwsrc**
* Edit **~/.gtwsrc** and change as necessary.
* Create top-level directories:
* 根据需要修改 **~/.gtwsrc**。
* 创建顶级目录:
* **mkdir -p ~/origin ~/src**
* Create and set up the project directory:
* 创建并配置项目目录:
* **mkdir -p ~/src/foo**
**cp ${GTWS_LOC}/examples/gtwsrc.project ~/src/foo/.gtwsrc**
* Edit **~/src/foo/.gtwsrc** and change as necessary.
* Create and set up the master version directory:
* 根据需要修改 **~/src/foo/.gtwsrc**。
* 创建并配置 master 版本目录:
* **mkdir -p ~/src/foo/master**
**cp ${GTWS_LOC}/examples/gtwsrc.version ~/src/foo/master/.gtwsrc**
* Edit **~/src/foo/master/.gtwsrc** and change as necessary.
* Go to the version directory and create a temporary workspace to set up the mirrors:
* 根据需要修改 **~/src/foo/master/.gtwsrc**。
* 进入版本目录并创建一个临时工作空间来配置镜像:
* **mkdir -p ~/src/foo/master/tmp**
**cd ~/src/foo/master/tmp
git clone --recurse-submodules git://github.com/foo/foo.git
cd foo
gtws-mirror -o ~/origin -p foo**
* This will create **~/origin/foo/git/foo.git** and **~/origin/foo/submodule/bar.git**.
* Future clones will clone from these origins rather than from upstream.
* This workspace can be deleted now.
gtws-mirror -o ~/origin -p foo**(译注:这个地方原文有误,不加 `-s` 参数会报错)
* 上面命令会创建 **~/origin/foo/git/foo.git** 和 **~/origin/foo/submodule/bar.git**。
* 以后的克隆操作会从这些 origin 而不是 upstream 克隆。
* 现在可以删除工作空间了。
到现在为止Foo 的 master 分支的工作可以结束了。假设你现在想修复一个 bug名为 **bug1234**。你可以脱离你当前的工作空间为修复这个 bug 单独创建一个工作空间,之后在新创建的工作空间中开发。
At this point, work can be done on the master branch of Foo. Suppose you want to fix a bug named **bug1234**. You can create a workspace for this work to keep it isolated from anything else you're working on, and then work within this workspace.
* Go to the version directory, and create a new workspace:
* 进入版本目录,创建一个新的工作空间:
* **cd ~/src/foo/master
mkws bug1234**
* This creates **bug1234/**, and inside it checks out Foo (and its submodule **bar**) and makes **build/foo** for building it.
* Enter the workspace. There are two ways to do this:
* 上面的命令创建了 **bug1234/**,在这个目录下检出了 Foo和它的子模块 **bar**),并创建了 **build/foo** 来构建它。
* 有两种方式进入工作空间:
* **cd ~/src/foo/master/bug1234
startws**
or
或者
**cd ~/src/foo/master/**
**startws bug1234**
* This starts a subshell within the bug1234 workspace. This shell has the GTWS environment plus any environment you set up in your stacked **.gtwsrc** files. It also adds the base of the workspace to your CD path, so you can **cd** into relative paths from that base.
* At this point, you can do work on bug1234, build it, test it, and commit your changes. When you're ready to push to upstream, do this: 
* 上面的命令在 bug1234 工作空间中开启了一个子 shell。这个 shell 有 GTWS 的环境和你在各级 **.gtwsrc** 文件中设置的环境。它也把你工作空间的 base 路径加入到了 CD因此你可以从 base 路径 **cd** 到相关的目录中。
* 现在你可以修复 bug1234了构建、测试、提交你的修改。当你可以把代码推送到 upstream 时,执行下面的命令:
**cd foo
wspush** 
* **wspush** will push the branch associated with your workspace—first to your local origin and then to the upstream.
* If upstream changes. you can sync your local checkout using: 
* **wspush** 会把代码推送到与你工作空间相关的分支 — 先推送到本地的 origin再推送到 upstream。
* 当 upstream 有修改时,你可以用下面的命令同步到本地:
**git sync**
* This envokes the **git-sync** script in GTWS, which will update your checkout from the local origin. To update the local origin, use: 
* 上面的命令调用了 GTWS 的 **git-sync** 脚本,会从本地 origin 更新代码。使用下面的命令来更新本地的 origin
**git sync -o** 
* This will update your local origin and submodules' mirrors, then use those to update your checkout. **git-sync** has other nice features.
* When you're done using the workspace, just exit the shell:
* 上面的命令会更新你本地的 origin 和子模块的镜像,然后用那些命令来更新你的检出仓库的代码。**git-sync** 也有一些其他的很好的工鞥。
* 当要结束工作空间中的工作时,直接退出 shell
**exit**
* You can re-enter the workspace at any time and have multiple shells in the same workspace at the same time.
* When you're done with a workspace, you can remove it using the **rmws** command or just remove its directory tree. 
* There is a script named **tmws** that enters a workspace within tmux, creating a set of windows/panes that are fairly specific to my workflow.  Feel free to modify it to suit your needs.
### The script
* 你可以在任何时间重复进入工作空间,也可以在同一时间在相同的工作空间中开多个 shell。
* 当你不需要某个工作空间时,你可以使用 **rmws** 来删除它,或者直接删除它的目录树。
* 还有一个脚本 **tmws** 使用 tmux 进入工作空间,能创建一系列的窗口/窗格,这完美契合我的工作流。你可以根据你自己的需求来修改它。
### 脚本内容
```
#!/bin/bash
@ -1157,7 +1138,7 @@ via: https://opensource.com/article/20/2/git-great-teeming-workspaces
作者:[Daniel Gryniewicz][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
译者:[lxbwolf](https://github.com/lxbwolf)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,343 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (Zioyi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (12 Linux Commands to Have Some Fun in the Terminal)
[#]: via: (https://itsfoss.com/funny-linux-commands/)
[#]: author: (Community https://itsfoss.com/author/itsfoss/)
12个有趣的Linux终端命令
======
_**你觉得Linux终端里只有无趣的工作吗那你一定不知道下面这些有趣的Linux命令吧。**_
Linux终端是用来完成复杂的工作的我们有很多有用的[linux命令奇技淫巧][1]来帮助你。
但是你知道你还可以用终端来做很多有趣的是吗如果你不知道没关系大多数Linux用户也都只把终端视为一个用来管理系统和执行任务的交互接口。
然而,如果你知道这里有些你可以在终端玩的[基于终端的游戏][2]和[ASCII码游戏][3],你一定会大吃一惊。
在这篇文章中,我将会探索一些有趣的、可笑的、荒谬的命令来让你可以在终端中找点乐子!
### 用这些命令在Linux终端中找点乐子
![][4]
你可能会觉得这些命令荒谬或没用,但是有一些还是可以被好好利用的。
我已经添加了Ubuntu/Debian的安装组件如果你使用基于Ubuntu的发行版请确保[启用通用仓库][5]因为大多数命令不在主仓库中。
如果你使用Arch、Fedora、SUSE、Solus或者其他非Ubuntu的发行版请使用你的发行版包管理工具去安装这些有趣的Linux命令。
#### 1\. 在终端开一辆火车
让我们坐上火车,来一场说走就走的旅行的,没错,就是字面意思!
sl命令可以让你在终端运行一辆火车。
![][6]
安装方法:
```
sudo apt install sl
```
完成后,你只要在终端输入下面的命令就可以开始
```
sl
```
很精彩,对吧?但等等,我们还没结束!你还可以让你的火车飞起来,只要加上参数-FMagic
```
sl -F
```
**这样会让火车长出翅膀飞出终端窗口!**
#### 2\. 给你的Linux终端加上矩阵效果
还记得科幻电影[黑客帝国][7]吗?掉落在终端的绿字变成一个矩阵符号。
你也可以在你的Linux电脑里有这样的矩阵数字雨你只需要安装**cmatric**然后在终端输入它就行。
![][8]
在Debian/Ubuntu Linux上安装cmatrix:
```
sudo apt install cmatrix
```
现在,你要做的就是输入下面的命令,在终端就会有矩阵屏幕了:
```
cmatrix
```
按住Ctrl+C来停止它黑客先生。
**推荐阅读:**
![][9]
#### [通过Telnet在Linux终端看星际大战][10]
在Linux终端看星际大战。
#### 3\. 让这里着火
拿好灭火器因为接下来你要在你的终端里点火了!
![][11]
想安装它,你要输入:
```
sudo apt install libaa-bin
```
完成后,你输入下面的命令,你的终端就会燃起一团火焰:
```
aafire
```
按住Ctril+C来停止它。
#### 4\. 幸运饼干命令
想知道你的运气怎样但身边没有幸运饼干?
别担心你只需在终端打出“fortune”然后按下回车。终端将会显示出一个你的幸运语就像你从幸运饼干里得到的一样。
![][12]
安装它:
```
sudo apt install fortune
```
完成后,只要在命令行打出下面的内容,你就会知道你的运气怎样:
```
fortune
```
这是一个你可以实际去使用的命令。你可以用它作为每日消息,这样在多用户环境下,每个用户登录后都会得到一个“幸运饼干”。
你也可以把它添加到bashrc文件这样当你登进终端你就会看到了。
#### 5\. 宠物爱好者?这是给你准备的
Oneko是一个有趣的命令可以把你的光标变成一只老鼠然后创造一只猫一旦你移动光标就会来追你。这不仅局限于终端。当猫追逐光标时你可以继续工作。
如果你家里有孩子这一定很有趣。
![][13]
用下面的命令安装Oneko
```
sudo apt install oneko
```
用下面的命令运行它:
```
oneko
```
如果你不喜欢猫,喜欢狗,输入:
```
oneko -dog
```
这里有很多种小宠物你可以用oneko -help获取信息。用Ctrl+C终止它。
#### 6\. 有个小兄弟在看着你
Xeyes是一个很小的GUI程序它可以绘制出一双眼睛一直盯着你它会不断跟随您的鼠标光标运行命令自己看看
![][14]
你可以用下面命令安装:
```
sudo apt install xeyes
```
然后这样用它:
```
xeyes
```
按住Ctrl+C终止它。
#### 7\. Let the terminal speak for you
#### 7\. 让终端帮你讲话
打开你的扬声器,你来试试这个命令,[eSpeak][15]是一个有趣的命令,它可以让你的终端说话。是的,你没听错。
先安装这个包:
```
sudo apt install espeak
```
接下来,你只需要输入在命令行中输入你想听到的话:
```
espeak "Type what your computer says"
```
无论你在双引号里面填什么,你的电脑都会复述出来!它就像[在Linux中的echo命令][16],但不是打印出来,而是说出来。
#### 8\. 卫生间(但它不能洗衣服)
这听起来有点奇怪是的。但是这只是一个命令用来将文本转换成大的ASCII字符。
![][17]
用这个命令安装toilet
```
sudo apt install toilet
```
完成后,你只需输入:
```
toilet sample text you want
```
我也不知道为啥这个小程序叫卫生间。
#### 9\. 那个牛说什么?
Cowsay是一个在终端中用ASCII字符展示出一头牛的命令。通过这个命令你可以控制牛说出你想说的话。
别纠结声音,它只展示文本(就是你看漫画书一样)。
![Cowsay Cowthink][18]
安装**cowsay**
```
sudo apt install cowsay
```
安装完成后,你只要输入:
```
cowsay "your text"
```
无论你在双引号里填什么你的牛都会说我看到一些系统管理员用它来展示每天的消息。你也可以这样你甚至可以把它和fortune命令结合。
#### 10\. Banner命令
banner命令与toilet命令相似但它限制最多只能打印10个字符。
![][19]
你可以这样安装banner命令
```
sudo apt install sysvbanner
```
然后这样运行:
```
banner "Welcome"
```
替换双引号里的内容,你将会得到你想要的展示内容。
#### 11\. Yes命令
![][20]
yes命令帮助你在循环中自动响应直到终止命令。这个命令将会一直打印相同的内容。如果你想快速生成大量垃圾文本那么此命令将像超级按钮一样工作。
你也可以使用它为命令提供“yes”如果提示。例如apt upgrade命令会要求你确认你可以像这样使用它
```
yes | sudo apt upgrade
```
你不需要安装任何包Yes命令已经存在了。
想要终止yes命令循环只需按住**CTRL+C**。
#### 12\. 得到一个新的身份
要生成一个随机的假身份吗我推荐你用rig命令。你在终端运行它就会生成一个假的身份。
![][21]
用这个命令安装rig
```
sudo apt install rig
```
只需像这样输入:
```
rig
```
它可能被用在脚本或者web应用中展示随机信息但我自己还没做过什么。
**结尾**
我希望你会喜欢这个有趣的Linux命令列表。你最喜欢哪个命令呢你还知道其他有趣的命令吗请在评论部分与我们分享。
![][22]
### Srimanta Koley
Srimanta是一位热情的作家、发行者、开源爱好者非常喜欢与技术相关的所有内容。他喜欢读书特别是90年的书
--------------------------------------------------------------------------------
via: https://itsfoss.com/funny-linux-commands/
作者:[Community][a]
选题:[lujun9972][b]
译者:[Zioyi](https://github.com/Zioyi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/itsfoss/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/linux-command-tricks/
[2]: https://itsfoss.com/best-command-line-games-linux/
[3]: https://itsfoss.com/best-ascii-games/
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/fun-linux-commands.png?ssl=1
[5]: https://itsfoss.com/ubuntu-repositories/
[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/sl-command.jpg?ssl=1
[7]: https://en.wikipedia.org/wiki/The_Matrix
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/matrix-screen-command.png?ssl=1
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-2.png?fit=732%2C462&ssl=1
[10]: https://itsfoss.com/star-wars-linux/
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/fire-command.png?ssl=1
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/fortune-command.jpg?ssl=1
[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/oneko-command.jpg?ssl=1
[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/xeyes-command.jpg?ssl=1
[15]: https://itsfoss.com/espeak-text-speech-linux/
[16]: https://linuxhandbook.com/echo-command/
[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/toilet-command.jpg?ssl=1
[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/cowsay-cowthink.jpg?ssl=1
[19]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/banner-command.jpg?ssl=1
[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/yes-yourtext.jpg?ssl=1
[21]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/rig-command.jpg?ssl=1
[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/srimanta.jpg?ssl=1

View File

@ -0,0 +1,192 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (4 Git scripts I can't live without)
[#]: via: (https://opensource.com/article/20/4/git-extras)
[#]: author: (Vince Power https://opensource.com/users/vincepower)
4 个不可或缺的 Git 脚本
======
> Git Extras 版本库包含了 60 多个脚本,它们是 Git 基本功能的补充。以下是如何安装、使用和贡献的方法。
![Person using a laptop][1]
2005 年,[Linus Torvalds][2] 创建了 [Git][3],以取代他之前用于维护 Linux 内核的专有的分布式源码控制管理解决方案。从那时起Git 已经成为开源和云原生开发团队的主流版本控制解决方案。
但即使是像 Git 这样功能丰富的应用程序,也没有人们想要或需要的每个功能,所以人们会花大力气去创建这些功能。就 Git 而言,这个人就是 [TJ Holowaychuk][4]。他的 [Git Extras][5] 项目承载了 60 多个“附加功能”,这些功能扩展了 Git 的基本功能。
### 使用 Git 附加功能
下面介绍一下如何使用四种最受欢迎的 Git 附加功能。
#### git-ignore
`git ignore` 是一个方便的附加功能,它可以让你手动添加文件类型和注释到 `.git-ignore` 文件中,而不需要打开文本编辑器。它可以操作你的个人用户帐户的全局忽略文件和单独用于你正在工作的版本库的忽略文件。
在没有参数的情况下执行 `git ignore` 会先列出全局忽略文件,然后是本地的忽略文件。
```
$ git ignore
Global gitignore: /home/alice/.gitignore
# Numerous always-ignore extensions
*.diff
*.err
*.orig
*.rej
*.swo
*.swp
*.vi
*~
*.sass-cache
# OS or Editor folders
Thumbs.db
---------------------------------
Local gitignore: .gitignore
nbproject
```
#### git-info
`git info` 可以检索你所需要的所有信息,以获取你正在使用的版本库的上下文信息。它包括远程 URL、远程分支、本地分支、配置信息和最后一次的提交信息。
```
$ git info
## Remote URLs:
origin git@github.com:sampleAuthor/git-extras.git (fetch)
origin git@github.com:sampleAuthor/git-extras.git (push)
## Remote Branches:
origin/HEAD -> origin/master
origin/myBranch
## Local Branches:
myBranch
* master
## Most Recent Commit:
commit e3952df2c172c6f3eb533d8d0b1a6c77250769a7
Author: Sample Author <sampleAuthor@gmail.com>
Added git-info command.
Type ´git log´ for more commits, or ´git show <commit id>´ for full commit details.
## Configuration (.git/config):
color.diff=auto
color.status=auto
color.branch=auto
user.name=Sample Author
user.email=sampleAuthor@gmail.com
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=git@github.com:mub/git-extras.git
branch.master.remote=origin
branch.master.merge=refs/heads/master
```
#### git-mr 和 git-pr
这些附加功能的作用类似,工作方式也基本相同。
* `git mr` 检出来自 GitLab 的合并请求。
* `git pr` 检出来自 GitHub 的拉取请求。
无论是哪种情况,你只需要合并请求号、拉取请求号或完整的 URL它就会抓取远程引用检出分支并调整配置这样 Git 就知道要替换哪个分支了。
```
$ git mr 51
From gitlab.com:owner/repository
* [new ref] refs/merge-requests/51/head -> mr/51
Switched to branch 'mr/51'
```
#### git-release
通过将 `commit`、`tag` 和 `push` 合并到一个命令中,`git release` 可以节省大量的按键来执行这三个命令,而这三个命令往往是依次运行的。
要用特定的 `<tagname>` 和自定义消息提交:
```
$ git release 0.1.0 -m <+ powerful feature added>
```
#### 其他附加功能
这只是该版本库中 60 多个 Git 附加功能中的四个命令。要访问 Git Extras 中的全部命令,请查看该源代码库中的 [Commands.md][8] 文件,或者在安装 Git Extras 后运行以下命令。
```
$ git extras --help
```
### 安装 Git 附加功能
使用 Git 附加功能的主要前提是安装了 Git 的命令行版本。如果你打算从源码中构建,还需要有额外的工具(例如:`make`)。
如果你使用的是最新版本的 macOS那么 Git 附加功能的安装最好使用 [Homebrew][9](和大多数开源工具一样)。
```
$ brew install git-extras
```
在 Linux 上,每个平台的原生包管理器中都有 Git Extras。有时你需要启用一个额外的仓库比如在 CentOS 上的 [EPEL][10],然后运行一条命令。
```
$ sudo yum install git-extras
```
其他 Linux 发行版、BSD 和其他平台的完整安装说明可以在该版本库的 [Installation.md][11] 文件中找到。
### 贡献
你是否你认为 Git 中有缺少的功能,并且已经构建了一个脚本来处理它?为什么不把它作为 Git Extras 发布版的一部分,与全世界分享呢?
要做到这一点,请将该功能贡献到 Git Extras 仓库中。更多具体细节请参见仓库中的 [CONTRIBUTING.md][12] 文件,但基本的操作方法很简单。
1. 创建一个处理该功能的 Bash 脚本。
2. 创建一个基本的 man 文件,让大家知道如何使用它。
3. 更新命令列表和补完脚本,让人们知道这个功能的存在。
4. 运行完整性检查,确保你没有破坏任何东西。
5. 为你的功能创建一个拉取请求。
向 Git Extras 贡献贡献,会让你的 Git 用户的生活更轻松一些。你可以在项目的 [README][13] 中了解更多。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/git-extras
作者:[Vince Power][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/vincepower
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop)
[2]: https://en.wikipedia.org/wiki/Linus_Torvalds
[3]: https://git-scm.com/
[4]: https://github.com/tj
[5]: https://github.com/tj/git-extras
[6]: mailto:git@github.com
[7]: mailto:sampleAuthor@gmail.com
[8]: https://github.com/tj/git-extras/blob/master/Commands.md
[9]: https://brew.sh/
[10]: https://fedoraproject.org/wiki/EPEL
[11]: https://github.com/tj/git-extras/blob/master/Installation.md
[12]: https://github.com/tj/git-extras/blob/master/CONTRIBUTING.md
[13]: https://github.com/tj/git-extras/blob/master/Readme.md

View File

@ -0,0 +1,91 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (MystiQ: A Free and Open Source Audio/Video Converter)
[#]: via: (https://itsfoss.com/mystiq/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
MystiQ一个免费开源音频/视频转换器
======
_**简述MystiQ 是可用于 Linux 和 Windows 的新开源视频转换器工具。它的底层使用 FFMPEG并为你提供基于 Qt 的整洁干净的图形界面。**_
### MystiQ一个基于 QT 的 FFmpeg GUI 前端
![][1]
一个音频/视频转换工具可为跨多个平台的每位计算机用户提供方便。
出于同样的原因,我着重介绍 [MystiQ][2] 是个好主意,这是一个相对较新的视频/音频转换器工具,可用于 Linux 和 Windows。截至目前它还不支持 macOS但可能会在不久的将来出现。
MystiQ 是基于 [Qt 5 界面][4]的 [FFmpeg][3] 图形前端。 现在,你可以随时[在 Linux 命令行中安装并使用 ffmpeg][5],但这不是很舒服,是吗? 这就是为什么 [Handbrake][6] 和 MystiQ 之类的工具可以使我们的生活更轻松的原因。
由于 MystiQ 基于 FFmpeg因此你可以将其用于一些基本的视频编辑例如修剪、旋转等。
让我们来看看它的功能。
### MystiQ 视频转换器的功能
![][7]
即使 MystiQ 目前还算是一个新事物,但它也包含了一组很好的基本功能。以下它提供的:
* 视频转换
* 音频转换(也可从视频中提取音频)
* 支持格式MP4、WEBM、MKV、MP3、MOV、OGG、WAV、ASF、FLV、3GP、M4A 等。
* 跨平台Windows 和 Linux
* 适用于 32 位和 64 位系统的安装包
* 能够调整音频质量(采样率、比特率等)进行转换
* **基本视频编辑功能**(剪辑视频、插入字幕、旋转视频、缩放视频等)
* 将彩色视频转换为黑白
* 可轻松转换视频的多个预设以获得最佳质量或获得最佳压缩效果。
#### [在 Linux 中使用 SoundConverter 轻松转换音频文件格式][9]
如果你想将音频文件格式转换为 wav、mp3、ogg 或任何其他格式SoundConverter 是你在 Linux 中所需的工具。
### 安装 MystiQ
你可能没有在软件中心中找到它,但将它安装在 Linux 发行版上非常容易。
它提供了 **.AppImage** 文件和 **.deb/.rpm** 文件32 位和 64 位软件包)。如果你好奇想使用的话,可以阅读[如何使用 AppImage 文件][10]。
如果你想帮助他们测试软件进行改进,你还可以找到他们的 [GitHub 页面][11],并查看源码或任何近期的预发布软件包。
你可以在其官方网站下载适用于 Linux 和 Windows 的安装程序文件。
[下载 MystiQ][2]
**总结**
在本文中,我使用 [Pop!\_OS][12] 20.04 测试了 MytiQ 转换器,并且在转换视频和音频时没遇到问题。而且,对于像我这样的普通用户来说,它的转换速度足够快。
请尝试一下,让我知道你对它的想法!另外,如果你在 Linux 上一直使用其他工具转换视频和音频,那它是什么?
--------------------------------------------------------------------------------
via: https://itsfoss.com/mystiq/
作者:[Ankush Das][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://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/mystiq-converter-ft.jpg?ssl=1
[2]: https://mystiqapp.com/
[3]: https://www.ffmpeg.org/
[4]: https://www.qt.io/
[5]: https://itsfoss.com/ffmpeg/
[6]: https://itsfoss.com/handbrake/
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/mystiq-options.jpg?ssl=1
[9]: https://itsfoss.com/sound-converter-linux/
[10]: https://itsfoss.com/use-appimage-linux/
[11]: https://github.com/swl-x/MystiQ/
[12]: https://system76.com/pop

View File

@ -0,0 +1,89 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Difference Between YUM and RPM Package Manager)
[#]: via: (https://www.2daygeek.com/comparison-difference-between-yum-vs-rpm/)
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
YUM 和 RPM 包管理器的不同之处
======
软件包管理器在 Linux 系统中扮演着重要的角色。它允许你安装、更新、查看、搜索和删除软件包,以满足你的需求。
每个发行版都有自己的一套包管理器,依据你的 Linux 发行版来分别使用它们。
RPM 是最古老的传统软件包管理器之一,它是为基于 Red Hat 的系统设计的,如 Red Hat Enterprise LinuxRHEL、CentOS、Fedora 和 openSUSE它基于 suse Enterprise Linux等系统。但在依赖解析和包更新全系统更新/升级方面RPM 包管理器有一个突出的限制。
> 如果你想知道 [YUM 和 DNF 包管理器的区别][1]请参考该文章。
这意味着 yum 可以自动下载并安装所有需要的依赖项,但 rpm 会告诉你安装一个依赖项列表,然后你必须手动安装。
当你想用 [rpm 命令][2] 安装一组包时,这实际上是不可能的,而且很费时间。
这时,[YUM 包管理器][3] 就派上了用场,解决了这两个问题。
### 什么是 RPM
RPM 指的是 RPM Package Manager原名 Red Hat Package Manager是一个功能强大的命令行包管理工具是为 Red Hat 操作系统开发的。
它现在被用作许多 Linux 发行版的核心组件,如 Centos、Fedora、Oracle Linux、openSUSE 和 Mageia 等。
RPM 软件包管理器允许你在基于 RPM 的 Linux 系统上安装、升级、删除、查询和验证软件包。
RPM 文件的扩展名为 `.rpm`。RPM 包由一个存档文件组成,其中包含了一个特定包的库和依赖关系,这些库和依赖关系与系统上安装的其他包不冲突。
在 Linux 上有很多前端工具可以用来安装 RPM 包,与 RPM 工具相比,这些工具可以使安装过程更加高效,尤其是在处理依赖关系方面。
如果你想了解更多关于 Linux 发行版的前端包管理器的信息,请到下面的链接。
* [Linux 命令行包管理器列表][4]
如果你想了解 Linux 的 GUI 包管理器,请到下面的链接。
* [Linux GUI 包管理器列表][5]
### 什么是 YUM
Yum 是一个 Linux 操作系统上的自由开源的命令行包管理程序,它使用 RPM 包管理器。Yum 是一个 RPM 的前端工具,可以自动解决软件包的依赖关系。它可以从发行版官方仓库和其他第三方仓库中安装 RPM 软件包。
Yum 允许你在系统中安装、更新、搜索和删除软件包。如果你想让你的系统保持更新,你可以通过 yum-cron 启用自动更新。
此外,如果你需要的话,它还允许你在 `yum update` 中排除一个或多个软件包。
Yum 是默认安装的,你不需要安装它。
编号 | RPM | YUM
--- | --- | ---
1 | 红帽在 1997 年引入了 RPM | Yellowdog UPdaterYUP开发于 1999-2001 年YUM 于 2003 年取代了原来的 YUP 工具
2 | RPM 代表 RPM Package manager原名 Red Hat package manager | YUM 代表 Yellowdog Updater Modified
3 | RPM 文件的命名规则如下,`httpd-2.4.6-92.el7.x86_64.rpm``httpd` - 实际的包名;`2.4.6` - 包发布版本号;`92` - 包发布子版本号;`el7` - Red Hat 版本;`x86_64` - 硬件架构;`rpm` - 文件扩展名 | 后台使用 rpm 数据库
4 | 不解析依赖关系,你必须手动安装依赖 | 可以自动解析依赖关系并同时安装它们(任何包都会和它的依赖关系一起安装)
5 | 允许你同时安装多个版本的软件包 | 不允许,并显示该软件包已经安装
6 | 当使用 RPM 命令安装一个软件包时,你必须提供 `.rpm` 软件包的确切位置 | 你可以安装仓库中的任何软件包,而你只需要知道软件包的名称就可以了
7 | RPM 不依赖于 YUM | 它是一个前端工具,在后台使用 RPM 包管理器来管理包
8 | RPM 在安装包的管理方面比较难 | YUM 是最简单的管理 RPM 包的方法
9 | RPM 不能让你将整个系统升级到最新的版本 | YUM 可以让你将系统升级到最新的版本(例如 7.0 到 7.x 的小版本升级)
10 | RPM 不能让你自动更新/升级安装在系统上的软件包 | YUM 可以让你自动更新/升级系统上的更新
11 | 不使用在线仓库来执行任何操作 | 完全依赖在线仓库来完成所有的工作
12 | RPM 是一种包格式,它也是一个底层的包管理器,只做基本的事情 | 这是一个上层的包管理器前端,它可以完成你所需要的一切工作
--------------------------------------------------------------------------------
via: https://www.2daygeek.com/comparison-difference-between-yum-vs-rpm/
作者:[Magesh Maruthamuthu][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[校对者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/comparison-difference-between-dnf-vs-yum/
[2]: https://www.2daygeek.com/linux-rpm-command-examples-manage-packages-fedora-centos-rhel-systems/
[3]: https://www.2daygeek.com/linux-yum-command-examples-manage-packages-rhel-centos-systems/
[4]: https://www.2daygeek.com/list-of-command-line-package-manager-for-linux/
[5]: https://www.2daygeek.com/list-of-graphical-frontend-tool-for-linux-package-manager/