mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-25 23:11:02 +08:00
commit
1b221afeda
@ -0,0 +1,105 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12173-1.html)
|
||||
[#]: subject: (Create Stunning Pixel Art With Free and Open Source Editor Pixelorama)
|
||||
[#]: via: (https://itsfoss.com/pixelorama/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
使用 Pixelorama 创建令人惊叹的像素艺术
|
||||
======
|
||||
|
||||
> Pixelorama 是一个跨平台、自由开源的 2D 精灵编辑器。它在一个整洁的用户界面中提供了创建像素艺术所有必要工具。
|
||||
|
||||
### Pixelorama:开源 Sprite 编辑器
|
||||
|
||||
[Pixelorama][1] 是 [Orama 互动][2]公司的年轻游戏开发人员创建的一个工具。他们已经开发了一些 2D 游戏,其中一些使用了像素艺术。
|
||||
|
||||
虽然 Orama 主要从事于游戏开发,但开发人员也创建实用工具,帮助他们(和其他人)创建这些游戏。
|
||||
|
||||
自由开源的<ruby>精灵<rt>Sprite</rt></ruby>编辑器 Pixelorama 就是这样一个实用工具。它构建在 [Godot 引擎][3]之上,非常适合创作像素艺术。
|
||||
|
||||
![Pixelorama screenshot][4]
|
||||
|
||||
你看到上面截图中的像素艺术了吗?它是使用 Pixelorama 创建的。这段视频展示了制作上述图片的时间推移视频。
|
||||
|
||||
### Pixelorama 的功能
|
||||
|
||||
以下是 Pixelorama 提供的主要功能:
|
||||
|
||||
* 多种工具,如铅笔、橡皮擦、填充桶、取色器等
|
||||
* 多层系统,你可以根据需要添加、删除、上下移动、克隆和合并多个层
|
||||
* 支持 Spritesheets
|
||||
* 导入图像并在 Pixelorama 中编辑它们
|
||||
* 带有 [Onion Skinning][5] 的动画时间线
|
||||
* 自定义画笔
|
||||
* 以 Pixelorama 的自定义文件格式 .pxo 保存并打开你的项目
|
||||
* 水平和垂直镜像绘图
|
||||
* 用于创建图样的磁贴模式
|
||||
* 拆分屏幕模式和迷你画布预览
|
||||
* 使用鼠标滚轮缩放
|
||||
* 无限次撤消和重做
|
||||
* 缩放、裁剪、翻转、旋转、颜色反转和去饱和图像
|
||||
* 键盘快捷键
|
||||
* 提供多种语言
|
||||
* 支持 Linux、Windows 和 macOS
|
||||
|
||||
### 在 Linux 上安装 Pixelorama
|
||||
|
||||
Pixelorama 提供 Snap 应用,如果你使用的是 Ubuntu,那么可以在软件中心找到它。
|
||||
|
||||
![Pixelorama is available in Ubuntu Software Center][6]
|
||||
|
||||
或者,如果你在 [Linux 发行版上启用了 Snap 支持][7],那么可以使用此命令安装它:
|
||||
|
||||
```
|
||||
sudo snap install pixelorama
|
||||
```
|
||||
|
||||
如果你不想使用 Snap,不用担心。你可以从[他们的 GitHub 仓库][8]下载最新版本的 Pixelorama,[解压 zip 文件][9],你会看到一个可执行文件。授予此文件执行权限,并双击它运行应用。
|
||||
|
||||
- [下载 Pixelorama][10]
|
||||
|
||||
### 总结
|
||||
|
||||
![Pixelorama Welcome Screen][11]
|
||||
|
||||
在 Pixeloaram 的功能中,它说你可以导入图像并对其进行编辑。我想,这只是对某些类型的文件,因为当我尝试导入 PNG 或 JPEG 文件,程序崩溃了。
|
||||
|
||||
然而,我可以像一个 3 岁的孩子那样随意涂鸦并制作像素艺术。我对艺术不是很感兴趣,但我认为这[对 Linux 上的数字艺术家是个有用的工具][12]。
|
||||
|
||||
我喜欢这样的想法:尽管是游戏开发人员,但他们创建的工具,可以帮助其他游戏开发人员和艺术家。这就是开源的精神。
|
||||
|
||||
如果你喜欢这个项目,并且会使用它,请考虑通过捐赠来支持他们。[It’s FOSS 捐赠了][13] 25 美元,以感谢他们的努力。
|
||||
|
||||
- [向 Pixelorama 捐赠(主要开发者的个人 Paypal 账户)][14]
|
||||
|
||||
你喜欢 Pixelorama 吗?你是否使用其他开源精灵编辑器?请随时在评论栏分享你的观点。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
via: https://itsfoss.com/pixelorama/
|
||||
|
||||
作者:[Abhishek Prakash][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://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.orama-interactive.com/pixelorama
|
||||
[2]: https://www.orama-interactive.com/
|
||||
[3]: https://godotengine.org/
|
||||
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/pixelorama-v6.jpg?ssl=1
|
||||
[5]: https://en.wikipedia.org/wiki/Onion_skinning
|
||||
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/pixelorama-ubuntu-software-center.jpg?ssl=1
|
||||
[7]: https://itsfoss.com/install-snap-linux/
|
||||
[8]: https://github.com/Orama-Interactive/Pixelorama
|
||||
[9]: https://itsfoss.com/unzip-linux/
|
||||
[10]: https://github.com/Orama-Interactive/Pixelorama/releases
|
||||
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/pixelorama.jpg?ssl=1
|
||||
[12]: https://itsfoss.com/best-linux-graphic-design-software/
|
||||
[13]: https://itsfoss.com/donations-foss/
|
||||
[14]: https://www.paypal.me/erevos
|
@ -0,0 +1,96 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12171-1.html)
|
||||
[#]: subject: (Rambox is an All-in-one Messenger for Linux)
|
||||
[#]: via: (https://itsfoss.com/rambox/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
Rambox:Linux 中多合一的消息收发工具
|
||||
======
|
||||
|
||||
> Rambox 是一个多合一消息收发工具,允许你将多种服务(如 Discord、Slack、Facebook Messenger)和数百个此类服务结合在一起。
|
||||
|
||||
### Rambox:在单个应用中添加多个消息服务
|
||||
|
||||
![][1]
|
||||
|
||||
Rambox 是通过安装单个应用管理多个通信服务的最佳方式之一。你可以在一个界面使用[多个消息服务][2],如 Facebook Messenger、Gmail chats、AOL、Discord、Google Duo、[Viber][3] 等。
|
||||
|
||||
这样,你就不需要安装单独的应用或者在浏览器中一直打开着。你可以使用主密码锁定 Rambox 应用。你还可以使用“请勿打扰”功能。
|
||||
|
||||
Rambox 提供可免费使用的[开源社区版][4]。付费专业版允许你访问 600 多个应用,而社区版则包含 99 多个应用。专业版本具有额外的功能,如主题、休眠、ad-block、拼写检查和高级支持。
|
||||
|
||||
不用担心。开源社区版本身非常有用,你甚至不需要这些专业功能。
|
||||
|
||||
### Rambox 的功能
|
||||
|
||||
![][5]
|
||||
|
||||
虽然你应该在开源版中找到大多数基本功能,但你可能会注意到其中一些功能仅限于专业版。
|
||||
|
||||
此处,我说下所有的基本功能:
|
||||
|
||||
* 在开源版本中,你有大约 100 个应用/服务可供选择
|
||||
* 能够使用单个主密码锁保护应用
|
||||
* 能够锁定加载的每个会话
|
||||
* 请勿打扰模式
|
||||
* 能够跨多个设备同步应用和配置
|
||||
* 你可以创建和添加自定义应用
|
||||
* 支持键盘快捷键
|
||||
* 启用/禁用应用而无需删除它们
|
||||
* JS 和 CSS 注入支持,以调整应用的样式
|
||||
* Ad-block (**专业版**)
|
||||
* 休眠支持 (**专业版**)
|
||||
* 主题支持(**专业版**)
|
||||
* 移动设备视图 (**专业版**)
|
||||
* 拼写检查 (**专业版**)
|
||||
* 工作时间 - 计划传入通知的时间 (**专业版**)
|
||||
* 支持代理 (**专业版**)
|
||||
|
||||
除了我在这里列出的内容外,你还可以在 Rambox Pro 版本中找到更多功能。要了解有关它的更多信息,你可以参考[正式功能列表][6]。
|
||||
|
||||
还值得注意的是,你不能超过 3 个活跃并发设备的连接。
|
||||
|
||||
### 在 Linux 上安装 Rambox
|
||||
|
||||
你可以在[官方下载页][4]获取 .AppImage 文件来运行 Rambox。如果你不清楚,你可以参考我们的指南,了解如何[在 Linux 上使用 AppImage 文件][7]。
|
||||
|
||||
另外,你也可以从 [Snap 商店][8]获取它。此外,请查看其 [GitHub release][9] 部分的 .deb / .rpm 或其他包。
|
||||
|
||||
- [下载 Rambox 社区版][4]
|
||||
|
||||
### 总结
|
||||
|
||||
使用 Rambox 安装大量应用可能会有点让人不知所措。因此,我建议你在添加更多应用并将其用于工作时监视内存使用情况。
|
||||
|
||||
还有一个类似的应用称为 [Franz][10],它也像 Rambox 部分开源、部分高级版。
|
||||
|
||||
尽管像 Rambox 或 Franz 这样的解决方案非常有用,但它们并不总是节约资源,特别是如果你同时使用数十个服务。因此,请留意系统资源(如果你注意到对性能的影响)。
|
||||
|
||||
除此之外,这是一个令人印象深刻的应用。你有试过了么?欢迎随时让我知道你的想法!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/rambox/
|
||||
|
||||
作者:[Ankush Das][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://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/rambox-ce.jpg?ssl=1
|
||||
[2]: https://itsfoss.com/best-messaging-apps-linux/
|
||||
[3]: https://itsfoss.com/viber-linux-client-beta-install/
|
||||
[4]: https://rambox.pro/#ce
|
||||
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/rambox-preferences.png?ssl=1
|
||||
[6]: https://rambox.pro/#features
|
||||
[7]: https://itsfoss.com/use-appimage-linux/
|
||||
[8]: https://snapcraft.io/rambox
|
||||
[9]: https://github.com/ramboxapp/community-edition/releases
|
||||
[10]: https://itsfoss.com/franz-messaging-app/
|
@ -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 中的重要数据、配置文件和其他重要的东西。
|
||||
|
||||
#### 方法 1 - 使用 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 脚本构成的合集,用于编译并且可以选择性地为 Debian(LCTT 译注: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]浏览所有计划的细节信息。
|
||||
|
||||
**优势:** 简单。半自动化。无需重启。支持三个免费系统。
|
||||
|
||||
**缺点:** 4 个以上主机的话非常昂贵。没有补丁回滚。
|
||||
|
||||
##### 开启 Canonical 实时补丁
|
||||
|
||||
如果你想在安装后设置实时补丁服务,依照以下方法逐步执行:
|
||||
|
||||
从 [https://auth.livepatch.canonical.com/][8] 获取一个密钥。
|
||||
|
||||
```
|
||||
$ sudo snap install canonical-livepatch
|
||||
$ sudo canonical-livepatch enable your-key
|
||||
```
|
||||
|
||||
#### 方法 7 - 使用 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
|
142
published/202004/20190116 Best Audio Editors For Linux.md
Normal file
142
published/202004/20190116 Best Audio Editors For Linux.md
Normal file
@ -0,0 +1,142 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (MFGJT)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12095-1.html)
|
||||
[#]: subject: (Best Audio Editors For Linux)
|
||||
[#]: via: (https://itsfoss.com/best-audio-editors-linux)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
Linux 上的最佳音频编辑工具推荐
|
||||
======
|
||||
|
||||
在 Linux 上,有很多种音频编辑器可供你选用。不论你是一个专业的音乐制作人,还是只想学学怎么做出超棒的音乐的爱好者,这些强大的音频编辑器都是很有用的工具。
|
||||
|
||||
对于专业级的使用,我总是建议使用 [DAW][1](数码音频工作站)。但并不是每个人都需要全部的功能,所以你也应该了解一些最简单的音频编辑器。
|
||||
|
||||
在本文中,我们将讨论几款 DAW 和基础的音频编辑器,而且它们都是在 Linux 和(可能)其它操作系统上可以使用的**自由开源**的解决方案。
|
||||
|
||||
### Linux 上的最佳音频编辑器
|
||||
|
||||
![Best audio editors and DAW for Linux][2]
|
||||
|
||||
我们不会关注 DAW 提供的所有功能,而只是关注基本的音频编辑功能。不过,你仍然可以把以下内容看作是 Linux 的最佳 DAW 名单。
|
||||
|
||||
**安装说明:**你可以在 AppCenter 或软件中心中找到所有提到的音频编辑器或 DAW。如果你在这两个地方没有找到它们,请前往它们的官方网站获取更多信息。
|
||||
|
||||
#### 1、Audacity
|
||||
|
||||
![Audacity audio editor][3]
|
||||
|
||||
[Audacity](https://www.audacityteam.org/) 是 Linux 中最基本音频编辑器之一,但是它也很强大。它是一个自由开源的跨平台工具。肯定已经有很多人了解这个软件了。
|
||||
|
||||
现在的它相比它最初流行的时候有了很大的改进。我记得我以前试着通过从音频中去除人声来制作卡拉 OK 伴奏。现在有些时候,你仍然可以这么做。
|
||||
|
||||
**特性:**
|
||||
|
||||
它还支持包含 VST 效果的插件。当然,你不应该期望它支持 VST 乐器。
|
||||
|
||||
* 通过麦克风或混音器进行现场录制
|
||||
* 支持同时从多种音频格式的多个文件中批量导出/导入内容
|
||||
* 支持 LADSPA、LV2、Nyquist、VST 和 Audio Unit 的效果插件
|
||||
* 使用简单,带有剪切、粘贴、删除和拷贝的功能
|
||||
* 可观测声音频率的频谱模式
|
||||
|
||||
#### 2、LMMS
|
||||
|
||||
![LMMS audio editor][4]
|
||||
|
||||
[LMMS](https://lmms.io/) 是一个自由开源的(跨平台)数码音频工作站。它包括所有基本的音频编辑功能以及许多高级功能。
|
||||
|
||||
你可以混音、组合音频,或使用 VST 设备创造音频。LMMS 支持这些功能。此外,它还自带一些样本音频、预设、VST 设备和特效来帮助你起步。此外,你还可以得到一个频谱分析仪,以便进行高级的音频编辑工作。
|
||||
|
||||
**特性:**
|
||||
|
||||
* 基于 MIDI 的音符回放
|
||||
* 支持 VST 设备
|
||||
* 原生支持多采样
|
||||
* 内置压缩器、限制器、延迟功能、混响功能、失真功能和低音增强器
|
||||
|
||||
#### 3、Ardour
|
||||
|
||||
![Ardour audio editor][5]
|
||||
|
||||
[Ardour](https://ardour.org/) 是另一个自由开源的数码音频工作站。只要你有音频接口,Ardour 就支持它的使用。当然,你也可以无限地添加多声道音轨。这些多声道音轨也可以被指派到不同的混音带,以方便编辑和录音。
|
||||
|
||||
你也可以导入一个视频,编辑其中的音频,然后导出新的视频。它提供了许多内置插件,并且支持 VST 插件。
|
||||
|
||||
**特性:**
|
||||
|
||||
* 非线性编辑
|
||||
* 垂直窗口堆叠,便于导航
|
||||
* <ruby>静默消除功能<rt>strip silence</rt></ruby>,<ruby>推拉修剪功能<rt>push-pull trimming</rt></ruby>,和用以短暂片段或基于基于音符开始的编辑的 Rhythm Ferret。
|
||||
|
||||
#### 4、Cecilia
|
||||
|
||||
![Cecilia audio editor][6]
|
||||
|
||||
[Cecilia](http://ajaxsoundstudio.com/software/cecilia/) 不是一个普通的音频编辑器。它的使用者一般是音效设计师或者正在努力成为音效设计师的人。 Cecilia 实际上是一个音频信号处理环境。它可以让你的作品余音绕梁。
|
||||
|
||||
你还可以得到内置的音效与合成模组和插件。Cecilia 为一个明确的目的而生:如果你正在找音效设计工具,这是你的不二之选!
|
||||
|
||||
**特性:**
|
||||
|
||||
* 利用模块来完成更多工作(UltimateGrainer —— 最先进的颗粒化处理工具,RandomAccumulator —— 记录变量速度的累加器,UpDistoRes——通过上采样和谐振低通滤波器创造失真效果的工具)
|
||||
* 自动保存调制设定
|
||||
|
||||
#### 5、Mixxx
|
||||
|
||||
![Mixxx audio DJ][7]
|
||||
|
||||
如果你想要在混合和录制一些东西的同时能够有一个虚拟的 DJ 工具,[Mixxx](https://www.mixxx.org/) 将是完美的工具。你可以用到 BPM、音调,并使用主同步功能来匹配歌曲的节奏和节拍。另外,不要忘记它也是一个 Linux 的自由开源的软件。
|
||||
|
||||
它还支持自定义 DJ 设备。所以,如果你有 DJ 设备或者 MIDI,你可以用这个工具录制你的现场混音。
|
||||
|
||||
**特性:**
|
||||
|
||||
* 播送和录制你的歌曲的 DJ 混音
|
||||
* 可以连接到你的设备并且现场演奏
|
||||
* 音调检测和 BPM 检测
|
||||
|
||||
#### 6、Rosegarden
|
||||
|
||||
![Rosegarden audio editor][9]
|
||||
|
||||
[Rosegarden](https://www.rosegardenmusic.com/) 是另一个令人赞叹的 Linux 的自由开源的音频编辑器。它既不是一个功能齐全的 DAW,也不是一个基本的音频编辑工具。它是两者的混合体,并带有一些缩减的功能。
|
||||
|
||||
我不会向专业人士推荐这款软件,但如果你经营家庭音乐工作室或只是想体验一下,这将是 Linux 上可以安装的最好的音频编辑器之一。
|
||||
|
||||
**特性:**
|
||||
|
||||
* 乐谱编辑
|
||||
* 录音、混音以及采样
|
||||
|
||||
### 小结
|
||||
|
||||
这些是你可以找到的 Linux 上的最棒的一些音频编辑器了。不论你是需要 DAW,一个剪切/粘贴的编辑工具,或者仅仅想要一个拥有基础的混音和录音功能的音频编辑工具,上述软件都能够满足你的需求。
|
||||
|
||||
如果在这篇文章中我们遗漏了你最喜欢的一些音频工具,可以在原文下方评论中回复告诉我们。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/best-audio-editors-linux
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[MFGJT](https://github.com/MFGJT)
|
||||
校对:[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://en.wikipedia.org/wiki/Digital_audio_workstation
|
||||
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/01/linux-audio-editors-800x450.jpeg?resize=800%2C450&ssl=1
|
||||
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/audacity-audio-editor.jpg?fit=800%2C591&ssl=1
|
||||
[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/lmms-daw.jpg?fit=800%2C472&ssl=1
|
||||
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/ardour-audio-editor.jpg?fit=800%2C639&ssl=1
|
||||
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/01/cecilia.jpg?fit=800%2C510&ssl=1
|
||||
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/01/mixxx.jpg?fit=800%2C486&ssl=1
|
||||
[8]: https://itsfoss.com/dj-mixxx-2/
|
||||
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/rosegarden.jpg?fit=800%2C391&ssl=1
|
||||
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/linux-audio-editors.jpeg?fit=800%2C450&ssl=1
|
@ -0,0 +1,156 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (robsean)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12113-1.html)
|
||||
[#]: subject: (Installing Kali Linux on VirtualBox: Quickest & Safest Way)
|
||||
[#]: via: (https://itsfoss.com/install-kali-linux-virtualbox/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
在 VirtualBox 上安装 Kali Linux:最快速和最安全的方法
|
||||
======
|
||||
|
||||
> 这篇教程向你展示如何在 Windows 和 Linux 中以最快的方式在 VirtualBox 上安装 Kali Linux。
|
||||
|
||||
[Kali Linux][1] 是 [最适合脆弱性测试和安全爱好者的 Linux 发行版][2] 之一。
|
||||
|
||||
因为它涉及一个像黑客之类的敏感话题,就像一把双刃剑。我们过去在详细的 Kali Linux 评论中讨论过,所以我不会再次赘述。
|
||||
|
||||
虽然你可以通过替换现有的操作系统的形式安装 Kali Linux,但是通过虚拟机来使用它可能会是更好、更安全的选择。
|
||||
|
||||
使用 VirtualBox,你可以在 Windows/Linux 系统中将 Kail Linux 作为常规应用程序使用。这和在系统中运行 VLC 或游戏几乎是一样的。
|
||||
|
||||
在虚拟机中使用 Kali Linux 是安全的。不管你在 Kali Linux 做什么都不会影响你的 ‘宿主系统’(即你原来的 Windows 或 Linux 操作系统)。你的实际操作系统将不会受到影响,并且在你的宿主系统中数据也是安全的。
|
||||
|
||||
![][3]
|
||||
|
||||
### 如何在 VirtualBox 中安装 Kali Linux
|
||||
|
||||
在这里我会使用 [VirtualBox][4]。它是一个非常好的开源虚拟化解决方案,几乎适合于任何人,无论是专业使用或个人使用。它是免费提供的。
|
||||
|
||||
在这篇文章中,我们将特别讨论 Kali Linux,但你也可以安装几乎任何其他的操作系统,只要有 ISO 文件或预建的虚拟机保存文件就可以安装。
|
||||
|
||||
**注意:**同样的步骤适用于运行 VirtualBox 的 Windows 或 Linux。
|
||||
|
||||
如上所述 ,你可以安装 Windows 或 Linux 作为你的宿主系统。但是,在我已安装 Windows 10 的情况下(别仇恨我!),我会尝试着在其上的 VirtualBox 中一步步地安装 Kali Linux 。
|
||||
|
||||
并且,最棒的是,即使你碰巧使用一个 Linux 发行版作为你的主要操作系统,也将使用同样的步骤!
|
||||
|
||||
想知道如何做?让我们来看看…
|
||||
|
||||
- [video](https://youtu.be/TGOiAsSdADs)
|
||||
|
||||
### 在 VirtualBox 上安装 Kali Linux 的分步指南
|
||||
|
||||
我们将使用一个专门为 VirtualBox 定制的 Kali Linux 镜像。你也可以下载 Kali Linux 的 ISO 文件,并创建一个新的虚拟机,但是当你有一个简单的选择时,为什么还这样做呢?
|
||||
|
||||
#### 1、下载并安装 VirtualBox
|
||||
|
||||
第一件要做的事是从甲骨文的官方网站下载和安装 VirtualBox。
|
||||
|
||||
- [下载 VirtualBox][6]
|
||||
|
||||
在你下载了安装器之后,只需要双击它来安装 VirtualBox。在 [Ubuntu][7]/Fedora Linux 安装 VirtualBox 也是一样的方式。
|
||||
|
||||
#### 2、下载即用型的 Kali Linux 虚拟镜像
|
||||
|
||||
在安装成功后,前往 [Offensive Security 的下载页面][8] 来下载适用于 VirtualBox 的虚拟机镜像。如果你改变主意使用 [VMware][9],那里也有适用的。
|
||||
|
||||
![][10]
|
||||
|
||||
如你所见,文件大小大约 3 GB,你应该使用 torrent 方式,或者使用一个[下载管理器][11]来下载它。
|
||||
|
||||
- [下载 Kali Linux 虚拟镜像][8]
|
||||
|
||||
#### 3、在 Virtual Box 上安装 Kali Linux
|
||||
|
||||
当你安装 VirtualBox 并下载 Kali Linux 镜像后,你只需要将其导入到 VirtualBox 中就可以使其正常工作。
|
||||
|
||||
这里是如何导入 Kali Linux 的 VirtualBox 镜像:
|
||||
|
||||
##### 步骤 1
|
||||
|
||||
启动 VirtualBox。你会看到一个<ruby>导入<rt>Import</rt></ruby> 按钮,点击它。
|
||||
|
||||
![点击导入按钮][12]
|
||||
|
||||
##### 步骤 2
|
||||
|
||||
接下来,浏览刚刚下载的文件,选择要导入的文件(如下图所示)。文件名应该以“kali linux”开始,以 .ova 扩展名结束。
|
||||
|
||||
![导入 Kali Linux 镜像][13]
|
||||
|
||||
选择后,单击<ruby>下一步<er>Next</rt></.ruby>继续进行。
|
||||
|
||||
##### 步骤 3
|
||||
|
||||
现在,你会看到要导入的虚拟机的设置。所以,你可以自定义它们或者不自定义,这是你的选择。采用默认设置也是可以的。
|
||||
|
||||
你需要选择一个有足够可用存储空间的路径。在 Windows 上,我绝不建议使用 C: 盘。
|
||||
|
||||
![将硬盘驱动器导入为 VDI][14]
|
||||
|
||||
在这里,“将硬盘驱动器导入为 VDI”指的是通过分配存储器空间集来虚拟挂载硬盘驱动器。
|
||||
|
||||
在你完成设置后,单击<ruby>导入<rt>Import</rt></ruby>,等待一段时间。
|
||||
|
||||
##### 步骤 4
|
||||
|
||||
你现在将看到它被列在虚拟机列表中。所以,只需点击<ruby>开始<rt>Start</rt></ruby>来启动它。
|
||||
|
||||
你可能会在开始时得到一个 USB 2.0 端口控制器的错误,你可以禁用它来解决问题,或者只需按照屏幕上的指示来安装一个附加软件包修复问题。然后就大功告成了!
|
||||
|
||||
![Kali Linux 运行在 VirtualBox 中][15]
|
||||
|
||||
以前 Kali Linux 中的默认用户名是 root,默认密码是 toor。但从 2020 年 1 月起,Kali Linux 就不使用 root 账号了。现在,默认账号和密码都是 kali。
|
||||
|
||||
你应该可以用它来登录系统了。
|
||||
|
||||
请注意,在尝试安装一个新的应用程序或尝试破解 WiFi 密码之前,请先[更新 Kali Linux][16] 。
|
||||
|
||||
我希望这篇指南能帮助您在 VirtualBox 上很容易地安装 Kali Linux。当然,Kali Linux 有很多有用的渗透测试工具 – 祝你好运!
|
||||
|
||||
**提示** : Kali Linux 和 Ubuntu 都是基于 Debian 的,如果你在使用 Kali Linux 时遇到任何问题或错误,你可以按照互联网上的 Ubuntu 和 Debian 的教程解决。
|
||||
|
||||
### 奖励: 免费的 Kali Linux 指南书
|
||||
|
||||
如果你刚刚开始使用 Kali Linux, 那么了解如何使用 Kali Linux 就很有必要了。
|
||||
|
||||
Kali Linux 背后的公司 Offensive Security 制作了一本指南书,讲解了 Linux 的基础知识、Kali Linux 的基础知识、配置和设置,书中还有一些关于渗透测试和安全工具的章节。
|
||||
|
||||
基本上,它包含你上手 Kali Linux 所需要的一切东西。更重要的是,这本书可以免费下载。
|
||||
|
||||
- [免费下载《揭秘 Kali Linux》][17]
|
||||
|
||||
如果你在 VirtualBox 上使用 Kali Linux 时遇到问题,请在下面的评论中告诉我们,或者直接分享你的经验。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/install-kali-linux-virtualbox/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[robsean](https://github.com/robsean)
|
||||
校对:[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://www.kali.org/
|
||||
[2]: https://itsfoss.com/linux-hacking-penetration-testing/
|
||||
[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/kali-linux-virtual-box.png?resize=800%2C450&ssl=1
|
||||
[4]: https://www.virtualbox.org/
|
||||
[5]: https://www.youtube.com/c/itsfoss?sub_confirmation=1
|
||||
[6]: https://www.virtualbox.org/wiki/Downloads
|
||||
[7]: https://itsfoss.com/install-virtualbox-ubuntu/
|
||||
[8]: https://www.offensive-security.com/kali-linux-vm-vmware-virtualbox-image-download/
|
||||
[9]: https://itsfoss.com/install-vmware-player-ubuntu-1310/
|
||||
[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/kali-linux-virtual-box-image.jpg?resize=800%2C347&ssl=1
|
||||
[11]: https://itsfoss.com/4-best-download-managers-for-linux/
|
||||
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmbox-import-kali-linux.jpg?ssl=1
|
||||
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmbox-linux-next.jpg?ssl=1
|
||||
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmbox-kali-linux-settings.jpg?ssl=1
|
||||
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/kali-linux-on-windows-virtualbox.jpg?resize=800%2C429&ssl=1
|
||||
[16]: https://linuxhandbook.com/update-kali-linux/
|
||||
[17]: https://kali.training/downloads/Kali-Linux-Revealed-1st-edition.pdf
|
262
published/202004/20190612 How to write a loop in Bash.md
Normal file
262
published/202004/20190612 How to write a loop in Bash.md
Normal file
@ -0,0 +1,262 @@
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "chunibyo-wly"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-12088-1.html"
|
||||
[#]: subject: "How to write a loop in Bash"
|
||||
[#]: via: "https://opensource.com/article/19/6/how-write-loop-bash"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
|
||||
如何在 Bash 中使用循环
|
||||
======
|
||||
|
||||
> 使用循环和查找命令批量自动对多个文件进行一系列的操作。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/08/225655by8i8k7uyppp18ph.jpg)
|
||||
|
||||
人们希望学习批处理命令的一个普遍原因是要得到批处理强大的功能。如果你希望批量的对文件执行一些指令,构造一个可以重复运行在那些文件上的命令就是一种方法。在编程术语中,这被称作*执行控制*,`for` 循环就是其中最常见的一种。
|
||||
|
||||
`for` 循环可以详细描述你希望计算机对你指定的每个数据对象(比如说文件)所进行的操作。
|
||||
|
||||
### 一般的循环
|
||||
|
||||
使用循环的一个简单例子是对一组文件进行分析。这个循环可能没什么用,但是这是一个安全的证明自己有能力独立处理文件夹里每一个文件的方法。首先,创建一个文件夹然后拷贝一些文件(例如 JPEG、PNG 等类似的文件)至文件夹中生成一个测试环境。你可以通过文件管理器或者终端来完成创建文件夹和拷贝文件的操作:
|
||||
|
||||
```bash
|
||||
$ mkdir example
|
||||
$ cp ~/Pictures/vacation/*.{png,jpg} example
|
||||
```
|
||||
|
||||
切换到你刚创建的那个新文件夹,然后列出文件并确认这个测试环境是你需要的:
|
||||
|
||||
```
|
||||
$ cd example
|
||||
$ ls -1
|
||||
cat.jpg
|
||||
design_maori.png
|
||||
otago.jpg
|
||||
waterfall.png
|
||||
```
|
||||
|
||||
在循环中逐一遍历文件的语法是:首先声明一个变量(例如使用 `f` 代表文件),然后定义一个你希望用变量循环的数据集。在这种情况下,使用 `*` 通配符来遍历当前文件夹下的所有文件(通配符 `*` 匹配*所有文件*)。然后使用一个分号(`;`)来结束这个语句。
|
||||
|
||||
```
|
||||
$ for f in * ;
|
||||
```
|
||||
|
||||
取决于你个人的喜好,你可以选择在这里按下回车键。在语法完成前,shell 是不会尝试执行这个循环的。
|
||||
|
||||
接下来,定义你想在每次循环中进行的操作。简单起见,使用 `file` 命令来得到 `f` 变量(使用 `$` 告诉 shell 使用这个变量的值,无论这个变量现在存储着什么)所存储着的文件的各种信息:
|
||||
|
||||
```
|
||||
do file $f ;
|
||||
```
|
||||
|
||||
使用另一个分号结束这一行,然后关闭这个循环:
|
||||
|
||||
```
|
||||
done
|
||||
```
|
||||
|
||||
按下回车键启动 shell 对当前文件夹下*所有东西*的遍历。`for` 循环将会一个一个的将文件分配给变量 `f` 并且执行你的命令:
|
||||
|
||||
```
|
||||
$ for f in * ; do
|
||||
> file $f ;
|
||||
> done
|
||||
cat.jpg: JPEG image data, EXIF standard 2.2
|
||||
design_maori.png: PNG image data, 4608 x 2592, 8-bit/color RGB, non-interlaced
|
||||
otago.jpg: JPEG image data, EXIF standard 2.2
|
||||
waterfall.png: PNG image data, 4608 x 2592, 8-bit/color RGB, non-interlaced
|
||||
```
|
||||
|
||||
你也可以用这种形式书写命令:
|
||||
|
||||
```
|
||||
$ for f in *; do file $f; done
|
||||
cat.jpg: JPEG image data, EXIF standard 2.2
|
||||
design_maori.png: PNG image data, 4608 x 2592, 8-bit/color RGB, non-interlaced
|
||||
otago.jpg: JPEG image data, EXIF standard 2.2
|
||||
waterfall.png: PNG image data, 4608 x 2592, 8-bit/color RGB, non-interlaced
|
||||
```
|
||||
|
||||
对你的 shell 来说,多行和单行的格式没有什么区别,并且会输出完全一样的结果。
|
||||
|
||||
### 一个实用的例子
|
||||
|
||||
下面是一个循环在日常使用中的实用案例。假如你拥有一堆假期拍的照片想要发给你的朋友。但你的照片太大了,无法通过电子邮件发送,上传到[图片分享服务][2]也不方便。因此你想为你的照片创建小型的 web 版本,但是你不希望花费太多时间在一个一个的压缩图片体积上。
|
||||
|
||||
首先,在你的 Linux、BSD 或者 Mac 上使用包管理器安装 ImageMagick 命令。例如,在 Fedora 和 RHEL 上:
|
||||
|
||||
```
|
||||
$ sudo dnf install ImageMagick
|
||||
```
|
||||
|
||||
在 Ubuntu 和 Debian 上:
|
||||
|
||||
```
|
||||
$ sudo apt install ImageMagick
|
||||
```
|
||||
|
||||
在 BSD 上,使用 `ports` 或者 [pkgsrc][3] 安装。在 Mac 上,使用 [Homebrew][4] 或者 [MacPorts][5] 安装。
|
||||
|
||||
在你安装了 ImageMagick 之后,你就拥有一系列可以用来操作图片的新命令了。
|
||||
|
||||
为你将要创建的文件建立一个目标文件夹:
|
||||
|
||||
```
|
||||
$ mkdir tmp
|
||||
```
|
||||
|
||||
使用下面的循环可以将每张图片减小至原来大小的 33%。
|
||||
|
||||
```
|
||||
$ for f in * ; do convert $f -scale 33% tmp/$f ; done
|
||||
```
|
||||
|
||||
然后就可以在 `tmp` 文件夹中看到已经缩小了的照片了。
|
||||
|
||||
你可以在循环体中使用任意数量的命令,因此如果你需要对一批文件进行复杂的操作,可以将你的命令放在一个 `for` 循环的 `do` 和 `done` 语句之间。例如,假设你希望将所有处理过的图片拷贝至你的网站所托管的图片文件夹并且在本地系统移除这些文件:
|
||||
|
||||
```
|
||||
$ for f in * ; do
|
||||
convert $f -scale 33% tmp/$f
|
||||
scp -i seth_web tmp/$f seth@example.com:~/public_html
|
||||
trash tmp/$f ;
|
||||
done
|
||||
```
|
||||
|
||||
你的计算机会对 `for` 循环中处理的每一个文件自动的执行 3 条命令。这意味着假如你仅仅处理 10 张图片,也会省下输入 30 条指令和更多的时间。
|
||||
|
||||
### 限制你的循环
|
||||
|
||||
一个循环常常不需要处理所有文件。在示例文件夹中,你可能需要处理的只是 JPEG 文件:
|
||||
|
||||
```
|
||||
$ for f in *.jpg ; do convert $f -scale 33% tmp/$f ; done
|
||||
$ ls -m tmp
|
||||
cat.jpg, otago.jpg
|
||||
```
|
||||
|
||||
或者,你希望重复特定次数的某个操作而不仅仅只处理文件。`for` 循环的变量的值是被你赋给它的(不管何种类型的)数据所决定的,所以你可以创建一个循环遍历数字而不只是文件:
|
||||
|
||||
```
|
||||
$ for n in {0..4}; do echo $n ; done
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
```
|
||||
|
||||
### 更多循环
|
||||
|
||||
现在你了解的知识已经足够用来创建自己的循环体了。直到你对循环非常熟悉之前,尽可能的在需要处理的文件的*副本*上进行操作。使用内置的保护措施可以预防损坏自己的数据和制造不可复现的错误,例如偶然将一个文件夹下的所有文件重命名为同一个名字,就可能会导致他们的相互覆盖。
|
||||
|
||||
更进一步的 `for` 循环话题,请继续阅读。
|
||||
|
||||
### 不是所有的 shell 都是 Bash
|
||||
|
||||
关键字 `for` 是内置在 Bash shell 中的。许多类似的 shell 会使用和 Bash 同样的关键字和语法,但是也有某些 shell ,比如 [tcsh][7],使用不同的关键字,例如 `foreach`。
|
||||
|
||||
tcsh 的语法与 Bash 类似,但是它更为严格。例如在下面的例子中,不要在你的终端的第 2、3 行键入 `foreach?` 。它只是提示你仍处在构建循环的过程中。
|
||||
|
||||
```
|
||||
$ foreach f (*)
|
||||
foreach? file $f
|
||||
foreach? end
|
||||
cat.jpg: JPEG image data, EXIF standard 2.2
|
||||
design_maori.png: PNG image data, 4608 x 2592, 8-bit/color RGB, non-interlaced
|
||||
otago.jpg: JPEG image data, EXIF standard 2.2
|
||||
waterfall.png: PNG image data, 4608 x 2592, 8-bit/color RGB, non-interlaced
|
||||
```
|
||||
|
||||
在 tcsh 中,`foreach` 和 `end` 都必须单独的在一行中出现。因此你不能像 Bash 或者其他类似的 shell 一样只使用一行命令创建一个 `for` 循环。
|
||||
|
||||
### for 循环与 find 命令
|
||||
|
||||
理论上,你可能会用到不支持 `for` 循环的 shell,或者你只是更想使用其他命令的一些特性来完成和循环一样的工作。
|
||||
|
||||
使用 `find` 命令是另一个实现 `for` 循环功能的途径。这个命令提供了多种方法来定义循环中包含哪些文件的范围以及[并行][8]处理的选项。
|
||||
|
||||
`find` 命令顾名思义就是帮助你查询存储在硬盘里的文件。它的用法很简单:提供一个你希望它查询的位置的路径,接着 `find` 就会查询这个路径下面的所有文件和文件夹。
|
||||
|
||||
```
|
||||
$ find .
|
||||
.
|
||||
./cat.jpg
|
||||
./design_maori.png
|
||||
./otago.jpg
|
||||
./waterfall.png
|
||||
```
|
||||
|
||||
你可以通过添加名称的某些部分来过滤搜索结果:
|
||||
|
||||
```
|
||||
$ find . -name "*jpg"
|
||||
./cat.jpg
|
||||
./otago.jpg
|
||||
```
|
||||
|
||||
`find` 命令非常好的地方在于你可以通过 `-exec` 参数标志将它查询到的每一个文件放入循环中。例如,只对存放在你的 `example` 文件夹下的 PNG 图片进行体积压缩操作:
|
||||
|
||||
```
|
||||
$ find . -name "*png" -exec convert {} -scale 33% tmp/{} \;
|
||||
$ ls -m tmp
|
||||
design_maori.png, waterfall.png
|
||||
```
|
||||
|
||||
在 `-exec` 短语中,括号 `{}` 表示的是 `find` 正在处理的条目(换句话说,每一个被找到的以 PNG 结尾的文件)。`-exec` 短语必须使用分号结尾,但是 Bash 中常常也会使用分号。为了解决这个二义性问题,你的 `结束符` 可以使用反斜杠加上一个分号(`\;`),使得 `find` 命令可以知道这个结束符是用来标识自己结束使用的。
|
||||
|
||||
`find` 命令的操作非常棒,某些情况下它甚至可以表现得更棒。比如说,在一个新的进程中使用同一条命令查找 PNG 文件,你可能就会得到一些错误信息:
|
||||
|
||||
```
|
||||
$ find . -name "*png" -exec convert {} -flip -flop tmp/{} \;
|
||||
convert: unable to open image `tmp/./tmp/design_maori.png':
|
||||
No such file or directory @ error/blob.c/OpenBlob/2643.
|
||||
...
|
||||
```
|
||||
|
||||
看起来 `find` 不只是定位了当前文件夹(`.`)下的所有 PNG 文件,还包括已经处理并且存储到了 `tmp` 下的文件。在一些情况下,你可能希望 `find` 查询当前文件夹下再加上其子文件夹下的所有文件。`find` 命令是一个功能强大的递归工具,特别体现在处理一些文件结构复杂的情境下(比如用来放置存满了音乐人音乐专辑的文件夹),同时你也可以使用 `-maxdepth` 选项来限制最大的递归深度。
|
||||
|
||||
只在当前文件夹下查找 PNG 文件(不包括子文件夹):
|
||||
|
||||
```
|
||||
$ find . -maxdepth 1 -name "*png"
|
||||
```
|
||||
|
||||
上一条命令的最大深度再加 1 就可以查找和处理当前文件夹及下一级子文件夹下面的文件:
|
||||
|
||||
```
|
||||
$ find . -maxdepth 2 -name "*png"
|
||||
```
|
||||
|
||||
`find` 命令默认是查找每一级文件夹。
|
||||
|
||||
### 循环的乐趣与收益
|
||||
|
||||
你使用的循环越多,你就可以越多的省下时间和力气,并且可以应对庞大的任务。虽然你只是一个用户,但是通过使用循环,可以使你的计算机完成困难的任务。
|
||||
|
||||
你可以并且应该就像使用其他的命令一样使用循环。在你需要重复处理单个或多个文件时,尽可能的使用这个命令。无论如何,这也算是一项需要被严肃对待的编程活动,因此如果你需要在一些文件上完成复杂的任务,你应该多花点时间在规划自己的工作流上面。如果你可以在一份文件上完成你的工作,接下来将操作包装进 `for` 循环里就相对简单了,这里面唯一的“编程”的需要只是理解变量是如何工作的并且进行充分的规划工作将已处理过的文件和未处理过的文件分开。经过一段时间的练习,你就可以从一名 Linux 用户升级成一位知道如何使用循环的 Linux 用户,所以开始让计算机为你工作吧!
|
||||
|
||||
---
|
||||
|
||||
via: https://opensource.com/article/19/6/how-write-loop-bash
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[chunibyo-wly](https://github.com/chunibyo-wly)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux 中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth/users/goncasousa/users/howtopamm/users/howtopamm/users/seth/users/wavesailor/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bash_command_line.png?itok=k4z94W2U "bash logo on green background"
|
||||
[2]: http://nextcloud.com
|
||||
[3]: http://pkgsrc.org
|
||||
[4]: http://brew.sh
|
||||
[5]: https://www.macports.org
|
||||
[6]: mailto:seth@example.com
|
||||
[7]: https://en.wikipedia.org/wiki/Tcsh
|
||||
[8]: https://opensource.com/article/18/5/gnu-parallel
|
98
published/202004/20190712 What is Silverblue.md
Normal file
98
published/202004/20190712 What is Silverblue.md
Normal file
@ -0,0 +1,98 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12153-1.html)
|
||||
[#]: 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)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [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/
|
@ -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 是一个分布式的、可靠的键值存储,用于存储分布式系统中最关键的数据。其主要特性有:
|
||||
|
||||
* 定义明确的、面向用户的 API(gRPC)
|
||||
* 自动 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
|
@ -0,0 +1,155 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (robsean)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12152-1.html)
|
||||
[#]: 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] 或[信纸][5]大小)
|
||||
* 卡片纸(黑色是传统色)
|
||||
* 描图纸(可选)
|
||||
* 裁纸刀、尺子、切割垫板(可使用工艺切割机/激光切割机代替)
|
||||
* 工艺胶
|
||||
* LED 茶灯"蜡烛"
|
||||
|
||||
安全注意事项:这个项目只使用电池操作的蜡烛。
|
||||
|
||||
### 理解模板
|
||||
|
||||
首先,从上面的链接下载你所在区域(A4 或信纸)的合适的模板,然后在 Inkscape 中打开它。
|
||||
|
||||
![灯笼模板荧光屏][6]
|
||||
|
||||
灰白色的棋盘格背景是透明的(从技术角度来说,它是 alpha 通道。)
|
||||
|
||||
黑色基板构成了灯笼。现在,没有窗口可以让光线穿过;灯笼有一个非镂空的黑色基板。你将在 Inkscape 中使用**并集**和**差集**选项来数字化的设计窗口。
|
||||
|
||||
蓝色虚线表示折线。橙色实线表示参考线。采光窗口不应该放在橙色盒子的外面。
|
||||
|
||||
模板的左侧是你可以在你设计中使用的一些预先制作好的对象。
|
||||
|
||||
### 创建一个窗口或形状
|
||||
|
||||
1. 创建一个看起来像你想要的窗口样式的对象。可以使用 Inkscape 左侧工具栏中的一些形状工具来创建对象。此外,你可以下载共创或公共领域的剪贴画,并导入 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]
|
||||
|
||||
现在你的灯笼已经完成了,准备好点亮你的鬼屋了。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/10/how-make-halloween-lantern-inkscape
|
||||
|
||||
作者:[Jess Weichler][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[robsean](https://github.com/robsean)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [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)
|
@ -0,0 +1,103 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12123-1.html)
|
||||
[#]: subject: (Relive Linux history with the ROX desktop)
|
||||
[#]: via: (https://opensource.com/article/19/12/linux-rox-desktop)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
用 ROX 桌面重温 Linux 历史
|
||||
======
|
||||
|
||||
> 这篇文章是 Linux 桌面 24 天特别系列的一部分。如果你想来一次有趣的时光之旅,ROX 桌面非常值得一试。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/18/151533n196wag64gwhs0ga.jpg)
|
||||
|
||||
[ROX][2] 桌面已经不再积极开发,而它的遗留问题至今仍然存在,但即使在它活跃开发的时候,它也是一个另类的 Linux 桌面。当其他的桌面感觉与旧式的 Unix 或 Windows 界面大致相似时,ROX 则属于 BeOS、AmigaOS 和 [RISC OS][3] 桌面阵营。
|
||||
|
||||
它专注于拖放式操作(这使得它的可访问性对某些用户来说并不理想)、点击式操作、弹出式上下文菜单,以及一个独特的应用程序目录系统,无需安装即可运行本地应用程序。
|
||||
|
||||
### 安装 ROX
|
||||
|
||||
如今,ROX 基本上都被遗弃了,只剩下一点残渣碎片留给用户自己去收集整理。幸运的是,这个难题相对来说比较容易解决,但是当你在发行版的软件仓库中找到 ROX 桌面的碎片时,不要被迷惑了,因为那并不是 ROX 桌面全部的碎片。ROX 常用的部分 —— 文件管理器([ROX-Filer][4])和终端([ROXTerm][5]) —— 似乎在大多数流行的发行版软件仓库中都有存在,你可以将它们作为独立的应用程序安装(并使用)。然而,要运行 ROX 桌面,你必须同时安装 ROX-Session 和它所依赖的库。
|
||||
|
||||
我在 Slackware 14.2 上安装了 ROX,但它应该可以在任何 Linux 或 BSD 系统上运行。
|
||||
|
||||
首先,你必须从其版本库中安装 [ROX-lib2][6]。你要安装 ROX-lib2,按照它的理念,只需下载tarball、[解压][7],然后将 `ROX-lib` 目录移动到 `/usr/local/lib` 下就行。
|
||||
|
||||
接下来,你要安装 [ROX-Session][8]。这可能需要从源码中编译,因为它很可能不在你的软件仓库中。编译过程需要编译工具,这些工具在 Slackware 上是默认提供的,但在其他发行版中往往会被省略,以节省初始下载空间。根据你的发行版不同,你必须安装的包的名称也不同,所以请参考文档来了解具体内容。例如,在 Debian 发行版中,你可以在 [Debian 的 wiki][9] 中了解构建需求,而在 Fedora 发行版中,请参考 [Fedora 的文档][10]。安装了构建工具后,执行自定义的 ROX-Session 构建脚本。
|
||||
|
||||
```
|
||||
$ ./AppRun
|
||||
```
|
||||
|
||||
这个脚本会自己管理构建和安装,并提示你需要 root 权限,以在你的登录屏上将其添加为一个选项。
|
||||
|
||||
如果你还没有从你的软件库中安装 ROX-Filer,请在继续之前安装。
|
||||
|
||||
这些组件共同组成了一个完整的 ROX 桌面。要登录到新桌面,请从当前桌面会话中注销。默认情况下,你的会话管理器(KDM、GDM、LightDM 或 XDM,视你的设置而定)会继续登录到你之前的桌面,所以在登录前必须覆盖。
|
||||
|
||||
使用 SDDM:
|
||||
|
||||
![][11]
|
||||
|
||||
使用 GDM:
|
||||
|
||||
![][12]
|
||||
|
||||
### ROX 桌面特性
|
||||
|
||||
ROX 桌面默认情况下很简单,屏幕底部有一个面板,桌面上有一个通往主目录的快捷方式图标。面板中包含了一些常用位置的快捷方式。这就是 ROX 桌面的全部功能,至少在安装后就是这样。如果你想要时钟、日历或系统托盘,你需要找到提供这些功能的应用程序。
|
||||
|
||||
![Default ROX desktop][13]
|
||||
|
||||
虽然没有任务栏,但当你将窗口最小化时,它就会成为桌面上的一个临时图标。你可以点击该图标,将其窗口恢复到以前的大小和位置。
|
||||
|
||||
面板也可以进行一些修改。你可以在其中放置不同的快捷方式,甚至可以创建自己的小程序。
|
||||
|
||||
它没有应用菜单,也没有上下文菜单中的应用快捷方式。相反,你可以手动导航到 `/usr/share/applications`,或者你可以将你的应用目录或目录添加到 ROX 面板中。
|
||||
|
||||
![ROX desktop][14]
|
||||
|
||||
ROX 桌面的工作流程集中在鼠标驱动上,让人联想到 Mac OS 7.5 和 8 系统。通过 ROX-filer,你可以管理权限、文件管理、<ruby>内省<rt>introspection</rt></ruby>、脚本启动、后台设置,以及几乎所有你能想到的东西,只要你有足够的耐心,就可以实现点击式的交互。对于高级用户来说,这似乎很慢,但 ROX 设法让它变得相对无痛,而且非常直观。
|
||||
|
||||
### 应用程序目录、AppRun 和 AppImage
|
||||
|
||||
ROX 桌面有一个优雅的惯例,按照此惯例,包含一个名为 `AppRun` 的脚本的目录就可以像一个应用程序一样被执行。这意味着,要制作一个 ROX 应用程序,你所要做的就是将代码编译到一个目录中,将一个名为`AppRun` 的脚本放在该目录的根目录下,来执行你所编译的二进制文件,然后将该目录标记为可执行即可。ROX-Filer 会按照你设置的方式来显示一个目录,并以特殊的图标和颜色显示一个目录。当你点击一个应用程序目录,ROX-Filer 会自动运行里面的 `AppRun` 脚本。它的外观和行为就像一个已经安装好的应用程序,但它是在用户的主目录下的本地目录,不需要特殊的权限。
|
||||
|
||||
这是一个方便的功能,但它是那些你使用时感觉很好的小功能之一,因为它很容易做到。它绝不是必要的,它只是比在本地建立一个应用程序,将目录隐藏在某个不显眼的地方,并建立一个快速的 `.desktop` 文件作为你的启动器,要领先了几步。然而,应用程序目录的概念已经当做灵感被 [AppImage][16] 打包系统所 [借鉴][15]。
|
||||
|
||||
### 为什么应该试试 ROX 桌面
|
||||
|
||||
把 ROX 设置好并使用是有些困难的,它似乎真的被抛弃了。然而,它的遗产在今天以多种方式继续存在,它是 Linux 历史上的一段迷人而有趣的历史。它可能不会成为你的主要桌面,但如果你想来一次有趣的回溯之旅,那么 ROX 非常值得一试。探索它、定制它,看看它包含了哪些巧妙的想法。也许还有一些隐藏的宝石可以让开源社区受益。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/12/linux-rox-desktop
|
||||
|
||||
作者:[Seth Kenlon][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://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/1980s-computer-yearbook.png?itok=eGOYEKK- (Person typing on a 1980's computer)
|
||||
[2]: http://rox.sourceforge.net/desktop/
|
||||
[3]: https://www.riscosopen.org/content/
|
||||
[4]: http://rox.sourceforge.net/desktop/ROX-Filer
|
||||
[5]: http://roxterm.sourceforge.net/
|
||||
[6]: http://rox.sourceforge.net/desktop/ROX-Lib
|
||||
[7]: https://opensource.com/article/17/7/how-unzip-targz-file
|
||||
[8]: http://rox.sourceforge.net/desktop/ROX-Session.html
|
||||
[9]: https://wiki.debian.org/BuildingTutorial
|
||||
[10]: https://docs.pagure.org/docs-fedora/installing-software-from-source.html
|
||||
[11]: https://opensource.com/sites/default/files/advent-kdm_0.jpg
|
||||
[12]: https://opensource.com/sites/default/files/advent-gdm_1.jpg
|
||||
[13]: https://opensource.com/sites/default/files/uploads/advent-rox.jpg (Default ROX desktop)
|
||||
[14]: https://opensource.com/sites/default/files/uploads/advent-rox-custom.jpg (ROX desktop)
|
||||
[15]: https://github.com/AppImage/AppImageKit/wiki/AppDir
|
||||
[16]: https://appimage.org/
|
@ -0,0 +1,68 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12161-1.html)
|
||||
[#]: 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/)
|
||||
|
||||
DNF 和 Yum 的区别,为什么 Yum 会被 DNF 取代?
|
||||
======
|
||||
|
||||
由于 Yum 中许多长期存在的问题仍未得到解决,因此 [Yum 包管理器][1]已被 [DNF 包管理器][2]取代。这些问题包括性能差、内存占用过多、依赖解析速度变慢等。
|
||||
|
||||
DNF 使用 `libsolv` 进行依赖解析,由 SUSE 开发和维护,旨在提高性能。
|
||||
|
||||
Yum 主要是用 Python 编写的,它有自己的应对依赖解析的方法。它的 API 没有完整的文档,它的扩展系统只允许 Python 插件。
|
||||
|
||||
Yum 是 RPM 的前端工具,它管理依赖关系和资源库,然后使用 RPM 来安装、下载和删除包。
|
||||
|
||||
为什么他们要建立一个新的工具,而不是修复现有的问题呢?
|
||||
|
||||
Ales Kozamblak 解释说,这个修复在技术上是不可行的,而且 Yum 团队还没有准备好立即接受修改。
|
||||
|
||||
另外,最大的挑战是,Yum 有 56000 行代码,但 DNF 只有 29000 行代码。
|
||||
|
||||
所以除了分叉,没有办法解决。
|
||||
|
||||
不过 Yum 的运行情况还算可以。
|
||||
|
||||
|
||||
编号 | DNF(Dandified YUM) | YUM(Yellowdog Updater, Modified)
|
||||
---|---|---
|
||||
1 | DNF 使用 libsolv 来解析依赖关系,由 SUSE 开发和维护 | YUM 使用公开的 API 来解析依赖关系
|
||||
2 | API 有完整的文档 | API 没有完整的文档
|
||||
3 | 由 C、C++、Python 编写的 | 只用 Python 编写
|
||||
4 | DNF 目前在 Fedora、RHEL 8、CentOS 8、OEL 8 和 Mageia 6/7 中使用 | YUM 目前在 RHEL 6/7、CentOS 6/7、OEL 6/7 中使用
|
||||
5 | DNF 支持各种扩展 | Yum 只支持基于 Python 的扩展
|
||||
6 | API 有良好的文档,因此很容易创建新的功能 | 因为 API 没有正确的文档化,所以创建新功能非常困难
|
||||
7 | DNF 在同步存储库的元数据时,使用的内存较少 | 在同步存储库的元数据时,YUM 使用了过多的内存
|
||||
8 | DNF 使用满足性算法来解决依赖关系解析(它是用字典的方法来存储和检索包和依赖信息)| 由于使用公开 API 的原因,Yum 依赖性解析变得迟钝
|
||||
9 | 从内存使用量和版本库元数据的依赖性解析来看,性能都不错 | 总的来说,在很多因素的影响下,表现不佳
|
||||
10 | DNF 更新:在 DNF 更新过程中,如果包中包含不相关的依赖,则不会更新 | YUM 将在没有验证的情况下更新软件包
|
||||
11 | 如果启用的存储库没有响应,DNF 将跳过它,并继续使用可用的存储库处理事务 | 如果有存储库不可用,YUM 会立即停止
|
||||
12 | `dnf update` 和 `dnf upgrade` 是等价的 | 在 Yum 中则不同
|
||||
13 | 安装包的依赖关系不更新 | Yum 为这种行为提供了一个选项
|
||||
14 | 清理删除的包:当删除一个包时,DNF 会自动删除任何没有被用户明确安装的依赖包 | Yum 不会这样做
|
||||
15 | 存储库缓存更新计划:默认情况下,系统启动后 10 分钟后,DNF 每小时会对配置的存储库检查一次更新。这个动作由系统定时器单元 `dnf-makecache.timer` 控制 | Yum 也会这样做
|
||||
16 | 内核包不受 DNF 保护。不像 Yum,你可以删除所有的内核包,包括运行中的内核包 | Yum 不允许你删除运行中的内核
|
||||
17 | libsolv:用于解包和读取资源库。hawkey: 为 libsolv 提供简化的 C 和 Python API 库。librepo: 提供 C 和 Python(类似 libcURL)API 的库,用于下载 Linux 存储库元数据和软件包。libcomps: 是 yum.comps 库的替代品。它是用纯 C 语言编写的库,有 Python 2 和 Python 3 的绑定。| Yum 不使用单独的库来执行这些功能
|
||||
18 | DNF 包含 29000 行代码 | Yum 包含 56000 行代码
|
||||
19 | DNF 由 Ales Kozumplik 开发 | YUM 由 Zdenek Pavlas、Jan Silhan 和团队成员开发
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.2daygeek.com/comparison-difference-between-dnf-vs-yum/
|
||||
|
||||
作者:[Magesh Maruthamuthu][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://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/
|
@ -1,27 +1,28 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (caiichenr)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12087-1.html)
|
||||
[#]: subject: (Why your Python code should be flat and sparse)
|
||||
[#]: via: (https://opensource.com/article/19/12/zen-python-flat-sparse)
|
||||
[#]: author: (Moshe Zadka https://opensource.com/users/moshez)
|
||||
|
||||
为何你的 Python 代码应是扁平与稀疏的
|
||||
======
|
||||
本文是 Python 之禅特别系列当中的一篇,此篇着眼于其中第五与第六条原则:扁平与稀疏。
|
||||
![Digital creative of a browser on the internet][1]
|
||||
|
||||
[Python之禅][2] 得名如此,正是由于它那简明扼要的规则被设计出的意图在于让读者进行深入地思考,而绝不单是为编程提供一份易于遵守的指南。
|
||||
> 本文是 Python 之禅特别系列的第三篇,此篇着眼于其中第五与第六条原则:扁平与稀疏。
|
||||
|
||||
读后不去三思其意,断然难以体会 Python 之禅的妙处。倘若 Python 之禅仅仅罗列出一组清晰的法则,那法则之间的矛盾只能算作一种错误。然而用作引导读者去为最优方案沉思的工具,矛盾却是绝佳的。
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/08/191645uiniiy56keig95gi.jpg)
|
||||
|
||||
### 扁平胜过嵌套 Flat is better than nested.
|
||||
[Python 之禅][2] 之所以得名,正是由于它那简明扼要的规则被设计出的意图在于让读者进行深入地思考,而绝不单是为编程提供一份易于遵守的指南。
|
||||
|
||||
迫于对缩进的强硬要求,Python 对“扁平化”的需求显然远超它者。其余编程语言为了缓解对缩进的需求,通常会在嵌套结构里加入一种“欺诈”的手段。用以说明此点,不妨一同看看JavaScript。
|
||||
读后不去三思其意,断然难以体会 Python 之禅的妙处。倘若 Python 之禅仅仅罗列出一组清晰的法则,那法则之间的矛盾是一种缺憾,然而作为引导读者沉思最优方案沉思的工具,矛盾却是绝佳的。
|
||||
|
||||
JavaScript 是原生异步的,这意味着程序员用 JavaScript 写的代码会用到大量的回调函数。
|
||||
### <ruby>扁平胜过嵌套<rt>Flat is better than nested</rt></ruby>
|
||||
|
||||
迫于对缩进的强硬要求,Python 对“扁平化”的需求显然远超它者。其余编程语言为了缓解对缩进的需求,通常会在嵌套结构里加入一种“作弊”的手段。为了理解这一点,不妨一同来看看 JavaScript。
|
||||
|
||||
JavaScript 本质上是异步的,这意味着程序员用 JavaScript 写的代码会用到大量的回调函数。
|
||||
|
||||
```
|
||||
a(function(resultsFromA) {
|
||||
@ -33,8 +34,7 @@ a(function(resultsFromA) {
|
||||
}
|
||||
```
|
||||
|
||||
忽略这段代码的具体内容,只去观察这段代码的形状与缩进带来极右点的方式。这种独特的“箭头”图形在我们扫看代码时格外扎眼,这种写法也因此被视作不可取,甚至得到了“回调地狱”的绰号。不过,在 JavaScript 中,这种反映嵌套关系的缩进可以通过“欺诈”来回避。
|
||||
|
||||
忽略这段代码的具体内容,只去观察这段代码的形状与缩进带来一个最右边的点的方式。这种独特的“箭头”图形在我们扫看代码时格外扎眼,这种写法也因此被视作不可取,甚至得到了“回调地狱”的绰号。不过,在 JavaScript 中,这种反映嵌套关系的缩进可以通过“作弊”来回避。
|
||||
|
||||
```
|
||||
a(function(resultsFromA) {
|
||||
@ -46,10 +46,9 @@ c(resultsFromC,
|
||||
}}}
|
||||
```
|
||||
|
||||
Python 并没有提供这种欺诈手段:每一级嵌套在代码中都如实的对应着一层缩进。因此,Python 深层的嵌套关系在_视觉_上也一定是深层嵌套的。这使得“回调地狱”的问题对于 Python 而言要比在 JavaScript 中严重得多:嵌套的回调函数必定带来缩进,而绝无使用花括号来“欺诈”的可能。
|
||||
|
||||
这项挑战与 Python 之禅的指导原则相结合后,在我参与的库中催生出了一个优雅的解决方案。我们在 [Twisted][3] 框架里提出了 _deferred_ 抽象,日后 JavaScript 中流行的 _promise_ 抽象亦是受其启发而生。正是由于 Python 对整洁代码的坚守,方能推动 Python 开发者去发掘新的,强力的抽象。
|
||||
Python 并没有提供这种作弊手段:每一级嵌套在代码中都如实的对应着一层缩进。因此,Python 深层的嵌套关系在*视觉*上也一定是深层嵌套的。这使得“回调地狱”的问题对于 Python 而言要比在 JavaScript 中严重得多:嵌套的回调函数必定带来缩进,而绝无使用花括号来“作弊”的可能。
|
||||
|
||||
这项挑战与 Python 之禅的指导原则相结合后,在我参与的库中催生出了一个优雅的解决方案。我们在 [Twisted][3] 框架里提出了 deferred 抽象,日后 JavaScript 中流行的 promise 抽象亦是受其启发而生。正是由于 Python 对整洁代码的坚守,方能推动 Python 开发者去发掘新的、强力的抽象。
|
||||
|
||||
```
|
||||
future_value = future_result()
|
||||
@ -58,11 +57,11 @@ future_value.addCallback(b)
|
||||
future_value.addCallback(c)
|
||||
```
|
||||
|
||||
(现代 JavaScript 程序员也许会觉得这段代码十分眼熟:Promises 着实受到了 Twisted 里 deferreds 抽象的深远影响。)
|
||||
(现代 JavaScript 程序员也许会觉得这段代码十分眼熟:promise 着实受到了 Twisted 里 deferred 抽象的深远影响。)
|
||||
|
||||
### 稀疏胜过密集 Sparse is better than dense.
|
||||
### <ruby>稀疏胜过密集<rt>Sparse is better than dense</rt></ruby>
|
||||
|
||||
最易降低代码密集程度的方法是引入嵌套。这种习惯也正是有关稀疏的原则要随着前一条提出的原因:在竭尽所能地降低代码密集性之后,我们往往会遗留下_密集_的代码或数据结构。此处的密集,是指塞进过量信息的小段代码,它们会导致错误发生后的解析变得困难。
|
||||
最易降低代码密集程度的方法是引入嵌套。这种习惯也正是有关稀疏的原则要随着前一条提出的原因:在竭尽所能地减少嵌套之后,我们往往会遗留下*密集的*代码或数据结构。此处的密集,是指塞进过量信息的小段代码,它们会导致错误发生后的解析变得困难。
|
||||
|
||||
这种密集性唯有通过创造性的思考方可改善,此外别无捷径。Python 之禅并不为我们提供简单的解决方案,它只会指明改善代码的方向,而非提供“如何”去做的向导。
|
||||
|
||||
@ -75,7 +74,7 @@ via: https://opensource.com/article/19/12/zen-python-flat-sparse
|
||||
作者:[Moshe Zadka][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[caiichenr](https://github.com/caiichenr)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
172
published/202004/20200211 Navigating man pages in Linux.md
Normal file
172
published/202004/20200211 Navigating man pages in Linux.md
Normal file
@ -0,0 +1,172 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: 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/)
|
||||
|
||||
在 Linux 中遨游手册页的海洋
|
||||
======
|
||||
|
||||
> Linux 系统上的手册页可以做的不仅仅是提供特定命令的信息。它们可以帮助你发现你没有意识到的命令。
|
||||
|
||||
![Hello I'm Nik][1]
|
||||
|
||||
手册页提供了关于 Linux 命令的基本信息,很多用户经常参考它,但手册页的内容比我们很多人意识到的要多得多。
|
||||
|
||||
你总是可以输入一个像 `man who` 这样的命令,然后得到 `who` 命令的工作原理的漂亮描述,但是探索你可能不知道的命令可能会更有启发。例如,你可以使用 `man` 命令来帮助找到一些处理非常具有挑战性的任务的命令,或者显示一些选项,这些选项可以帮助你以新的更好的方式使用你已经知道的命令。
|
||||
|
||||
让我们来浏览一些选项,看看最终的结果是什么。
|
||||
|
||||
### 用 man 去识别命令
|
||||
|
||||
`man` 命令可以帮助你按主题查找命令。例如,如果你要找一个计算文件中的行数的命令,你可以提供一个关键字。在下面的例子中,我们把关键字 “count” 放在了引号中,并添加了空格,这样我们就不会得到与 “accounts” 或 “accounting” 相关的命令,而是得到那些可以为我们做一些计算的命令。
|
||||
|
||||
```
|
||||
$ man -k ' count '
|
||||
anvil (8postfix) - Postfix session count and request rate control
|
||||
cksum (1) - checksum and count the bytes in a file
|
||||
sum (1) - checksum and count the blocks in a file
|
||||
timer_getoverrun (2) - get overrun count for a POSIX per-process timer
|
||||
```
|
||||
|
||||
为了显示与新用户账户相关的命令,我们可以尝试使用这样的命令。
|
||||
|
||||
```
|
||||
$ man -k "new user"
|
||||
newusers (8) - update and create new users in batch
|
||||
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` 命令。注意上面列出的每个命令后面的括号中的数字。这些数字与包含这些命令的手册页的分区有关。
|
||||
|
||||
### 确定手册页的分区
|
||||
|
||||
`man` 命令的分区将其内容划分为不同的类别。要列出这些类别,请键入 `man man`,并查看类似下面的描述。你的系统中很可能没有第 9 分区的命令。
|
||||
|
||||
- `1`:可执行程序或 shell 命令
|
||||
- `2`:系统调用(内核提供的函数)
|
||||
- `3`:库调用(程序库内的函数)
|
||||
- `4`:特殊文件(通常在可以 `/dev` 中找到)
|
||||
- `5`:文件格式和惯例,例如 `/etc/passwd`
|
||||
- `6`:游戏
|
||||
- `7`:杂项(包括宏包和约定),例如 `man`(7)、`groff`(7)
|
||||
- `8`:系统管理命令(通常只由 root 用户使用)
|
||||
- `9`:内核例程(非标准)
|
||||
|
||||
手册页涵盖了比我们通常认为的“命令”更多的内容。从上面的描述中可以看到,它们涵盖了系统调用、库调用、特殊文件等等。
|
||||
|
||||
下面的列表显示了 Linux 系统中的手册页的实际存储位置。这些目录上的日期会有所不同,因为随着更新,其中一些分区会有新的内容,而另一些则不会。
|
||||
|
||||
```
|
||||
$ ls -ld /usr/share/man/man?
|
||||
drwxr-xr-x 2 root root 98304 Feb 5 16:27 /usr/share/man/man1
|
||||
drwxr-xr-x 2 root root 65536 Oct 23 17:39 /usr/share/man/man2
|
||||
drwxr-xr-x 2 root root 270336 Nov 15 06:28 /usr/share/man/man3
|
||||
drwxr-xr-x 2 root root 4096 Feb 4 10:16 /usr/share/man/man4
|
||||
drwxr-xr-x 2 root root 28672 Feb 5 16:25 /usr/share/man/man5
|
||||
drwxr-xr-x 2 root root 4096 Oct 23 17:40 /usr/share/man/man6
|
||||
drwxr-xr-x 2 root root 20480 Feb 5 16:25 /usr/share/man/man7
|
||||
drwxr-xr-x 2 root root 57344 Feb 5 16:25 /usr/share/man/man8
|
||||
```
|
||||
|
||||
注意,为了节省空间,手册页文件一般都是 gzip 压缩的。每当你使用 `man` 命令时,`man` 命令会根据需要解压。
|
||||
|
||||
```
|
||||
$ ls -l /usr/share/man/man1 | head -10
|
||||
total 12632
|
||||
lrwxrwxrwx 1 root root 9 Sep 5 06:38 [.1.gz -> test.1.gz
|
||||
-rw-r--r-- 1 root root 563 Nov 7 05:07 2to3-2.7.1.gz
|
||||
-rw-r--r-- 1 root root 592 Apr 23 2016 411toppm.1.gz
|
||||
-rw-r--r-- 1 root root 2866 Aug 14 10:36 a2query.1.gz
|
||||
-rw-r--r-- 1 root root 2361 Sep 9 15:13 aa-enabled.1.gz
|
||||
-rw-r--r-- 1 root root 2675 Sep 9 15:13 aa-exec.1.gz
|
||||
-rw-r--r-- 1 root root 1142 Apr 3 2018 aaflip.1.gz
|
||||
-rw-r--r-- 1 root root 3847 Aug 14 10:36 ab.1.gz
|
||||
-rw-r--r-- 1 root root 2378 Aug 23 2018 ac.1.gz
|
||||
```
|
||||
|
||||
### 按分区列出的手册页
|
||||
|
||||
即使只看第 1 分区的前 10 个手册页(如上所示),你也可能会看到一些新的命令 —— 也许是 `a2query` 或 `aaflip`(如上所示)。
|
||||
|
||||
探索命令的更好策略是按分区列出命令,不查看文件本身,而是使用 `man` 命令向你显示命令并提供每个命令的简要说明。
|
||||
|
||||
在下面的命令中,`-s 1` 指示 `man` 显示第 1 分区中的命令信息。`-k .` 使该命令对所有命令都有效,而不是指定一个特定的关键字;如果没有这个,`man` 命令就会回过头来问:“你想要什么手册页?”所以,使用关键字来选择一组相关的命令,或者使用点来显示一个分区中的所有命令。
|
||||
|
||||
```
|
||||
$ man -s 1 -k .
|
||||
2to3-2.7 (1) - Python2 to Python3 converter
|
||||
411toppm (1) - convert Sony Mavica .411 image to ppm
|
||||
as (1) - the portable GNU assembler.
|
||||
baobab (1) - A graphical tool to analyze disk usage
|
||||
busybox (1) - The Swiss Army Knife of Embedded Linux
|
||||
cmatrix (1) - simulates the display from "The Matrix"
|
||||
expect_dislocate (1) - disconnect and reconnect processes
|
||||
red (1) - line-oriented text editor
|
||||
enchant (1) - a spellchecker
|
||||
…
|
||||
```
|
||||
|
||||
### 有多少手册页?
|
||||
|
||||
如果你对每个分区中有多少手册页感到好奇,可以使用以下命令按分区对它们进行计数:
|
||||
|
||||
```
|
||||
$ for num in {1..8}
|
||||
> do
|
||||
> man -s $num -k . | wc -l
|
||||
> done
|
||||
2382
|
||||
493
|
||||
2935
|
||||
53
|
||||
441
|
||||
11
|
||||
245
|
||||
919
|
||||
```
|
||||
|
||||
确切的数量可能有所不同,但是大多数 Linux 系统的命令数量差不多。如果我们使用命令将这些数字加在一起,我们可以看到运行该命令的系统上有将近 7500 个手册页。有很多命令,系统调用等。
|
||||
|
||||
```
|
||||
$ for num in {1..8}
|
||||
> do
|
||||
> num=`man -s $num -k . | wc -l`
|
||||
> tot=`expr $num + $tot`
|
||||
> echo $tot
|
||||
> done
|
||||
2382
|
||||
2875
|
||||
5810
|
||||
5863
|
||||
6304
|
||||
6315
|
||||
6560
|
||||
7479 <=== total
|
||||
```
|
||||
|
||||
阅读手册页可以学到很多东西,但是以其他方式浏览手册页可以帮助你了解系统上可能不知道的命令。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3519853/navigating-man-pages-in-linux.html
|
||||
|
||||
作者:[Sandra Henry-Stocker][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://www.networkworld.com/author/Sandra-Henry_Stocker/
|
||||
[b]: https://github.com/lujun9972
|
||||
[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)
|
||||
[5]: https://www.facebook.com/NetworkWorld/
|
||||
[6]: https://www.linkedin.com/company/network-world
|
@ -0,0 +1,173 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (lxbwolf)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12156-1.html)
|
||||
[#]: subject: (Manage complex Git workspaces with Great Teeming Workspaces)
|
||||
[#]: via: (https://opensource.com/article/20/2/git-great-teeming-workspaces)
|
||||
[#]: author: (Daniel Gryniewicz https://opensource.com/users/dang)
|
||||
|
||||
使用 GTWS 管理复杂的 Git 工作空间
|
||||
======
|
||||
|
||||
> GTWS 是一系列脚本,它使我们在开发环境中管理不同的项目和项目的各个版本变得很容易。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/27/182149xh9s7kb5bkf5875b.jpg)
|
||||
|
||||
[Great Teeming Workspaces][2](GTWS)是一个 Git 的复杂工作空间管理工具包,它使我们在开发环境中管理不同的项目和项目的各个版本变得很容易。
|
||||
|
||||
有点像 Python 的 [venv][3],但不是为 Python 语言准备的。GTWS 用来管理多个项目的多个版本的工作空间。你可以很容易地创建、更新、进入和离开工作空间,每个项目或版本的组合(最多)有一个本地的 origin,用来与 upstream 同步 — 其余的所有工作空间都从本地的 origin 更新。
|
||||
|
||||
### 部署
|
||||
|
||||
```
|
||||
${GTWS_ORIGIN}/<project>/<repo>[/<version>]
|
||||
${GTWS_BASE_SRCDIR}/<project>/<version>/<workspacename>/{<repo>[,<repo>...]}
|
||||
```
|
||||
|
||||
源代码目录的每一级(包括全局的家目录)可以包含一个 `.gtwsrc` 文件,这个文件中维护与当前级相关的设置和 bash 代码。每一级的配置会覆盖上一级。
|
||||
|
||||
### 安装
|
||||
|
||||
用下面的命令检出 GTWS:
|
||||
|
||||
```
|
||||
git clone https://github.com/dang/gtws.git
|
||||
```
|
||||
|
||||
配置你的 `${HOME}/.gtwsrc`。它应该包含 `GTWS_ORIGIN`,也可以再包含 `GTWS_SETPROMPT`。
|
||||
|
||||
把仓库目录加到环境变量中:
|
||||
|
||||
```
|
||||
export PATH="${PATH}:/path/to/gtws
|
||||
```
|
||||
|
||||
### 配置
|
||||
|
||||
通过级联 `.gtwsrc` 文件来进行配置。它从根目录向下遍历,会执行在每级目录中找到的 `.gtwsrc` 文件。下级目录的文件会覆盖上一级。
|
||||
|
||||
在你最上层的文件 `~/.gtws/.gtwsrc` 中进行如下设置:
|
||||
|
||||
* `GTWS_BASE_SRCDIR`:所有项目源文件目录树的基目录。默认为 `$HOME/src`。
|
||||
* `GTWS_ORIGIN`: 指定 origin git 目录树的路径。默认为 `$HOME/origin`。
|
||||
* `GTWS_SETPROMPT`: 可选配置。如果配置了这个参数,shell 提示符会有工作空间的名字。
|
||||
* `GTWS_DEFAULT_PROJECT`: 不指定项目或项目未知时默认的项目名。如果不指定,使用命令行时必须指明项目。
|
||||
* `GTWS_DEFAULT_PROJECT_VERSION`: 检出的默认版本。默认为 `master`。
|
||||
|
||||
在每个项目的根目录进行以下设置:
|
||||
|
||||
* `GTWS_PROJECT`: 项目的名字(和基目录)。
|
||||
* `gtws_project_clone`: 这个函数用于克隆一个项目的指定版本。如果未定义,它会假定项目的 origin 对每一个版本都有一个单独的目录,这样会导致克隆一堆 Git 仓库。
|
||||
* `gtws_project_setup`: 在克隆完所有的仓库后,可以选择是否调用这个函数,调用后可以对项目进行必要的配置,如在 IDE 中配置工作空间。
|
||||
|
||||
在项目版本级进行以下设置:
|
||||
|
||||
* `GTWS_PROJECT_VERSION:` 项目的版本。用于正确地从 origin 拉取代码。类似 Git 中的分支名字。
|
||||
|
||||
下面这些参数可以在目录树的任意地方进行配置,如果能生效,它们可以被重写多次:
|
||||
|
||||
* `GTWS_PATH_EXTRA`: 这些是工作空间中加到路径后的额外的路径元素。
|
||||
* `GTWS_FILES_EXTRA`: 这些是不在版本控制内,但应该在工作空间中被检出的额外的文件。这些文件包括 `.git/info/exclude`,每个文件都与仓库的基目录相关联。
|
||||
|
||||
### origin 目录
|
||||
|
||||
`GTWS_ORIGIN` (大部分脚本中)指向拉取和推送的原始 Git 检出目录。
|
||||
|
||||
`${GTWS_ORIGIN}` 部署:
|
||||
|
||||
* `/<project>`
|
||||
* 这是一个项目的仓库的基目录。
|
||||
* 如果指定了 `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 分支开发,使用稳定版本的分支。
|
||||
|
||||
为了能在 Foo 中使用 GTWS,你首先要配置目录结构。本例中假设你使用默认的目录结构。
|
||||
|
||||
* 配置你最上层的 `.gtwsrc`:
|
||||
* `cp ${GTWS_LOC}/examples/gtwsrc.top ~/.gtwsrc`
|
||||
* 根据需要修改 `~/.gtwsrc`。
|
||||
* 创建顶级目录:
|
||||
* `mkdir -p ~/origin ~/src`
|
||||
* 创建并配置项目目录:
|
||||
* `mkdir -p ~/src/foo`
|
||||
|
||||
`cp ${GTWS_LOC}/examples/gtwsrc.project ~/src/foo/.gtwsrc`
|
||||
* 根据需要修改 `~/src/foo/.gtwsrc`。
|
||||
* 创建并配置 master 版本目录:
|
||||
* `mkdir -p ~/src/foo/master`
|
||||
|
||||
`cp ${GTWS_LOC}/examples/gtwsrc.version ~/src/foo/master/.gtwsrc`
|
||||
* 根据需要修改 `~/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`(译注:这个地方原文有误,不加 `-s` 参数会报错)
|
||||
* 上面命令会创建 `~/origin/foo/git/foo.git` 和 `~/origin/foo/submodule/bar.git`。
|
||||
* 以后的克隆操作会从这些 origin 而不是 upstream 克隆。
|
||||
* 现在可以删除工作空间了。
|
||||
|
||||
到现在为止,Foo 的 master 分支的工作可以结束了。假设你现在想修复一个 bug,名为 `bug1234`。你可以脱离你当前的工作空间为修复这个 bug 单独创建一个工作空间,之后在新创建的工作空间中开发。
|
||||
|
||||
* 进入版本目录,创建一个新的工作空间:
|
||||
* `cd ~/src/foo/master`
|
||||
|
||||
`mkws bug1234`
|
||||
* 上面的命令创建了 `bug1234/`,在这个目录下检出了 Foo(和它的子模块 `bar`),并创建了 `build/foo` 来构建它。
|
||||
* 有两种方式进入工作空间:
|
||||
* `cd ~/src/foo/master/bug1234`
|
||||
|
||||
`startws`
|
||||
|
||||
或者
|
||||
|
||||
`cd ~/src/foo/master/`
|
||||
|
||||
`startws bug1234`
|
||||
* 上面的命令在 `bug1234` 工作空间中开启了一个子 shell。这个 shell 有 GTWS 的环境和你在各级 `.gtwsrc` 文件中设置的环境。它也把你工作空间的基目录加入到了 CD,因此你可以从 base 路径 `cd` 到相关的目录中。
|
||||
* 现在你可以修复 `bug1234` 了,构建、测试、提交你的修改。当你可以把代码推送到 upstream 时,执行下面的命令:
|
||||
|
||||
`cd foo`
|
||||
|
||||
`wspush`
|
||||
* `wspush` 会把代码推送到与你工作空间相关的分支 — 先推送到本地的 origin,再推送到 upstream。
|
||||
* 当 upstream 有修改时,你可以用下面的命令同步到本地:
|
||||
|
||||
`git sync`
|
||||
* 上面的命令调用了 GTWS 的 `git-sync` 脚本,会从本地 origin 更新代码。使用下面的命令来更新本地的 origin:
|
||||
|
||||
`git sync -o`
|
||||
* 上面的命令会更新你本地的 origin 和子模块的镜像,然后用那些命令来更新你的检出仓库的代码。`git-sync` 也有一些其他的很好的工鞥。
|
||||
* 当要结束工作空间中的工作时,直接退出 shell:
|
||||
|
||||
`exit`
|
||||
* 你可以在任何时间重复进入工作空间,也可以在同一时间在相同的工作空间中开多个 shell。
|
||||
* 当你不需要某个工作空间时,你可以使用 `rmws` 来删除它,或者直接删除它的目录树。
|
||||
* 还有一个脚本 `tmws` 使用 tmux 进入工作空间,能创建一系列的窗口/窗格,这完美契合我的工作流。你可以根据你自己的需求来修改它。
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/2/git-great-teeming-workspaces
|
||||
|
||||
作者:[Daniel Gryniewicz][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/dang
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_laptop_hack_work.png?itok=aSpcWkcl (Coding on a computer)
|
||||
[2]: https://github.com/dang/gtws
|
||||
[3]: https://docs.python.org/3/library/venv.html
|
@ -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,因为大部分发行版都支持它而且它集成到了 systemd,systemd 是几乎所有发行版都自带的。
|
||||
|
||||
不管你的发行版是哪个,都要先激活防火墙才能让它生效,而且需要在启动时加载:
|
||||
|
||||
```
|
||||
$ 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
|
@ -0,0 +1,227 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (cycoe)
|
||||
[#]: 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 是如何处理变量的,以及如何在你的脚本与配置中使用它们。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/25/190905pq1qfk1f8f9qs9v8.jpg)
|
||||
|
||||
GNU Emacs 是由 C 和 Emacs Lisp(Elisp,Lisp 编程语言的一种方言)写成,它是一个编辑器的同时,又碰巧是 Elisp 的沙盒。因此,理解 Elisp 中的一些基本编程概念会对你有一些帮助。
|
||||
|
||||
如果你是 [Emacs][2] 新手,请先阅读 Sacha Chua 的《[给 Emacs 新手的资源][3]》精品帖。本篇文章假定你熟悉常见的 Emacs 术语,并且能够阅读并求值 Elisp 代码的简单片段。最好你也听说过变量作用域的概念,知道它在其它编程语言中的作用。本篇文章中的示例假定你使用的是相对较新的 Emacs 版本([v.25 之后的版本][4])。
|
||||
|
||||
[Elisp 手册][5] 包含了 Elisp 的方方面面,但它是写给那些有明确查找目标的人们的(它在这方面也做得相当棒)。但是很多人想要能够在更高的层次上解释 Elisp 概念的材料,同时将信息压缩成最精华的部分。本篇文章也正是我回应这种呼声的一次尝试,为读者描绘基础的大体轮廓。使他们能在配置中用上这些技巧,也让他们在手册中查询细节变得更容易。
|
||||
|
||||
### 全局变量
|
||||
|
||||
用 `defcustom` 定义的用户设置和用 `defvar` 或 `defconst` 定义的变量是全局的。使用 `defcustom` 或 `defvar` 声明变量的一个非常重要的原因是,当一个变量已经被<ruby>绑定<rt>bind</rt></ruby>,对它们进行重新求值不会覆盖掉已有的值。举个栗子,如果你在初始化文件中对 `my-var` 进行如下绑定:
|
||||
|
||||
```
|
||||
(setq my-var nil)
|
||||
```
|
||||
|
||||
对如下表达式求值不会将变量覆盖为 `t`:
|
||||
|
||||
```
|
||||
(defvar my-var t)
|
||||
```
|
||||
|
||||
注意此处有*一个例外*:如果你用 `C-M-x` 快捷键对上述声明求值,它将调用 `eval-defun` 函数,并将变量覆盖为 `t`。通过此方式,你可以按需将变量强制覆盖。这种行为是刻意而为之的:你可能知道,Emacs 中的许多特性是按需加载的,也可以称为自动加载。如果那些文件中的声明将变量覆盖为它们的默认值,那它也就覆盖了你初始化文件中的设置。
|
||||
|
||||
### 用户选项
|
||||
|
||||
用户选项就是使用 `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 匿名函数就会被调用,回显区域就会显示出该选项的符号名与值。
|
||||
|
||||
如果你在初始化文件中使用 `setq` 改变该选项的值,那么匿名函数不会运行。要想在 Elisp 中正确设置一个选项,你需要使用函数 `customize-set-variable`。或者,人们在他们的配置文件中使用了各种版本的 `csetq` 宏来自动处理(如你所愿,你可以通过 GitHub 的代码搜索发现更复杂的变体)。
|
||||
|
||||
```
|
||||
(defmacro csetq (sym val)
|
||||
`(funcall (or (get ',sym 'custom-set) 'set-default) ',sym ,val))
|
||||
```
|
||||
|
||||
若你正在使用 [use-package][6] 宏,`:custom` 关键字会替你处理好以上这些。
|
||||
|
||||
在你将以上代码放入到你的初始化文件中之后,你便可以使用 `csetq` 宏在设置变量的同时运行任何现存的 `setter` 函数。要证明这点,你可以使用此宏来改变上面定义的选项,并观察回显区域的消息输出。
|
||||
|
||||
```
|
||||
(csetq my-option nil)
|
||||
```
|
||||
|
||||
### 动态绑定与词法绑定
|
||||
|
||||
当你在使用其它编程语言时,你可能不会意识到动态绑定与词法绑定的区别。当今的大部分编程语言使用词法绑定,并且在学习变量作用域与变量查找时也没有必要去了解它们之间的区别。
|
||||
|
||||
如此看来,Emacs Lisp 比较特殊因为动态绑定是默认选项,词法绑定需要显式启用。这里有一些历史遗留原因,但在实际使用中,你应该*时刻*启用词法绑定,因为它更快并且不容易出错。要启用词法绑定,只需将如下的注释行作为你的 Emacs Lisp 文件的第一行:
|
||||
|
||||
```
|
||||
;;; -*- lexical-binding: t; -*-
|
||||
```
|
||||
|
||||
另一种方式,你可以调用 `add-file-local-variable-prop-line`,在你选择将变量 `lexical-binding` 置为 `t` 后,会自动插入如上的注释行。
|
||||
|
||||
在加载包含如上特殊格式行的文件时,Emacs 会相应地设置变量,这意味着该缓冲区中的代码加载时启用了词法绑定。若要采用交互式的方式,你可以调用 `M-x eval-buffer` 命令,它会将词法绑定考虑在内。
|
||||
|
||||
既然你已经知道了如何启用词法绑定,那么了解这些术语的含义就很明智了。对于动态绑定,在程序执行期间建立的最后一个绑定将用于变量查找。你可以通过将以下代码放入空缓冲区并执行 `M-x eval buffer`,以对此进行测试:
|
||||
|
||||
```
|
||||
(defun a-exists-only-in-my-body (a)
|
||||
(other-function))
|
||||
|
||||
(defun other-function ()
|
||||
(message "I see `a', its value is %s" a))
|
||||
|
||||
(a-exists-only-in-my-body t)
|
||||
```
|
||||
|
||||
你可能会很惊讶地发现,在 `other-function` 中查找变量 `a` 竟然成功了。
|
||||
|
||||
若你在顶部添加了特殊的词法绑定注释后,重新运行前面的示例,这段代码将抛出 `variable is void` 错误,因为 `other-functioin` 无法识别变量 `a`。如果你使用的是其它编程语言,这才是你所期望的行为。
|
||||
|
||||
启用词法绑定后,作用域会由周围的代码所定义。这并不单单是性能原因,时间也已经表明了词法绑定才是更受喜爱的。
|
||||
|
||||
### 特殊变量与动态绑定
|
||||
|
||||
如你所知,`let` 用于临时建立局部绑定:
|
||||
|
||||
```
|
||||
(let ((a "I'm a")
|
||||
(b "I'm b"))
|
||||
(message "Hello, %s. Hello %s" a b))
|
||||
```
|
||||
|
||||
接下来有趣的是——使用 `defcustom`、`defvar` 以及 `defconst` 定义的变量被称为*特殊变量*,不论词法绑定是否启用,它们都将使用动态绑定:
|
||||
|
||||
```
|
||||
;;; -*- lexical-binding: t; -*-
|
||||
|
||||
(defun some-other-function ()
|
||||
(message "I see `c', its value is: %s" c))
|
||||
|
||||
(defvar c t)
|
||||
|
||||
(let ((a "I'm lexically bound")
|
||||
(c "I'm special and therefore dynamically bound"))
|
||||
(some-other-function)
|
||||
(message "I see `a', its values is: %s" a))
|
||||
```
|
||||
|
||||
通过 `C-h e` 切换至 `Messages` 缓冲区,查看上述示例输出的消息。
|
||||
|
||||
使用 `let` 或者函数参数绑定的局部变量会遵循由 `lexical-binding` 变量定义的查找规则,但使用 `defvar`、`defconst` 或 `defcustom` 定义的全局变量,能够沿着调用栈在 `let` 表达式中被修改。
|
||||
|
||||
这种技巧允许方便地进行特殊定制,并且经常在 Emacs 中被使用。这并不奇怪,毕竟 Emacs Lisp 最开始只提供动态绑定作为唯一选择。下面是一个常见的示例,说明如何向只读缓冲区临时写入数据:
|
||||
|
||||
```
|
||||
(let ((inhibit-read-only t))
|
||||
(insert ...))
|
||||
```
|
||||
|
||||
这是另一个常见的示例,如何进行大小写敏感的搜索:
|
||||
|
||||
```
|
||||
(let ((case-fold-search nil))
|
||||
(some-function-which-uses-search ...))
|
||||
```
|
||||
|
||||
动态绑定允许你采用作者未曾预料的方式对函数进行修改。对于像 Emacs 这样设计使用的程序来说,这是个强大的工具与特性。
|
||||
|
||||
有一点需要注意:你可能会意外地使用局部变量名,该变量在其他地方被声明为特殊变量。防止这种冲突的一个技巧是避免在局部变量名中使用下划线。在我当前的 Emacs 会话中,以下代码只留下少数潜在冲突的候选:
|
||||
|
||||
```
|
||||
(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) ;; => (t obarray noninteractive debugger nil)
|
||||
```
|
||||
|
||||
### 缓冲区局部变量
|
||||
|
||||
每个缓冲区都能够拥有变量的一个局部绑定。这就意味着对于任何变量,都会首先在当前缓冲区中查找缓冲区局部变量取代默认值。局部变量是 Emacs 中一个非常重要的特性,比如它们被主模式用来建立缓冲区范围内的行为与设置。
|
||||
|
||||
事实上你已经在本文中见过*缓冲区局部变量*——也就是将 `lexical-binding` 在缓冲区范围内设置为 `t` 的特殊注释行。在 Emacs 中,在特殊注释行中定义的缓冲区局部变量也被称为*文件局部变量*。
|
||||
|
||||
任何的全局变量都可以用缓冲区局部变量来遮掩,比如上面定义的变量 `my-var`,你可用如下方式设置局部变量:
|
||||
|
||||
```
|
||||
(setq-local my-var t)
|
||||
;; or (set (make-local-variable 'my-var) t)
|
||||
```
|
||||
|
||||
此时 `my-var` 对于你在对上述代码进行求值时对应的缓冲区来说就是局部变量。若你对它调用 `describe-variable`,文档会同时告诉你局部与全局的值。从编程的角度来讲,你可以分别用 `buffer-local-value` 获取局部值,用 `default-value` 获取全局值。若要移除局部值,你可以调用 `kill-local-variable`。
|
||||
|
||||
另一个需要注意的重要性质就是,一旦一个变量成为缓冲区局部变量,后续在该缓冲区中使用的 `setq` 都将只能设置局部的值。要想设置默认值,你需要使用 `setq-default`。
|
||||
|
||||
因为局部变量意味着对缓冲区的定制,它们也就经常被用于模式钩子中。一个典型的例子如下所示:
|
||||
|
||||
```
|
||||
(add-hook 'go-mode-hook
|
||||
(defun go-setup+ ()
|
||||
(setq-local compile-command
|
||||
(if (string-suffix-p "_test.go" buffer-file-name)
|
||||
"go test -v"
|
||||
(format "go run %s"
|
||||
(shell-quote-argument
|
||||
(file-name-nondirectory buffer-file-name)))))))
|
||||
```
|
||||
|
||||
这将设置 `go-mode` 缓冲区中 `M-x compile` 使用的编译命令。
|
||||
|
||||
另一个重要的方面就是一些变量会*自动*成为缓冲区局部变量。这也就意味着当你使用 `setq` 设置这样一个变量时,它会针对当前缓冲区设置局部绑定。这个特性不应该被经常使用,因为这种隐式的行为并不好。不过如果你想的话,你可以使用如下方法创建自动局部变量:
|
||||
|
||||
```
|
||||
(defvar-local my-automatical-local-var t)
|
||||
;; or (make-variable-buffer-local 'my-automatical-local-var)
|
||||
```
|
||||
|
||||
变量 `indent-tabs-mode` 就是 Emacs 内建的一个例子。如果你在初始化文件中使用 `setq` 改变变量的值,根本不会影响默认值。只有在你加载初始化文件时正处在当前的缓冲区的局部值会被改变。因此,你需要使用 `setq-default` 来改变 `indent-tabs-mode` 的默认值。
|
||||
|
||||
### 结语
|
||||
|
||||
Emacs 是一个强大的编辑器,并且随着你的定制它将变得更加强大。现在,你知道了 Elisp 是如何处理变量的,以及你应如何在你自己的脚本与配置中使用它们。
|
||||
|
||||
*本篇文章此前采用 CC BY-NC-SA 4.0 许可证发布在 [With-Emacs][7] 上,经过修改(带有合并请求)并在作者允许的情况下重新发布。*
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/3/variables-emacs
|
||||
|
||||
作者:[Clemens Radermacher][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[cycoe](https://github.com/cycoe)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/clemera
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/programming_keyboard_coding.png?itok=E0Vvam7A (Programming keyboard.)
|
||||
[2]: https://www.gnu.org/software/emacs/
|
||||
[3]: http://sachachua.com/blog/p/27144
|
||||
[4]: https://www.gnu.org/software/emacs/download.html
|
||||
[5]: https://www.gnu.org/software/emacs/manual/html_node/elisp/
|
||||
[6]: https://github.com/jwiegley/use-package#customizing-variables
|
||||
[7]: https://with-emacs.com/posts/tutorials/almost-all-you-need-to-know-about-variables/
|
@ -1,8 +1,8 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12106-1.html)
|
||||
[#]: subject: (Make SSL certs easy with k3s)
|
||||
[#]: via: (https://opensource.com/article/20/3/ssl-letsencrypt-k3s)
|
||||
[#]: author: (Lee Carpenter https://opensource.com/users/carpie)
|
||||
@ -12,31 +12,31 @@
|
||||
|
||||
> 如何在树莓派上使用 k3s 和 Let's Encrypt 来加密你的网站。
|
||||
|
||||
![Files in a folder][1]
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/13/153032ncp8q55pjwdj8ppj.jpg)
|
||||
|
||||
在[上一篇文章][2]中,我们在 k3s 集群上部署了几个简单的网站。那些是未加密的网站。很好,它们可以工作,但是未加密的网站有点太过时了!如今,大多数网站都是加密的。在本文中,我们将安装 [cert-manager][3] 并将其用于在集群上以部署采用 TLS 加密的网站。这些网站不仅会被加密,而且还会使用有效的公共证书,这些证书会从 [Let's Encrypt][4] 自动获取和更新!让我们开始吧!
|
||||
在[上一篇文章][2]中,我们在 k3s 集群上部署了几个简单的网站。那些是未加密的网站。不错,它们可以工作,但是未加密的网站有点太过时了!如今,大多数网站都是加密的。在本文中,我们将安装 [cert-manager][3] 并将其用于在集群上以部署采用 TLS 加密的网站。这些网站不仅会被加密,而且还会使用有效的公共证书,这些证书会从 [Let's Encrypt][4] 自动获取和更新!让我们开始吧!
|
||||
|
||||
### 所需材料
|
||||
### 准备
|
||||
|
||||
要继续阅读本文,你将需要我们在上一篇文章中构建的 [k3s 树莓派集群][5]。另外,你需要拥有一个公用静态 IP 地址,并有一个可以为其创建 DNS 记录的域名。如果你有一个动态 DNS 提供程序为你提供域名,可能也行。但是,在本文中,我们将使用静态 IP 和 [CloudFlare][6] 来手动创建 DNS 的 A 记录。
|
||||
要继续阅读本文,你将需要我们在上一篇文章中构建的 [k3s 树莓派集群][5]。另外,你需要拥有一个公用静态 IP 地址,并有一个可以为其创建 DNS 记录的域名。如果你有一个动态 DNS 提供程序为你提供域名,可能也行。但是,在本文中,我们使用静态 IP 和 [CloudFlare][6] 来手动创建 DNS 的 A 记录。
|
||||
|
||||
我们在本文中创建配置文件时,如果你不想键入它们,则可以在[此处][7]进行下载。
|
||||
|
||||
### 我们为什么使用 cert-manager?
|
||||
|
||||
Traefik(预先捆绑了 k3s)实际上具有内置的 Let's Encrypt 支持,因此你可能想知道为什么我们要安装第三方软件包来做同样的事情。在撰写本文时,Traefik 中的 Let's Encrypt 支持检索证书并将其存储在文件中。cert-manager 会检索证书并将其存储在 Kubernetes 的 “<ruby>机密信息<rt>secrets</rt></ruby>” 中。我认为,“机密信息”可以简单地按名称引用,因此更易于使用。这就是我们在本文中使用 cert-manager 的主要原因。
|
||||
Traefik(在 k3s 预先捆绑了)实际上具有内置的 Let's Encrypt 支持,因此你可能想知道为什么我们要安装第三方软件包来做同样的事情。在撰写本文时,Traefik 中的 Let's Encrypt 支持检索证书并将其存储在文件中。而 cert-manager 会检索证书并将其存储在 Kubernetes 的 “<ruby>机密信息<rt>secret</rt></ruby>” 中。我认为,“机密信息”可以简单地按名称引用,因此更易于使用。这就是我们在本文中使用 cert-manager 的主要原因。
|
||||
|
||||
### 安装 cert-manager
|
||||
|
||||
通常,我们只是遵循 cert-manager 的[文档][8]在 Kubernetes 上进行安装。但是,由于我们使用的是 ARM 体系结构,因此我们需要进行一些更改,以便我们可以完成这个操作。
|
||||
|
||||
第一步是创建 cert-manager 命名空间。命名空间有助于将 cert-manager 的<ruby>吊舱<rt>Pod</rt></ruby>排除在我们的默认命名空间之外,因此当我们使用自己的“吊舱”执行 `kubectl get pods` 之类的操作时,我们不必看到它们。创建名称空间很简单:
|
||||
第一步是创建 cert-manager 命名空间。命名空间有助于将 cert-manager 的 Pod 排除在我们的默认命名空间之外,因此当我们使用自己的 Pod 执行 `kubectl get pods` 之类的操作时,我们不必看到它们。创建名称空间很简单:
|
||||
|
||||
```
|
||||
kubectl create namespace cert-manager
|
||||
```
|
||||
|
||||
这份安装说明会告诉你下载 cert-manager 的 YAML 配置文件并将其一步全部应用到你的集群。我们需要将其分为两个步骤,以便为基于 ARM 的树莓派修改文件。我们将下载文件并一步一步进行转换:
|
||||
安装说明会让你下载 cert-manager 的 YAML 配置文件并将其一步全部应用到你的集群。我们需要将其分为两个步骤,以便为基于 ARM 的树莓派修改文件。我们将下载文件并一步一步进行转换:
|
||||
|
||||
```
|
||||
curl -sL \
|
||||
@ -44,8 +44,7 @@ https://github.com/jetstack/cert-manager/releases/download/v0.11.0/cert-manager.
|
||||
sed -r 's/(image:.*):(v.*)$/\1-arm:\2/g' > cert-manager-arm.yaml
|
||||
```
|
||||
|
||||
这会下载配置文件,并将所有包含的 docker 镜像更新为 ARM 版本。来检查一下它做了什么:
|
||||
|
||||
这会下载配置文件,并将包含的所有 docker 镜像更新为 ARM 版本。来检查一下它做了什么:
|
||||
|
||||
```
|
||||
$ grep image: cert-manager-arm.yaml
|
||||
@ -54,23 +53,23 @@ $ grep image: cert-manager-arm.yaml
|
||||
image: "quay.io/jetstack/cert-manager-webhook-arm:v0.11.0"
|
||||
```
|
||||
|
||||
如我们所见,三个镜像现在在镜像名称上添加了 `-arm`。现在我们有了正确的文件,我们只需将其应用于集群:
|
||||
如我们所见,三个镜像现在在镜像名称上添加了 `-arm`。现在我们有了正确的文件,我们只需将其应用于集群:
|
||||
|
||||
```
|
||||
kubectl apply -f cert-manager-arm.yaml
|
||||
```
|
||||
|
||||
这将安装所有的 cert-manager。我们可以通过 `kubectl --namespace cert-manager get pods` 来检查安装何时完成,直到所有“吊舱”都处于 `Running` 状态。
|
||||
这将安装 cert-manager 的全部。我们可以通过 `kubectl --namespace cert-manager get pods` 来检查安装何时完成,直到所有 Pod 都处于 `Running` 状态。
|
||||
|
||||
这实际上就完成了 cert-manager 的安装!
|
||||
这就完成了 cert-manager 的安装!
|
||||
|
||||
### Let's Encrypt 概述
|
||||
|
||||
Let's Encrypt 的好处是,它们免费为我们提供了经过公共验证的 TLS 证书!这意味着我们可以拥有一个完全有效的、可供任何人访问的 TLS 加密网站,这些家庭或业余的爱好活动挣不到钱,也无需自己掏腰包购买 TLS 证书!以及,当通过 cert-manager 使用 Let's Encrypt 的证书时,获得证书的整个过程是自动化的,证书的续订也是自动的!
|
||||
Let's Encrypt 的好处是,它免费为我们提供了经过公共验证的 TLS 证书!这意味着我们可以拥有一个完全有效的、可供任何人访问的 TLS 加密网站,这些家庭或业余的爱好活动挣不到钱,也无需自己掏腰包购买 TLS 证书!以及,当通过 cert-manager 使用 Let's Encrypt 的证书时,获得证书的整个过程是自动化的,证书的续订也是自动的!
|
||||
|
||||
但它是如何工作的?下面是该过程的简化说明。我们(或代表我们的 cert-manager)向 Let's Encrypt 发出我们拥有的域名的证书请求。Let's Encrypt 通过使用 ACME DNS 或 HTTP 验证机制来验证我们是否拥有该域。如果验证成功,则 Let's Encrypt 将向我们提供证书,这些证书将由 cert-manager 安装在我们的网站(或其他 TLS 加密的终结点)中。在需要重复此过程之前,这些证书可以使用 90 天。但是,cert-manager 会自动为我们更新证书。
|
||||
但它是如何工作的?下面是该过程的简化说明。我们(或代表我们的 cert-manager)向 Let's Encrypt 发出我们拥有的域名的证书请求。Let's Encrypt 通过使用 ACME DNS 或 HTTP 验证机制来验证我们是否拥有该域。如果验证成功,则 Let's Encrypt 将向我们提供证书,这些证书将由 cert-manager 安装在我们的网站(或其他 TLS 加密的端点)中。在需要重复此过程之前,这些证书可以使用 90 天。但是,cert-manager 会自动为我们更新证书。
|
||||
|
||||
在本文中,我们将使用 HTTP 验证方法,因为它更易于设置并且适用于大多数情况。以下是幕后将发生的基本过程。cert-manager 将向 Let's Encrypt 发出证书请求。作为回应,Let's Encrypt 将发出所有权验证的<ruby>质询<rt>challenges</rt></ruby>。这个质询是将一个 HTTP 资源放在请求证书的域名下的一个特定 URL 上。从理论上讲,如果我们可以将该资源放在该 URL 上,并且让 Let's Encrypt 可以远程获取它,那么我们实际上必须是该域的所有者。否则,要么我们无法将资源放置在正确的位置,要么我们无法操纵 DNS 以使 Let's Encrypt 访问它。在这种情况下,cert-manager 会将资源放在正确的位置,并自动创建一个临时的 `Ingress` 记录,以将流量路由到正确的位置。如果 Let's Encrypt 可以读到该质询要求的资源并正确无误,它将把证书发回给 cert-manager。然后,cert-manager 将证书存储为“机密信息”,然后我们的网站(或其他任何网站)将使用这些证书通过 TLS 保护我们的流量。
|
||||
在本文中,我们将使用 HTTP 验证方法,因为它更易于设置并且适用于大多数情况。以下是幕后发生的基本过程。cert-manager 向 Let's Encrypt 发出证书请求。作为回应,Let's Encrypt 发出所有权验证的<ruby>质询<rt>challenges</rt></ruby>。这个质询是将一个 HTTP 资源放在请求证书的域名下的一个特定 URL 上。从理论上讲,如果我们可以将该资源放在该 URL 上,并且让 Let's Encrypt 可以远程获取它,那么我们实际上必须是该域的所有者。否则,要么我们无法将资源放置在正确的位置,要么我们无法操纵 DNS 以使 Let's Encrypt 访问它。在这种情况下,cert-manager 会将资源放在正确的位置,并自动创建一个临时的 `Ingress` 记录,以将流量路由到正确的位置。如果 Let's Encrypt 可以读到该质询要求的资源并正确无误,它将把证书发回给 cert-manager。cert-manager 将证书存储为“机密信息”,然后我们的网站(或其他任何网站)将使用这些证书通过 TLS 保护我们的流量。
|
||||
|
||||
### 为该质询设置网络
|
||||
|
||||
@ -78,11 +77,11 @@ Let's Encrypt 的好处是,它们免费为我们提供了经过公共验证的
|
||||
|
||||
为了使质询过程正常运行,我们需要一个我们要申请证书的域名,以将其路由到端口 80 上的 k3s 集群。为此,我们需要告诉世界上的 DNS 系统它的位置。因此,我们需要将域名映射到我们的公共 IP 地址。如果你不知道你的公共 IP 地址是什么,可以访问 [WhatsMyIP][9] 之类的地方,它会告诉你。接下来,我们需要输入 DNS 的 A 记录,该记录将我们的域名映射到我们的公共 IP 地址。为了使此功能可靠地工作,你需要一个静态的公共 IP 地址,或者你可以使用动态 DNS 提供商。一些动态 DNS 提供商会向你颁发一个域名,你可以按照以下说明使用它。我没有尝试过,所以不能肯定地说它适用于所有提供商。
|
||||
|
||||
对于本文,我们将假设有一个静态公共 IP 并使用 CloudFlare 来设置 DNS 的 A 记录。如果愿意,可以使用自己的 DNS 提供程序。重要的是你可以设置 A 记录。
|
||||
对于本文,我们假设有一个静态公共 IP,并使用 CloudFlare 来设置 DNS 的 A 记录。如果愿意,可以使用自己的 DNS 服务器。重要的是你可以设置 A 记录。
|
||||
|
||||
在本文的其余部分中,我将使用 [k3s.carpie.net][10] 作为示例域,因为这是我拥有的域。你显然会用自己拥有的任何域替换它。
|
||||
在本文的其余部分中,我将使用 [k3s.carpie.net][10] 作为示例域名,因为这是我拥有的域。你显然会用自己拥有的任何域名替换它。
|
||||
|
||||
为示例起见,假设我们的公共 IP 地址是 198.51.100.42。我们将转到我们的 DNS 提供商的 DNS 记录部分,并添加一个名为 [k3s.carpie.net][10] 的类型为 `A` 的记录(CloudFlare 已经假定了域的部分,因此我们只需输入 `k3s`),然后输入 `198.51.100.42` 作为 IPv4 地址。
|
||||
为示例起见,假设我们的公共 IP 地址是 198.51.100.42。我们转到我们的 DNS 提供商的 DNS 记录部分,并添加一个名为 [k3s.carpie.net][10] 的类型为 `A` 的记录(CloudFlare 已经假定了域的部分,因此我们只需输入 `k3s`),然后输入 `198.51.100.42` 作为 IPv4 地址。
|
||||
|
||||
![][11]
|
||||
|
||||
@ -95,17 +94,17 @@ $ dig +short k3s.carpie.net
|
||||
198.51.100.42
|
||||
```
|
||||
|
||||
继续运行以上命令,直到可以返回 IP 才行。关于 CloudFlare 有个小注释:ClouldFlare 提供了通过代理流量来隐藏你的实际 IP 的服务。在这种情况下,我们取回的是 CloudFlare 的 IP,而不是我们的 IP。 但对于我们的目的,这应该可以正常工作。
|
||||
继续运行以上命令,直到可以返回 IP 才行。关于 CloudFlare 有个小注释:ClouldFlare 提供了通过代理流量来隐藏你的实际 IP 的服务。在这种情况下,我们取回的是 CloudFlare 的 IP,而不是我们的 IP。但对于我们的目的,这应该可以正常工作。
|
||||
|
||||
网络配置的最后一步是配置路由器,以将端口 80 和 443 上的传入流量路由到我们的 k3s 集群。可悲的是,路由器配置页面的差异很大,因此我无法确切地说明你的外观是什么样子。大多数时候,我们需要的管理页面位于“端口转发”或类似内容下。我甚至看到过它列在“游戏”之下(显然是端口转发主要用于的游戏)!让我们看看我的路由器的配置如何。
|
||||
|
||||
![][12]
|
||||
|
||||
如果你和我的设置一样,则转到 192.168.0.1 登录到路由器管理应用程序。对于此路由器,它位于 “ NAT / QoS” -> “端口转发”。在这里,我们将端口 80/TCP 协议设置为转发到 192.168.0.50(主节点 `kmaster` 的 IP)的端口 80。我们还将端口 443 设置为也映射到 `kmaster`。从技术上讲,这对于质询来说并不是必需的,但是在本文的结尾,我们将部署一个启用 TLS 的网站,并且需要映射 443 来进行访问。因此,现在进行映射很方便。我们保存并应用更改,应该一切顺利!
|
||||
如果你和我的环境一样,则转到 192.168.0.1 登录到路由器管理应用程序。对于此路由器,它位于 “ NAT/QoS” -> “端口转发”。在这里,我们将端口 80/TCP 协议设置为转发到 192.168.0.50(主节点 `kmaster` 的 IP)的端口 80。我们还设置端口 443 也映射到 `kmaster`。从技术上讲,这对于质询来说并不是必需的,但是在本文的结尾,我们将部署一个启用 TLS 的网站,并且需要映射 443 来进行访问。因此,现在进行映射很方便。我们保存并应用更改,应该一切顺利!
|
||||
|
||||
### 配置 cert-manager 来使用 Let's Encrypt(暂存环境)
|
||||
|
||||
现在,我们需要配置 cert-manager 来通过 Let's Encrypt 颁发证书。Let's Encrypt 为我们提供了一个暂存(例如用于测试)环境,以便审视我们的配置。这样它更能容忍错误和请求的频率。如果我们对生产环境做了错误的操作,我们很快就好发现自己被暂时禁止访问了!因此,我们将使用暂存环境手动测试请求。
|
||||
现在,我们需要配置 cert-manager 来通过 Let's Encrypt 颁发证书。Let's Encrypt 为我们提供了一个暂存(例如用于测试)环境,以便审视我们的配置。这样它更能容忍错误和请求的频率。如果我们对生产环境做了错误的操作,我们很快就会发现自己被暂时禁止访问了!因此,我们将使用暂存环境手动测试请求。
|
||||
|
||||
创建一个文件 `letsencrypt-issuer-staging.yaml`,内容如下:
|
||||
|
||||
@ -132,7 +131,7 @@ spec:
|
||||
|
||||
请确保将电子邮件地址更新为你的地址。如果出现问题或我们弄坏了一些东西,这就是 Let's Encrypt 与我们联系的方式!
|
||||
|
||||
现在,我们使用以下方法创建发行者:
|
||||
现在,我们使用以下方法创建<ruby>发行者<rt>issuer</rt></ruby>:
|
||||
|
||||
```
|
||||
kubectl apply -f letsencrypt-issuer-staging.yaml
|
||||
@ -150,7 +149,6 @@ kubectl get clusterissuers
|
||||
|
||||
创建一个包含以下内容的证书请求文件 `le-test-certificate.yaml`:
|
||||
|
||||
|
||||
```
|
||||
apiVersion: cert-manager.io/v1alpha2
|
||||
kind: Certificate
|
||||
@ -167,7 +165,7 @@ spec:
|
||||
- k3s.carpie.net
|
||||
```
|
||||
|
||||
该记录仅表示我们要使用名为 `letsencrypt-staging`(我们在上一步中创建的)的 `ClusterIssuer` 来请求域 [k3s.carpie.net][10] 的证书,并在 Kubernetes 的机密信息中名为 `k3s-carpie-net-tls` 文件中存储该证书。
|
||||
该记录仅表示我们要使用名为 `letsencrypt-staging`(我们在上一步中创建的)的 `ClusterIssuer` 来请求域 [k3s.carpie.net][10] 的证书,并在 Kubernetes 的机密信息中名为 `k3s-carpie-net-tls` 的文件中存储该证书。
|
||||
|
||||
像平常一样应用它:
|
||||
|
||||
@ -188,11 +186,11 @@ NAME READY SECRET AGE
|
||||
k3s-carpie-net True k3s-carpie-net-tls 30s
|
||||
```
|
||||
|
||||
我们走在幸福之路!(这里的关键是`READY` 是 `True`)。
|
||||
我们走在幸福之路!(这里的关键是 `READY` 应该是 `True`)。
|
||||
|
||||
### 解决证书颁发问题
|
||||
|
||||
上面是幸福的道路。如果 `READY` 为 `False`,我们可以等等它,然后再次花点时间检查状态。如果它一直是 `False`,那么我们就有一个需要解决的问题。此时,我们可以遍历 Kubernetes 资源链,直到找到一条告诉我们问题的状态消息。
|
||||
上面是幸福的道路。如果 `READY` 为 `False`,我们可以等等它,然后再次花点时间检查状态。如果它一直是 `False`,那么我们就有需要解决的问题。此时,我们可以遍历 Kubernetes 资源链,直到找到一条告诉我们问题的状态消息。
|
||||
|
||||
假设我们执行了上面的请求,而 `READY` 为 `False`。我们可以从以下方面开始故障排除:
|
||||
|
||||
@ -200,7 +198,7 @@ k3s-carpie-net True k3s-carpie-net-tls 30s
|
||||
kubectl describe certificates k3s-carpie-net
|
||||
```
|
||||
|
||||
这将返回很多信息。通常,有用的内容位于 `Events:` 部分,该部分通常位于底部。假设最后一个事件是 `Created new CertificateRequest resource "k3s-carpie-net-1256631848`。然后我们<ruby>描述<rt> describe</rt></ruby>一些该请求:
|
||||
这将返回很多信息。通常,有用的内容位于 `Events:` 部分,该部分通常位于底部。假设最后一个事件是 `Created new CertificateRequest resource "k3s-carpie-net-1256631848`。然后我们<ruby>描述<rt>describe</rt></ruby>一下该请求:
|
||||
|
||||
```
|
||||
kubectl describe certificaterequest k3s-carpie-net-1256631848
|
||||
@ -211,7 +209,7 @@ kubectl describe certificaterequest k3s-carpie-net-1256631848
|
||||
那么,我们可以描述该顺序:
|
||||
|
||||
```
|
||||
`kubectl describe orders default/k3s-carpie-net-1256631848-2342473830`
|
||||
kubectl describe orders default/k3s-carpie-net-1256631848-2342473830
|
||||
```
|
||||
|
||||
假设有一个事件,事件为 `Created Challenge resource "k3s-carpie-net-1256631848-2342473830-1892150396" for domain "k3s.carpie.net"`。让我们描述一下该质询:
|
||||
@ -220,7 +218,7 @@ kubectl describe certificaterequest k3s-carpie-net-1256631848
|
||||
kubectl describe challenges k3s-carpie-net-1256631848-2342473830-1892150396
|
||||
```
|
||||
|
||||
从这里返回的最后一个事件是 `Presented challenge using http-01 challenge mechanism`。看起来没问题,因此我们浏览一下描述的输出,并看到一条消息 `Waiting for http-01 challenge propagation: failed to perform self check GET request … no such host`。终于!我们发现了问题!在这种情况下,`no such host` 意味着 DNS 查找失败,因此我们需要返回并手动检查我们的 DNS 设置,正确解析域的 DNS,并进行所需的任何更改。
|
||||
从这里返回的最后一个事件是 `Presented challenge using http-01 challenge mechanism`。看起来没问题,因此我们浏览一下描述的输出,并看到一条消息 `Waiting for http-01 challenge propagation: failed to perform self check GET request ... no such host`。终于!我们发现了问题!在这种情况下,`no such host` 意味着 DNS 查找失败,因此我们需要返回并手动检查我们的 DNS 设置,正确解析域的 DNS,并进行所需的任何更改。
|
||||
|
||||
### 清理我们的测试证书
|
||||
|
||||
@ -231,9 +229,9 @@ kubectl delete certificates k3s-carpie-net
|
||||
kubectl delete secrets k3s-carpie-net-tls
|
||||
```
|
||||
|
||||
### 配置 cert-manager 以使用 Let's Encrypt(生产环境)
|
||||
### 配置 cert-manager 以使用 Let's Encrypt(生产环境)
|
||||
|
||||
现在我们已经有了测试证书,是时候移动到生产环境了。就像我们在 Let's Encrypt 暂存环境中配置 cert-manager 一样,我们现在也需要对生产环境进行同样的操作。创建一个名为 `letsencrypt-issuer-production.yaml` 的文件(如果需要,可以复制和修改暂存环境的文件),其内容如下:
|
||||
现在我们已经有了测试证书,是时候移动到生产环境了。就像我们在 Let's Encrypt 暂存环境中配置 cert-manager 一样,我们现在也需要对生产环境进行同样的操作。创建一个名为 `letsencrypt-issuer-production.yaml` 的文件(如果需要,可以复制和修改暂存环境的文件),其内容如下:
|
||||
|
||||
```
|
||||
apiVersion: cert-manager.io/v1alpha2
|
||||
@ -266,7 +264,7 @@ kubectl apply -f letsencrypt-issuer-production.yaml
|
||||
|
||||
### 申请我们网站的证书
|
||||
|
||||
重要的是要注意,我们到目前为止完成的所有步骤都是一次性设置的!对于将来的任何其他申请,我们可以从这个说明开始!
|
||||
重要的是需要注意,我们到目前为止完成的所有步骤都只需要进行一次!而对于将来的任何其他申请,我们可以从这个说明开始!
|
||||
|
||||
让我们部署在[上一篇文章][13]中部署的同样站点。(如果仍然可用,则可以修改 YAML 文件。如果没有,则可能需要重新创建并重新部署它)。
|
||||
|
||||
@ -296,7 +294,7 @@ spec:
|
||||
secretName: k3s-carpie-net-tls
|
||||
```
|
||||
|
||||
请注意,上面仅显示了 `mysite.yaml` 的 `Ingress` 部分。所做的更改是添加了注释 `cert-manager.io/cluster-issuer: letsencrypt-prod`。这告诉 traefik 创建证书时使用哪个发行者。 唯一的其他增加是 `tls:` 块。这告诉 traefik 我们希望在主机 [k3s.carpie.net][10] 上具有 TLS 功能,并且我们希望 TLS 证书文件存储在机密信息 `k3s-carpie-net-tls` 中。
|
||||
请注意,上面仅显示了 `mysite.yaml` 的 `Ingress` 部分。所做的更改是添加了注解 `cert-manager.io/cluster-issuer: letsencrypt-prod`。这告诉 traefik 创建证书时使用哪个发行者。 其他唯一增加的是 `tls:` 块。这告诉 traefik 我们希望在主机 [k3s.carpie.net][10] 上具有 TLS 功能,并且我们希望 TLS 证书文件存储在机密信息 `k3s-carpie-net-tls` 中。
|
||||
|
||||
请记住,我们没有创建这些证书!(好吧,我们创建了名称相似的测试证书,但我们删除了这些证书。)Traefik 将读取这些配置并继续寻找机密信息。当找不到时,它会看到注释说我们想使用 `letsencrypt-prod` 发行者来获取它。由此,它将提出请求并为我们安装证书到机密信息之中!
|
||||
|
||||
@ -311,17 +309,17 @@ via: https://opensource.com/article/20/3/ssl-letsencrypt-k3s
|
||||
作者:[Lee Carpenter][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://opensource.com/users/carpie
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/files_documents_paper_folder.png?itok=eIJWac15 (Files in a folder)
|
||||
[2]: https://carpie.net/articles/ingressing-with-k3s
|
||||
[2]: https://linux.cn/article-12081-1.html
|
||||
[3]: https://cert-manager.io/
|
||||
[4]: https://letsencrypt.org/
|
||||
[5]: https://opensource.com/article/20/3/kubernetes-raspberry-pi-k3s
|
||||
[5]: https://linux.cn/article-12049-1.html
|
||||
[6]: https://cloudflare.com/
|
||||
[7]: https://gitlab.com/carpie/k3s_using_certmanager/-/archive/master/k3s_using_certmanager-master.zip
|
||||
[8]: https://cert-manager.io/docs/installation/kubernetes/
|
||||
@ -329,5 +327,5 @@ via: https://opensource.com/article/20/3/ssl-letsencrypt-k3s
|
||||
[10]: http://k3s.carpie.net
|
||||
[11]: https://opensource.com/sites/default/files/uploads/ep011_dns_example.png
|
||||
[12]: https://opensource.com/sites/default/files/uploads/ep011_router.png
|
||||
[13]: https://carpie.net/articles/ingressing-with-k3s#deploying-a-simple-website
|
||||
[13]:https://linux.cn/article-12081-1.html
|
||||
[14]: http://cert-manager.io/cluster-issuer
|
@ -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
|
@ -0,0 +1,341 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (lxbwolf)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12120-1.html)
|
||||
[#]: subject: (Build a private social network with a Raspberry Pi)
|
||||
[#]: via: (https://opensource.com/article/20/3/raspberry-pi-open-source-social)
|
||||
[#]: author: (Giuseppe Cassibba https://opensource.com/users/peppe8o)
|
||||
|
||||
用树莓派搭建一个私人社交网络
|
||||
======
|
||||
|
||||
> 手把手教你怎样以低成本的硬件和简易步骤搭建自己的社交网络。
|
||||
|
||||
![Team of people around the world][1]
|
||||
|
||||
近年来,社交网络已经革新了人们的生活习惯。人们每天都会使用社交频道与朋友和家人联系。但是涉及到隐私和数据安全时,仍有一些共同的问题。尽管社交网络创建了复杂的隐私策略来保护用户的信息,但如果你不想自己的信息被泄露,最好的办法还是把数据保存在自己的服务器上。
|
||||
|
||||
一个树莓派 — 多才多艺的 Raspbian Lite 版本就可以让你搭建很多有用的家庭服务(参照我的文章[树莓派项目][2])。通过搜索开源软件你就可以实现一些令人痴迷的功能,你也可以用这个神奇的设备来感受那些功能。其中一个有趣的尝试就是在你的树莓派上安装 OSSN。
|
||||
|
||||
### OSSN 是什么?
|
||||
|
||||
<ruby>[开源社交网络][3]<rt>OpenSource Social Network</rt></ruby>(OSSN)是用 PHP 写的一个快速开发社交网络软件,让你可以搭建自己的社交网站。OSSN 可以用来搭建不同类型的社交应用,如:
|
||||
|
||||
* 私人内部网
|
||||
* 公用/公开网络
|
||||
* 社区
|
||||
|
||||
OSSN 支持的功能:
|
||||
|
||||
* 照片
|
||||
* 个人资料
|
||||
* 朋友圈
|
||||
* 表情
|
||||
* 搜索
|
||||
* 聊天
|
||||
|
||||
OSSN 运行在 LAMP 服务器上。硬件需求很简单,却能提供强大的用户界面,也友好支持移动端。
|
||||
|
||||
### 我们需要准备什么
|
||||
|
||||
这个项目很简单,而且由于我们只安装远程 Web 服务,因此我们只需要一些便宜的零件就够了。我使用的是树莓派 3B+,但是用树莓派 3A+ 或其他更新的板应该也可以。
|
||||
|
||||
硬件:
|
||||
|
||||
* 带有电源模块的树莓派 3B+
|
||||
* 一张 SD 卡(最好是性能好点的卡,至少 16 GB)
|
||||
* 一台有 SFTP 软件(如免费的 [Filezilla][4])的桌面 PC,用来把安装包传到你的树莓派上
|
||||
|
||||
### 操作步骤
|
||||
|
||||
我们首先搭建一个传统的 LAMP 服务器,然后配置数据库用户和安装 OSSN。
|
||||
|
||||
#### 1、安装 Raspbian Buster Lite 操作系统
|
||||
|
||||
你可以直接参照我的文章[在你的树莓派上安装 Raspbian Buster Lite][5]。
|
||||
|
||||
为了确保你的系统是最新的,ssh 登录到树莓派后在终端输入下面的命令:
|
||||
|
||||
```bash
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade
|
||||
```
|
||||
|
||||
#### 2、安装 LAMP 服务
|
||||
|
||||
LAMP(Linux–Apache–Mysql–Php)服务通常与 MySQL 数据库配合。在我们的项目中,我们选择 MariaDB,因为它更轻量,完美支持树莓派。
|
||||
|
||||
安装 Apache 服务:
|
||||
|
||||
```
|
||||
sudo apt-get install apache2 -y
|
||||
```
|
||||
|
||||
你可以通过在浏览器输入 `http://<<YouRpiIPAddress>>` 来检查 Apache 是否安装正确:
|
||||
|
||||
![][6]
|
||||
|
||||
安装 PHP:
|
||||
|
||||
```
|
||||
sudo apt-get install php -y
|
||||
```
|
||||
|
||||
安装 MariaDB 服务和 PHP connector:
|
||||
|
||||
```
|
||||
sudo apt-get install mariadb-server php-mysql -y
|
||||
```
|
||||
|
||||
安装 phpMyAdmin:
|
||||
|
||||
在 OSSN 中 phpMyAdmin 不是强制安装的,但我建议你安装,因为它可以简化数据库的管理。
|
||||
|
||||
```
|
||||
sudo apt-get install phpmyadmin
|
||||
```
|
||||
|
||||
在 phpMyAdmin 配置界面,执行以下步骤:
|
||||
|
||||
* 按下空格和 “OK” 选择 apache(强制)。
|
||||
* 在 dbconfig-common 选择“Yes”,配置 phpMyAdmin 的数据库。
|
||||
* 输入想设置的密码,按下 “OK”。
|
||||
* 再次输入 phpMyAdmin 密码来确认,按下 “OK”。
|
||||
|
||||
为 phpMyAdmin 用户添加数据库权限来管理数据库:
|
||||
|
||||
我们用 root 用户连接 MariaDB(默认没有密码)来设置权限。
|
||||
|
||||
```
|
||||
sudo mysql -uroot -p
|
||||
grant all privileges on *.* to 'phpmyadmin'@'localhost';
|
||||
flush privileges;
|
||||
quit
|
||||
```
|
||||
|
||||
最后,重启 Apache 服务:
|
||||
|
||||
```
|
||||
sudo systemctl restart apache2.service
|
||||
```
|
||||
|
||||
在浏览器输入 `http://<<YouRpiIPAddress>>/phpmyadmin/` 来检查 phpMyAdmin 是否正常:
|
||||
|
||||
![][7]
|
||||
|
||||
默认的 phpMyAdmin 登录凭证:
|
||||
|
||||
* 用户名:`phpmyadmin`
|
||||
* 密码:在 phpMyAdmin 安装步骤中你设置的密码
|
||||
|
||||
#### 3、安装 OSSN 所需的其他包和配置 PHP
|
||||
|
||||
在第一次配置 OSSN 前,我们还需要在系统上安装一些所需的包:
|
||||
|
||||
* PHP 版本 5.6、7.0 或 7.1
|
||||
* MYSQL 5 及以上
|
||||
* APACHE
|
||||
* MOD_REWRITE
|
||||
* 需要打开 PHP 扩展 cURL 和 Mcrypt
|
||||
* PHP GD 扩展
|
||||
* PHP ZIP 扩展
|
||||
* 打开 PHP 设置 `allow_url_fopen`
|
||||
* PHP JSON 支持
|
||||
* PHP XML 支持
|
||||
* PHP OpenSSL
|
||||
|
||||
在终端输入以下命令来安装上述包:
|
||||
|
||||
```
|
||||
sudo apt-get install php7.3-curl php7.3-gd php7.3-zip php7.3-json php7.3-xml
|
||||
```
|
||||
|
||||
打开 mod_rewrite:
|
||||
|
||||
```
|
||||
sudo a2enmod rewrite
|
||||
```
|
||||
|
||||
修改默认的 Apache 配置,使用 mod_rewrite:
|
||||
|
||||
```
|
||||
sudo nano /etc/apache2/sites-available/000-default.conf
|
||||
```
|
||||
|
||||
在 `000-default.conf` 文件中添加下面的内容:
|
||||
|
||||
```ini
|
||||
<VirtualHost *:80>
|
||||
ServerAdmin webmaster@localhost
|
||||
DocumentRoot /var/www/html
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
# 需要添加的部分开始 --------------------------------
|
||||
<Directory /var/www/html>
|
||||
Options Indexes FollowSymLinks MultiViews
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
# 需要添加的部分结束 --------------------------------
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
安装 Mcrypt:
|
||||
|
||||
```bash
|
||||
sudo apt install php-dev libmcrypt-dev php-pear
|
||||
sudo pecl channel-update pecl.php.net
|
||||
sudo pecl install mcrypt-1.0.2
|
||||
```
|
||||
|
||||
打开 Mcrypt 模块:
|
||||
|
||||
在 `/etc/php/7.3/apache2/php.ini` 文件中 `extension=mcrypt.so`(或取消注释):
|
||||
|
||||
```bash
|
||||
sudo nano /etc/php/7.3/apache2/php.ini
|
||||
```
|
||||
|
||||
`allow_url_fopen` 应该已经在 `/etc/php/7.3/apache2/php.ini` 文件中打开了。OpenSSL 应该在 php7.3 中安装了。
|
||||
|
||||
我建议的另一个设置是把 PHP 最大上传文件数修改为 16 MB:
|
||||
|
||||
```
|
||||
sudo nano /etc/php/7.3/apache2/php.ini
|
||||
```
|
||||
|
||||
搜索到 `upload_max_filesize` 所在的行,参照下面的设置:
|
||||
|
||||
```
|
||||
upload_max_filesize = 16M
|
||||
```
|
||||
|
||||
保存并退出,重启 Apache:
|
||||
|
||||
```
|
||||
sudo systemctl restart apache2.service
|
||||
```
|
||||
|
||||
#### 4、安装 OSSN
|
||||
|
||||
##### 创建数据库,设置用户
|
||||
|
||||
回到 phpmyadmin web 页面(浏览器输入 `http://<<YouRpiIPAddress>>/phpmyadmin/`)并登录:
|
||||
|
||||
- 用户名: `phpmyadmin`
|
||||
- 密码:在 phpMyAdmin 安装步骤中你设置的密码
|
||||
|
||||
点击数据库标签页:
|
||||
|
||||
![][8]
|
||||
|
||||
创建一个数据库,记下数据库的名字,因为在之后的安装过程中,你要手动输入它。
|
||||
|
||||
![][9]
|
||||
|
||||
现在为 OSSN 创建一个数据库用户,我使用下面的凭证:
|
||||
|
||||
- 用户名: `ossn_db_user`
|
||||
- 密码: `ossn_db_password`
|
||||
|
||||
在终端输入下面的命令(如果你没有修改过密码,root 密码应该仍然是空):
|
||||
|
||||
```bash
|
||||
sudo mysql -uroot -p
|
||||
CREATE USER 'ossn_db_user'@'localhost' IDENTIFIED BY 'ossn_db_password';
|
||||
GRANT ALL PRIVILEGES ON ossn_db.* TO 'ossn_db_user'@'localhost';
|
||||
flush privileges;
|
||||
quit
|
||||
```
|
||||
|
||||
##### 安装 OSSN 软件
|
||||
|
||||
在你 PC 上从 [OSSN 下载页面][10] 下载 OSSN 安装压缩文件,保存为文件 `ossn-v5.2-1577836800.zip`。
|
||||
|
||||
使用你习惯的 SFTP 软件把整个压缩文件通过 SFTP 传到树莓派的新目录 `/home/pi/download` 下。常用的(默认)SFP 连接参数是:
|
||||
|
||||
* 主机:你树莓派的 IP 地址
|
||||
* 用户名:`pi`
|
||||
* 密码:raspberry(如果没有修改过默认密码)
|
||||
* 端口: 22
|
||||
|
||||
在终端输入:
|
||||
|
||||
```bash
|
||||
cd /home/pi/download/ # 进入上传的 OSSN 安装文件的目录。
|
||||
unzip ossn-v5.2-1577836800.zip # 从压缩包中提取所有文件
|
||||
cd /var/www/html/ # 进入 Apache Web 目录
|
||||
sudo rm index.html # 删除 Apache 默认页面 - 我们将使用 OSSN
|
||||
sudo cp -R /home/pi/download/ossn-v5.2-1577836800/* ./ #Copy installation files to web directory
|
||||
sudo chown -R www-data:www-data ./
|
||||
```
|
||||
|
||||
创建数据文件夹:OSSN 需要一个文件夹来存放数据。出于安全目的,OSSN 建议这个文件夹创建在公开文档根目录之外。所以,我们在 `/opt` 下创建。
|
||||
|
||||
```bash
|
||||
sudo mkdir /opt/ossn_data
|
||||
sudo chown -R www-data:www-data /opt/ossn_data/
|
||||
```
|
||||
|
||||
在浏览器输入 `http://<<YourRpiIPAddress>>` 来开始安装向导。
|
||||
|
||||
![][11]
|
||||
|
||||
所有项都检查完后,点击页面最下面的下一步按钮。
|
||||
|
||||
![][12]
|
||||
|
||||
阅读证书验证并点击页面最下面的下一步按钮来接受证书。
|
||||
|
||||
![][13]
|
||||
|
||||
输入数据库用户名,密码和你选择的数据库名字,记得也要输入 OSSN 数据文件夹名称。点击安装。
|
||||
|
||||
![][14]
|
||||
|
||||
输入你的管理员账号信息,点击创建按钮。
|
||||
|
||||
![][15]
|
||||
|
||||
现在所有的工作应该都完成了。点击结束,进入管理员首页。
|
||||
|
||||
![][16]
|
||||
|
||||
你可以通过 URL `http://<<YourRpiIPAddress>>/administrator` 进入管理员控制面板,普通用户可以访问链接是 `http://<<YourRpiIPAddress>>`。
|
||||
|
||||
![][17]
|
||||
|
||||
本文首发在 [peppe8o.com][18]。已获得转载授权。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/3/raspberry-pi-open-source-social
|
||||
|
||||
作者:[Giuseppe Cassibba][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/peppe8o
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/team_global_people_gis_location.png?itok=Rl2IKo12 (Team of people around the world)
|
||||
[2]: https://peppe8o.com/2019/04/best-raspberry-pi-projects-with-open-source-software/
|
||||
[3]: https://www.opensource-socialnetwork.org/
|
||||
[4]: https://filezilla-project.org/
|
||||
[5]: https://peppe8o.com/2019/07/install-raspbian-buster-lite-in-your-raspberry-pi/
|
||||
[6]: https://opensource.com/sites/default/files/uploads/ossn_1_0.jpg
|
||||
[7]: https://opensource.com/sites/default/files/uploads/ossn_2.jpg
|
||||
[8]: https://opensource.com/sites/default/files/uploads/ossn_3.jpg
|
||||
[9]: https://opensource.com/sites/default/files/uploads/ossn_4.jpg
|
||||
[10]: https://www.opensource-socialnetwork.org/download
|
||||
[11]: https://opensource.com/sites/default/files/uploads/ossn_5.jpg
|
||||
[12]: https://opensource.com/sites/default/files/uploads/ossn_6.jpg
|
||||
[13]: https://opensource.com/sites/default/files/uploads/ossn_7.jpg
|
||||
[14]: https://opensource.com/sites/default/files/uploads/ossn_8.jpg
|
||||
[15]: https://opensource.com/sites/default/files/uploads/ossn_9.jpg
|
||||
[16]: https://opensource.com/sites/default/files/uploads/ossn_10.jpg
|
||||
[17]: https://opensource.com/sites/default/files/uploads/ossn_11.jpg
|
||||
[18]: https://peppe8o.com/private-social-network-with-raspberry-pi-and-opensource-social-network/
|
@ -1,47 +1,47 @@
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "tinyeyeser "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: translator: "tinyeyeser"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-12103-1.html"
|
||||
[#]: subject: "Control the firewall at the command line"
|
||||
[#]: via: "https://fedoramagazine.org/control-the-firewall-at-the-command-line/"
|
||||
[#]: author: "Paul W. Frields https://fedoramagazine.org/author/pfrields/"
|
||||
|
||||
命令行下玩转防火墙(Fedora)
|
||||
在 Fedora 命令行下玩转防火墙
|
||||
======
|
||||
|
||||
![][1]
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/12/123040ghxuicphyhsoppch.jpg)
|
||||
|
||||
网络防火墙,顾名思义:为了阻止不需要的网络连接而设置的防护性屏障。在与外界建立连接或是提供网络服务时常常会用到。例如,在学校或是咖啡厅里使用笔记本电脑时,你一定不想某个陌生人窥探你的电脑。
|
||||
|
||||
每个 Fedora 系统都内置了一款防火墙。这是 Linux 内核网络功能的一部分。本文介绍如何通过 *firewall-cmd* 命令修改防火墙的配置。
|
||||
每个 Fedora 系统都内置了一款防火墙。这是 Linux 内核网络功能的一部分。本文介绍如何通过 `firewall-cmd` 命令修改防火墙的配置。
|
||||
|
||||
### 网络基础
|
||||
|
||||
本文并不教授计算机网络的[所有知识][2],但还是会简单介绍一些网络基础。
|
||||
|
||||
网络中的所有计算机都有一个 *IP 地址*,可以把它想象成一个邮箱地址,有了邮箱地址,邮件才知道发往何处。每台计算机还会拥有一组*端口*,端口号范围从0到65535。同样的,你可以把这些端口想象成用来连接邮箱地址的连接点。
|
||||
网络中的所有计算机都有一个 *IP 地址*,可以把它想象成一个邮箱地址,有了邮箱地址,邮件才知道发往何处。每台计算机还会拥有一组*端口*,端口号范围从 0 到 65535。同样的,你可以把这些端口想象成用来连接邮箱地址的连接点。
|
||||
|
||||
通常情况下,端口会是一个标准端口号或是根据应用程序的应答要求选定的一个端口范围。例如,一台 web server 通常会保留 80 端口用于 HTTP 通信,443 端口用于 HTTPS。小于1024的端口主要用于系统或常见用途,1024-49151端口用于注册,49152及以上端口多为临时使用(只短时间启用)。
|
||||
通常情况下,端口会是一个标准端口号或是根据应用程序的应答要求选定的一个端口范围。例如,一台 Web 服务器通常会保留 80 端口用于 HTTP 通信,443 端口用于 HTTPS。小于 1024 的端口主要用于系统或常见用途,1024-49151 端口是已经注册的,49152 及以上端口多为临时使用(只限短时间使用)。
|
||||
|
||||
互联网传输中最常见的两个协议,[TCP][4] 和 [UDP][5]。当要传输的数据很重要,不能有丢包时,就使用TCP协议,如果数据包没有按顺序到达,还需要重组为正确的顺序。UDP协议则更多用于对时间敏感的服务,为了保证时效性,有时允许丢失部分数据。
|
||||
互联网传输中最常见的两个协议,[TCP][4] 和 [UDP][5]。当要传输的数据很重要,不能有丢包时,就使用 TCP 协议,如果数据包没有按顺序到达,还需要重组为正确的顺序。UDP 协议则更多用于对时间敏感的服务,为了保证时效性,有时允许丢失部分数据。
|
||||
|
||||
系统中运行的应用,例如 web server,会保留一些端口(例如上文提到的80和443)。在网络传输过程中,主机会为传输的两端建立一个链接,一端是源地址和源端口,另一端是目的地址和目的端口。
|
||||
系统中运行的应用,例如 Web 服务器,会保留一些端口(例如上文提到的 80 和 443)。在网络传输过程中,主机会为传输的两端建立一个链接,一端是源地址和源端口,另一端是目的地址和目的端口。
|
||||
|
||||
网络防火墙就是基于地址、端口及其他标准的一组规则集,来对网络数据的传输进行屏蔽或阻断的。通过 *fire-cmd* 命令,我们就可以查看或修改防火墙的工作配置。
|
||||
网络防火墙就是基于地址、端口及其他标准的一组规则集,来对网络数据的传输进行屏蔽或阻断的。通过 `firewall-cmd` 命令,我们就可以查看或修改防火墙的工作配置。
|
||||
|
||||
### 防火墙域(zone)
|
||||
|
||||
为了验证防火墙是否开启,使用 *firewall-cmd* 命令,输入时要加上[sudo](https://fedoramagazine.org/howto-use-sudo/)。(通常,在运行了[PolicyKit](https://en.wikipedia.org/wiki/Polkit)的环境中,你也可以不加 *sudo*)
|
||||
为了验证防火墙是否开启,使用 `firewall-cmd` 命令,输入时要加上 [sudo](https://fedoramagazine.org/howto-use-sudo/)。(通常,在运行了 [PolicyKit](https://en.wikipedia.org/wiki/Polkit) 的环境中,你也可以不加 `sudo`)
|
||||
|
||||
```
|
||||
$ sudo firewall-cmd --state
|
||||
running
|
||||
```
|
||||
|
||||
firewalld 服务支持任意数量的域。每个域都可以拥有独立的配置和防护规则。一台 Fedora 工作站的外部接口(例如 WIFI 或有线网卡)其默认域为 *FedoraWorkstation*。
|
||||
firewalld 服务支持任意数量的域。每个域都可以拥有独立的配置和防护规则。一台 Fedora 工作站的外部接口(例如 WIFI 或有线网卡)其默认域为 `FedoraWorkstation`。
|
||||
|
||||
要看有哪些域是激活状态,可以使用 *–get-active-zones* 选项。在本示例中,有两个网卡,有线以太网卡 *wlp2s0* 和虚拟( libvirt )桥接网卡 *virbr0* :
|
||||
要看有哪些域是激活状态,可以使用 `-–get-active-zones` 选项。在本示例中,有两个网卡,有线以太网卡 `wlp2s0` 和虚拟(libvirt)桥接网卡 `virbr0`:
|
||||
|
||||
```
|
||||
$ sudo firewall-cmd --get-active-zones
|
||||
@ -60,58 +60,54 @@ $ sudo firewall-cmd --get-zones
|
||||
FedoraServer FedoraWorkstation block dmz drop external home internal libvirt public trusted work
|
||||
```
|
||||
|
||||
查询默认域中防火墙放行了哪些系统,使用 *–list-services* 选项。下例给出了一个定制系统的查询结果,你可以看到与常见的结果有些不同。
|
||||
查询默认域中防火墙放行了哪些系统,使用 `-–list-services` 选项。下例给出了一个定制系统的查询结果,你可以看到与常见的结果有些不同。
|
||||
|
||||
```
|
||||
$ sudo firewall-cmd --list-services
|
||||
dhcpv6-client mdns samba-client ssh
|
||||
```
|
||||
|
||||
该系统对外开启了四个服务。每个服务都对应一个常见端口。例如 *ssh* 服务对应 22 端口。
|
||||
该系统对外开启了四个服务。每个服务都对应一个常见端口。例如 `ssh` 服务对应 22 端口。
|
||||
|
||||
如果要查看当前域中防火墙还开启了哪些端口,可以使用 *list-ports* 选项。当然,你也可以随时对其他域进行查询:
|
||||
如果要查看当前域中防火墙还开启了哪些端口,可以使用 `--list-ports` 选项。当然,你也可以随时对其他域进行查询:
|
||||
|
||||
```
|
||||
$ sudo firewall-cmd --list-ports --zone=FedoraWorkstation
|
||||
1025-65535/udp 1025-65535/tcp
|
||||
```
|
||||
|
||||
结果表明,从 1025 到 65535 端口(包含UDP和TCP)默认都是开启的。
|
||||
结果表明,从 1025 到 65535 端口(包含 UDP 和 TCP)默认都是开启的。
|
||||
|
||||
### 修改域、端口及服务
|
||||
|
||||
以上的配置都是预先设计好的防火墙策略(design decision*)。是为了确保新手用户安装的应用都能够正常访问网络。如果你确定自己心里有数,想要一个保护性更强的策略,可以将接口放入 _FedoraServer_ 域,明确禁止所有端口的访问。_(**警告**:如果你的服务器之前是联网状态,这么做可能会导致连接中断,那你就得到机房里去修改更多的配置项!)_
|
||||
以上的配置都是预先设计好的防火墙策略。是为了确保新手用户安装的应用都能够正常访问网络。如果你确定自己心里有数,想要一个保护性更强的策略,可以将接口放入 `FedoraServer` 域,明确禁止所有端口的访问。(**警告**:如果你的服务器之前是联网状态,这么做可能会导致连接中断,那你就得到机房里去修改更多的配置项!)
|
||||
|
||||
```
|
||||
$ sudo firewall-cmd --change-interface=<ifname> --zone=FedoraServer
|
||||
success
|
||||
```
|
||||
|
||||
* _*本文并不讨论如何制定防火墙策略,Fedora社区里已经有很多讨论了。你大可以按照自身需要来修改配置。_
|
||||
**本文并不讨论如何制定防火墙策略,Fedora 社区里已经有很多讨论了。你大可以按照自身需要来修改配置。**
|
||||
|
||||
如果你想要开放某个服务的常见端口,可以将该服务加入默认域(或使用 _-zone_ 指定一个不同的域)。还可以一次性将其加入多个域。下例开放了 HTTP 和 HTTPS 的常见端口80、443:
|
||||
如果你想要开放某个服务的常见端口,可以将该服务加入默认域(或使用 `--zone` 指定一个不同的域)。还可以一次性将其加入多个域。下例开放了 HTTP 和 HTTPS 的常见端口 80、443:
|
||||
|
||||
```
|
||||
$ sudo firewall-cmd --add-service=http --add-service=https
|
||||
success
|
||||
```
|
||||
|
||||
并非所有的服务都有默认端口,不过大部分都是有的。使用 _–get-services_ 选项可以查看完整列表。
|
||||
并非所有的服务都有默认端口,不过大部分都是有的。使用 `-–get-services` 选项可以查看完整列表。
|
||||
|
||||
如果你想指定某个特定端口号,可以直接用数字和协议进行配置。(多数情况下,_–add-service_ 和 _–add-port_ 这两个选项是合在一起使用的)下例开启的是UDP协议的网络启动服务:
|
||||
如果你想指定某个特定端口号,可以直接用数字和协议进行配置。(多数情况下,`-–add-service` 和 `-–add-port` 这两个选项是合在一起使用的)下例开启的是 UDP 协议的网络启动服务:
|
||||
|
||||
```
|
||||
$ sudo firewall-cmd --add-port=67/udp
|
||||
success
|
||||
```
|
||||
|
||||
**重要**:如果想要在系统重启或是 firewalld 服务重启后,配置仍然生效,**必须**在命令中加上 _–permanent_ 选项。本文中的例子只是临时修改了配置,下次遇到系统重启或是 firewalld 服务重启,这些配置就失效了。
|
||||
**重要**:如果想要在系统重启或是 firewalld 服务重启后,配置仍然生效,**必须**在命令中加上 `-–permanent` 选项。本文中的例子只是临时修改了配置,下次遇到系统重启或是 firewalld 服务重启,这些配置就失效了。
|
||||
|
||||
以上只是 _firewall-cmd_ 和 firewalld 服务诸多功能中的一小部分。firewalld 项目的[主页][8]还有更多信息值得你去探索和尝试。
|
||||
|
||||
* * *
|
||||
|
||||
_Photo by [Jakob Braun][9] on [Unsplash][10]._
|
||||
以上只是 `firewall-cmd` 和 firewalld 服务诸多功能中的一小部分。firewalld 项目的[主页][8]还有更多信息值得你去探索和尝试。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -120,7 +116,7 @@ via: https://fedoramagazine.org/control-the-firewall-at-the-command-line/
|
||||
作者:[Paul W. Frields][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[tinyeyeser](https://github.com/tinyeyeser)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,98 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12116-1.html)
|
||||
[#]: subject: (Build a private chat server with a Raspberry Pi and Rocket.Chat)
|
||||
[#]: via: (https://opensource.com/article/20/3/raspberry-pi-rocketchat)
|
||||
[#]: author: (Giuseppe Cassibba https://opensource.com/users/peppe8o)
|
||||
|
||||
使用树莓派和 Rocket.Chat 构建一个私人聊天服务器
|
||||
======
|
||||
|
||||
> 使用这些简单、经济高效的开源工具构建自己真正的私人聊天和消息解决方案。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/16/203055g5r5w7ei8eenw1ex.jpg)
|
||||
|
||||
互联网提供了大量免费的消息服务。像 WhatsApp 和 Viber 这样的应用已经是我们日常生活的一部分,也是我们与亲朋好友沟通的最常见方式。但是,安全意识的提高,让人们对真正的私密聊天解决方案的需求越来越大。此外,消息类应用在我们的设备中占用了大量空间,因此一个备用聊天渠道可能对于我们与朋友分享媒体、信息和联系人很有作用。
|
||||
|
||||
今天,我们将了解如何使用[树莓派][2]和 Rocket.Chat 安装一个私人聊天和消息服务器。
|
||||
|
||||
### 什么是 Rocket.Chat?
|
||||
|
||||
[Rocket.Chat][3] 是一个开源解决方案,它提供了一个增强的聊天服务。它包括媒体共享、屏幕共享和视频/音频呼叫支持等协作工具。
|
||||
|
||||
它可以通过浏览器或从所有主要应用商店(Google Play、App Store 等)下载使用。
|
||||
|
||||
除了社区版本外,Rocket.Chat 还提供企业版和专业版,包括支持和其他附加功能。
|
||||
|
||||
### 我们需要什么
|
||||
|
||||
对于这个项目,我将使用更便宜的树莓派 3A+。树莓派 3B 和 3B+ 以及树莓派 4B 应该也可以用同样的方法。
|
||||
|
||||
我也建议使用一块高性能 SD 卡,因为 Rocket.Chat 会给树莓派带来很大的负载。如其他文章中所述,高性能 SD 卡可显著提高 Raspbian 操作系统的性能。
|
||||
|
||||
我们将使用 Raspbian 的精简版本,拥有预配置的 WiFi 访问和 SSH 服务,因此不需要键盘或 HDMI 线缆。
|
||||
|
||||
### 分步过程
|
||||
|
||||
从[安装最新版本的 Raspbian Buster Lite][5] 开始。
|
||||
|
||||
我们将使用 [Snap][6] 简化 Rocket.Chat 安装。通过 SSH 登录并从终端输入:
|
||||
|
||||
```
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade
|
||||
```
|
||||
|
||||
安装 Snap:
|
||||
|
||||
```
|
||||
sudo apt-get install snapd
|
||||
```
|
||||
|
||||
安装 Snap 后,我们需要重启系统使其正常工作:
|
||||
|
||||
```
|
||||
sudo reboot
|
||||
```
|
||||
|
||||
再次通过 SSH 登录,并用以下简单的命令安装 Rocket.Chat:
|
||||
|
||||
```
|
||||
sudo snap install rocketchat-server
|
||||
```
|
||||
|
||||
从终端安装后,请等待一段时间,让 Rocket.Chat 初始化数据库和服务。休息一下,几分钟后,你应该能够在浏览器中访问 `http://<<YOUR_RPI_IP_ADDRESS>>:3000`,你应该看到以下内容:
|
||||
|
||||
![Rocket Chat setup wizard][7]
|
||||
|
||||
填写所需的表单就可以了。经过四个简单的设置窗口后,你应该会进入 Rocket.Chat 主页:
|
||||
|
||||
![Rocket Chat home page][8]
|
||||
|
||||
享受吧!
|
||||
|
||||
本文最初发表在 [peppe8o.com][9],并获许重新发布。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/3/raspberry-pi-rocketchat
|
||||
|
||||
作者:[Giuseppe Cassibba][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/peppe8o
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/email_chat_communication_message.png?itok=LKjiLnQu (Chat via email)
|
||||
[2]: https://opensource.com/resources/raspberry-pi
|
||||
[3]: https://rocket.chat/
|
||||
[5]: https://peppe8o.com/2019/07/install-raspbian-buster-lite-in-your-raspberry-pi/
|
||||
[6]: https://snapcraft.io/
|
||||
[7]: https://opensource.com/sites/default/files/uploads/rocket-chat-setup-wizard.jpg (Rocket Chat setup wizard)
|
||||
[8]: https://opensource.com/sites/default/files/uploads/rocket-chat-home.jpg (Rocket Chat home page)
|
||||
[9]: https://peppe8o.com/private-chat-and-messaging-server-with-raspberry-pi-and-rocket-chat/
|
@ -0,0 +1,182 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (messon007)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12093-1.html)
|
||||
[#]: subject: (The Keyring Concept in Ubuntu: What is It and How to Use it?)
|
||||
[#]: via: (https://itsfoss.com/ubuntu-keyring/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
解读 Ubuntu 里的密钥环概念
|
||||
======
|
||||
|
||||
![][3]
|
||||
|
||||
如果你用过 Ubuntu 或者其他的 Linux 发行版里的[自动登录功能][1], 你可能遇到过这种弹出消息:
|
||||
|
||||
> 请输入密码以解锁你的登录密钥环
|
||||
>
|
||||
> 登录密钥环在你登录系统时未解锁。
|
||||
|
||||
![Enter Password To Unlock Your Login Keyring Ubuntu][2]
|
||||
|
||||
如果你一直点击取消,它会不断弹出几次才会消失。你可能想知道,为什么你会一直看到这个密钥环信息呢?
|
||||
|
||||
让我来告诉你吧。它其实不是错误,而是一个安全特性。
|
||||
|
||||
奇怪吗?下面就让我来解释下 Linux 里的密钥环概念。
|
||||
|
||||
### Linux 里的密钥环是什么。为什么需要它?
|
||||
|
||||
在现实生活中你为什么要用钥匙环(也叫[钥匙链][4])?你用它把一把或多把钥匙串到一起, 以便于携带和查找。
|
||||
|
||||
Linux 里也是类似的。密钥环特性使你的系统可以将各种密码放在一起,并将其保存在一个地方。
|
||||
|
||||
大多数 Linux 桌面环境,如 GNOME、KDE、Xfce 等采用 [GNOME 密钥环][5]来提供这个功能。
|
||||
|
||||
该密钥环保存了 ssh 密钥、GPG 密钥以及使用此功能的应用程序(例如 Chromium 浏览器)的密钥。默认情况下,**“密钥环”通过主密码来保护**,该密码通常是帐户的登录密码。
|
||||
|
||||
系统上的每个用户都有自己的密钥环,(通常)密码与用户帐户本身的密码相同。当你使用密码登录系统时,你的密匙环将使用你帐户的密码自动解锁。
|
||||
|
||||
当你[启用 Ubuntu 中的自动登录功能时][1]时,就有问题了。这意味着你无需输入密码即可登录系统。在这种情况下,你的密钥环不会自动解锁。
|
||||
|
||||
#### 密钥环是一个安全特性
|
||||
|
||||
记得我说过密钥环是一个安全特性吗?现在想象一下你在 Linux 电脑上开启了自动登录功能。有权访问你电脑的任何人无需密码就能进入你的系统。但是你可能不会在意,因为你只是用它来访问互联网。
|
||||
|
||||
但是,如果你在 Ubuntu 中使用 Chromium 或 [Google Chrome][6] 之类的浏览器,并使用它来保存各种网站的登录密码,那么你将遇到麻烦。任何人都可以使用浏览器并利用你在浏览器中保存的密码登录网站。这不很危险吗?
|
||||
|
||||
这就是为什么当你使用 Chrome 时,它将反复地提示你先解锁密钥环。这确保了只有知道密钥环密码(即账户密码)的人才能使用在浏览器中保存的密码来登录它们相关的网站。
|
||||
|
||||
如果你反复取消解锁密钥环的提示,它最终将消失,并允许你使用浏览器。但是,保存的密码将不会被解锁,你在 Chromium/Chome 浏览器上将会看到“同步暂停”的提示。
|
||||
|
||||
![Sync paused in Google Chrome][7]
|
||||
|
||||
#### 如果密钥环一直存在,为什么你从来没有见过它呢?
|
||||
|
||||
如果你在你的 Linux 系统上从没见过它的话,这个问题就很有道理。
|
||||
|
||||
如果你从没有用过自动登录功能(或者修改你的账户密码),你可能都没有意识到这个特性的存在。
|
||||
|
||||
这是因为当你通过你的密码登录系统时,你的密钥环被你的账户密码自动解锁了。
|
||||
|
||||
Ubuntu(和其他发行版)在执行普通的管理任务如修改用户、安装新软件等需要输入密码,无论你是否是自动登录的。但是对于日常任务像使用浏览器,它不需要输入密码因为密钥环已经被解锁了。
|
||||
|
||||
当你切换到自动登录时,你不再需要输入登录密码。这意味着密钥环没有被自动解锁,因此当你使用利用了密钥环特性的浏览器时,它将提示你来解锁密钥环。
|
||||
|
||||
#### 你可以轻松地管理密钥环和密码
|
||||
|
||||
这个密钥环放在哪里?它的核心是一个守护任务(一个后台自动运行的程序)。
|
||||
|
||||
别担心。你不必通过终端来操作守护任务。大多数桌面环境都自带一个可以和这个守护进程进行交互的图形化应用程序。KDE 上有 KDE 钱包,GNOME 和其他桌面上叫做“密码和密钥”(之前叫 [Seahorse][8])。
|
||||
|
||||
![Password And Keys App in Ubuntu][9]
|
||||
|
||||
你可以用这个 GUI 程序来查看哪些应用程序在用密钥环来管理/保护密码。
|
||||
|
||||
你可以看到,我的系统有自动创建的登录密钥环。也有一个存储 GPG 和 SSH 密钥的密钥环。那个[证书][10]用来保存证书机构颁发的证书(如 HTTPS 证书)。
|
||||
|
||||
![Password and Keys application in Ubuntu][11]
|
||||
|
||||
你也可以使用这个应用程序来手动保存网站的密码。例如,我创建了一个新的叫做“Test”的被密码保护的密钥环,并手动存储了一个密码。
|
||||
|
||||
这比在一个文本文件中保存一批密码要好一些。至少在这种情况下,你的密码只有在你通过密码解锁了密钥环时才允许被看到。
|
||||
|
||||
![Saving New Password Seahorse][12]
|
||||
|
||||
这里有一个潜在的问题,如果你格式化你的系统,手动保存的密码必然会丢失。通常,你会备份你的个人文件,但并不是所有的用户特定数据,如密钥环文件。
|
||||
|
||||
有一种办法能解决它。密钥环数据通常保存在 `~/.local/share/keyrings` 目录。在这里你可以看到所有的密钥环,但是你不能直接看到它们的内容。如果你移除密钥环的密码(我会在这篇文章的后面描述操作步骤),你可以像一个普通的文本文件一样读取密钥环的内容。你可以将这个解锁后的密钥环文件完整地复制下来,并在其他的 Linux 机器上运行“密码和密钥”应用程序导入到其中。
|
||||
|
||||
总结一下目前为止所学的内容:
|
||||
|
||||
* 大多数 Linux 系统缺省已经安装并激活了密钥环特性
|
||||
* 系统上的每个用户都拥有他自己的密钥环
|
||||
* 密钥环通常是用账户密码锁定的(保护)
|
||||
* 当你通过密码登录时密钥环会被自动解锁
|
||||
* 对于自动登录,密钥环不会自动解锁,因此当你试图使用依赖密钥环的应用程序时会被提示先解锁它
|
||||
* 并不是所有的浏览器或应用程序利用了密钥环特性
|
||||
* (Linux 上)安装一个 GUI 程序可以和密钥环交互
|
||||
* 你可以用密钥环来手动存储加密格式的密码
|
||||
* 你可以自己修改密钥环密码
|
||||
* 你可以通过导出(需要先解锁密钥环)并导入到其他计算机上的方式来获取手工保存的密码。
|
||||
|
||||
### 修改密钥环密码
|
||||
|
||||
假设你修改了你的账户密码。当你登录时,你的系统试图通过新的登录密码来自动解锁密钥环。但是密钥环还在使用老的登录密码。
|
||||
|
||||
这种情况下,你可以修改密钥环密码为新的登录密码,这样密码环才能在你登录系统时自动解锁。
|
||||
|
||||
从菜单中打开“密码和密钥”应用程序:
|
||||
|
||||
![Look for Password and Keys app in the menu][9]
|
||||
|
||||
在“Login”密钥环上右击并点击“修改密码”:
|
||||
|
||||
![Change Keyring Password][13]
|
||||
|
||||
#### 如果你不记得老的登录密码怎么办?
|
||||
|
||||
你可能知道在 [Ubuntu 上重置忘记的密码很容易][14]。但是密钥环在这种场景下还是有问题。你修改了账户密码,但是你不记得仍然被密钥环使用的老的账户密码。
|
||||
|
||||
你不能修改它因为你不知道老的密码。怎么办?
|
||||
|
||||
这种情况下,你将不得不移除整个密钥环。你可以通过“密码和密钥”应用程序来操作:
|
||||
|
||||
![Delete Keyring Ubuntu][15]
|
||||
|
||||
它会提示你进行确认:
|
||||
|
||||
![Delete Keyring][16]
|
||||
|
||||
另外,你也可以手动删除 `~/.local/share/keyrings` 目录下的密钥环文件。
|
||||
|
||||
老的密钥环文件被移除后,你再打开 Chrome/Chromium 时,它会提示你创建一个新的密钥环。
|
||||
|
||||
![New Keyring Password][17]
|
||||
|
||||
你可以用新的登录密码,密钥环就会被自动解锁了。
|
||||
|
||||
### 禁用密钥环密码
|
||||
|
||||
在你想用自动登录但又不想手动解锁密钥环时,你可以把禁用密钥环密码作为一个规避方法。记住你正在禁用一个安全特性,因此请三思。
|
||||
|
||||
操作步骤和修改密钥环相似。打开“密码和密钥”应用程序,然后修改密钥环密码。
|
||||
|
||||
技巧在于当它提示修改密码时,不要输入新密码,而是点击“继续”按钮。这将移除密钥环的密码。
|
||||
|
||||
![Disable Keyring password by not setting any password at all][18]
|
||||
|
||||
这种方法,密钥环没有密码保护,并将一直处于解锁状态。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/ubuntu-keyring/
|
||||
|
||||
作者:[Abhishek Prakash][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://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/ubuntu-automatic-logon/
|
||||
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/enter-password-to-unlock-your-login-keyring-ubuntu.jpg?ssl=1
|
||||
[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/keyring-concept-ubuntu-1.png?ssl=1
|
||||
[4]: https://en.wikipedia.org/wiki/Keychain
|
||||
[5]: https://wiki.archlinux.org/index.php/GNOME/Keyring
|
||||
[6]: https://itsfoss.com/install-chrome-ubuntu/
|
||||
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/sync-paused-keyring-ubuntu.jpg?ssl=1
|
||||
[8]: https://wiki.debian.org/Seahorse
|
||||
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/password-and-keys-app-ubuntu.jpg?ssl=1
|
||||
[10]: https://help.ubuntu.com/lts/serverguide/certificates-and-security.html
|
||||
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/keyring-pasword-ubuntu.png?ssl=1
|
||||
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/saving-new-password-seahorse.png?ssl=1
|
||||
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/change-keyring-password.png?ssl=1
|
||||
[14]: https://itsfoss.com/how-to-hack-ubuntu-password/
|
||||
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/delete-keyring-ubuntu.jpg?ssl=1
|
||||
[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/delete-keyring.jpg?ssl=1
|
||||
[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/new-keyring-password.jpg?ssl=1
|
||||
[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/disable-keyring-password-ubuntu.png?ssl=1
|
@ -1,22 +1,22 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12099-1.html)
|
||||
[#]: subject: (Using data from spreadsheets in Fedora with Python)
|
||||
[#]: via: (https://fedoramagazine.org/using-data-from-spreadsheets-in-fedora-with-python/)
|
||||
[#]: author: (Paul W. Frields https://fedoramagazine.org/author/pfrields/)
|
||||
|
||||
在 Fedora 中使用 Python 读取电子表格中的数据
|
||||
使用 Python 读取电子表格中的数据
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
[Python][2] 是最流行、功能最强大的编程语言之一。由于它是免费和开源的,因此每个人都可以使用。大多数 Fedora 系统都已安装了该语言。Python 可用于多种任务,其中包括处理逗号分隔值(**CSV**)数据。CSV 文件通常作为表格启动。本文介绍了如何在 Python 3 中处理 CSV 数据。
|
||||
[Python][2] 是最流行、功能最强大的编程语言之一。由于它是自由开源的,因此每个人都可以使用。大多数 Fedora 系统都已安装了该语言。Python 可用于多种任务,其中包括处理逗号分隔值(CSV)数据。CSV文件一开始往往是以表格或电子表格的形式出现。本文介绍了如何在 Python 3 中处理 CSV 数据。
|
||||
|
||||
CSV 数据正是它听起来的样子。CSV 文件一次包含一行数据,数值之间用逗号分隔。每行由相同的_字段_定义。简短的 CSV 文件通常易于阅读和理解。但是较长的数据或具有更多字段的数据文件可能很难用肉眼解析,因此在这种情况下计算机做得更好。
|
||||
CSV 数据正如其名。CSV 文件按行放置数据,数值之间用逗号分隔。每行由相同的*字段*定义。简短的 CSV 文件通常易于阅读和理解。但是较长的数据文件或具有更多字段的数据文件可能很难用肉眼解析,因此在这种情况下计算机做得更好。
|
||||
|
||||
这是一个简单的示例,其中的字段是 _Name _、_ Email_ 和 _Country_。在此例中,CSV 数据将字段定义作为第一行,尽管并非总是如此。
|
||||
这是一个简单的示例,其中的字段是 `Name`、`Email` 和 `Country`。在此例中,CSV 数据将字段定义作为第一行,尽管并非总是如此。
|
||||
|
||||
```
|
||||
Name,Email,Country
|
||||
@ -27,9 +27,9 @@ Bernard Jones,bjones@example.com,UK
|
||||
|
||||
### 从电子表格读取 CSV
|
||||
|
||||
Python 包含了一个 _csv_ 模块,它可读取和写入 CSV 数据。大多数电子表格应用,无论是原生(例如 Excel 或 Numbers)还是基于 Web 的(例如 Google Sheet),都可以导出 CSV 数据。实际上,许多其他可发布表格报告的服务也将导出为 CSV(例如,PayPal)。
|
||||
Python 包含了一个 `csv` 模块,它可读取和写入 CSV 数据。大多数电子表格应用,无论是原生(例如 Excel 或 Numbers)还是基于 Web 的(例如 Google Sheet),都可以导出 CSV 数据。实际上,许多其他可发布表格报告的服务也可以导出为 CSV(例如,PayPal)。
|
||||
|
||||
Python _csv_ 模块有一个名为 _DictReader_ 的内置读取器方法,它可以将每个数据行作为有序字典 (OrderedDict) 处理。它需要一个文件对象访问 CSV 数据。因此,如果上面的文件在当前目录中为 _example.csv_,那么以下代码段是获取此数据的一种方法:
|
||||
Python `csv` 模块有一个名为 `DictReader` 的内置读取器方法,它可以将每个数据行作为有序字典 (`OrderedDict`) 处理。它需要一个文件对象访问 CSV 数据。因此,如果上面的文件在当前目录中为 `example.csv`,那么以下代码段是获取此数据的一种方法:
|
||||
|
||||
```
|
||||
f = open('example.csv', 'r')
|
||||
@ -40,7 +40,7 @@ for row in d:
|
||||
data.append(row)
|
||||
```
|
||||
|
||||
现在,内存中的 _data_ 对象是 OrderedDict 对象的列表:
|
||||
现在,内存中的 `data` 对象是 `OrderedDict` 对象的列表:
|
||||
|
||||
```
|
||||
[OrderedDict([('Name', 'John Q. Smith'),
|
||||
@ -63,7 +63,7 @@ USA
|
||||
bjones@example.com
|
||||
```
|
||||
|
||||
顺便说一句,如果你需要处理没有字段名标题行的 CSV 文件,那么 _DictReader_ 类可以让你定义它们。在上面的示例中,添加 _fieldnames_ 参数并传递一系列名称:
|
||||
顺便说一句,如果你需要处理没有字段名标题行的 CSV 文件,那么 `DictReader` 类可以让你定义它们。在上面的示例中,添加 `fieldnames` 参数并传递一系列名称:
|
||||
|
||||
```
|
||||
d = DictReader(f, fieldnames=['Name', 'Email', 'Country'])
|
||||
@ -71,9 +71,9 @@ d = DictReader(f, fieldnames=['Name', 'Email', 'Country'])
|
||||
|
||||
### 真实例子
|
||||
|
||||
我最近想从一长串人中随机选择一名赢家。我从电子表格中提取的 CSV 数据是一个简单的名称和邮件地址列表。
|
||||
我最近想从一长串人员名单中随机选择一个中奖者。我从电子表格中提取的 CSV 数据是一个简单的名字和邮件地址列表。
|
||||
|
||||
幸运的是,Python 有一个有用的 _random_ 模块,可以很好地生成随机值。该模块 _Random_ 类中的 _randrange_ 函数正是我需要的。你可以给它一个常规的数字范围(例如整数),以及它们之间的步长值。然后,该函数会生成一个随机结果,这意味着我可以在数据的总行数范围内获得一个随机整数(或行号!)。
|
||||
幸运的是,Python 有一个有用的 `random` 模块,可以很好地生成随机值。该模块 `Random` 类中的 `randrange` 函数正是我需要的。你可以给它一个常规的数字范围(例如整数),以及它们之间的步长值。然后,该函数会生成一个随机结果,这意味着我可以在数据的总行数范围内获得一个随机整数(或者说是行号)。
|
||||
|
||||
这个小程序运行良好:
|
||||
|
||||
@ -94,9 +94,7 @@ print('Email address:', winner['Email'])
|
||||
|
||||
显然,这个例子非常简单。电子表格本身包含了复杂的分析数据的方法。但是,如果你想在电子表格应用之外做某事,Python 或许是一种技巧!
|
||||
|
||||
* * *
|
||||
|
||||
_由 [Isaac Smith][3] 拍摄,发表于 [Unsplash][4]。_
|
||||
题图由 [Isaac Smith][3] 拍摄,发表于 [Unsplash][4]。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -105,7 +103,7 @@ via: https://fedoramagazine.org/using-data-from-spreadsheets-in-fedora-with-pyth
|
||||
作者:[Paul W. Frields][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/) 荣誉推出
|
||||
|
@ -1,16 +1,16 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12086-1.html)
|
||||
[#]: subject: (How to Find Which Graphics Card do You Have in Linux?)
|
||||
[#]: via: (https://itsfoss.com/check-graphics-card-linux/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
如何找出 Linux 中的显卡?
|
||||
如何知道你的 Linux 用的哪种显卡?
|
||||
======
|
||||
|
||||
无论是 [Nvidia][1] 还是 [Radeon][2] 或者 Intel,它们都可能在 Linux 中有问题。当你要对图形问题进行故障排除时,首先要了解系统中装有哪种显卡。
|
||||
无论是 [Nvidia][1] 还是 [Radeon][2] 或者 Intel,它们的显卡都可能在 Linux 中有问题。当你要对图形问题进行故障排除时,首先要了解系统中装有哪种显卡。
|
||||
|
||||
Linux 有几个命令可以检查硬件信息。你可以使用它们来检查你有哪些显卡(也称为视频卡)。让我向你展示一些命令来获取 Linux 中的 GPU 信息。
|
||||
|
||||
@ -20,9 +20,9 @@ Linux 有几个命令可以检查硬件信息。你可以使用它们来检查
|
||||
|
||||
#### 使用 lspci 命令查找显卡
|
||||
|
||||
lspci 命令显示通过 [PCI][4](外设组件互连)总线连接的设备的信息。基本上,此命令提供有关系统所有外设的详细信息,从键盘和鼠标到声卡、网卡和显卡。
|
||||
`lspci` 命令显示通过 [PCI][4](<ruby>外设组件互连<rt>Peripheral Component Interconnect</rt></ruby>)总线连接的设备的信息。基本上,此命令提供有关系统从键盘和鼠标到声卡、网卡和显卡的所有外设的详细信息。
|
||||
|
||||
默认情况下,你会有大量的此类外设列表。这就是为什么你需要用 grep 命令过滤显卡的原因:
|
||||
默认情况下,你会有大量的此类外设列表。这就是为什么你需要用 `grep` 命令过滤出显卡的原因:
|
||||
|
||||
```
|
||||
lspci | grep VGA
|
||||
@ -31,7 +31,7 @@ lspci | grep VGA
|
||||
这应该会显示一行有关你显卡的信息:
|
||||
|
||||
```
|
||||
[email protected]:~$ lspci | grep VGA
|
||||
abhishek@itsfoss:~$ lspci | grep VGA
|
||||
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 620 (rev 02)
|
||||
```
|
||||
|
||||
@ -39,7 +39,7 @@ lspci | grep VGA
|
||||
|
||||
#### 在 Linux 中使用 lshw 命令获取显卡详细信息
|
||||
|
||||
lspci 命令足以查看你的显卡,但是并不能告诉你很多信息。你可以使用 lshw 命令获取有关它的更多信息。
|
||||
`lspci` 命令足以查看你的显卡,但是并不能告诉你很多信息。你可以使用 `lshw` 命令获取有关它的更多信息。
|
||||
|
||||
此命令要求你有 root 用户权限。你需要以这种方式查找视频卡(显卡)信息:
|
||||
|
||||
@ -50,7 +50,7 @@ sudo lshw -C video
|
||||
正如你在下面的输出中看到的那样,此命令提供了有关显卡的更多信息,例如时钟频率、位宽、驱动等。
|
||||
|
||||
```
|
||||
[email protected]:~$ sudo lshw -C video
|
||||
abhishek@itsfoss:~$ sudo lshw -C video
|
||||
[sudo] password for abhishek:
|
||||
*-display
|
||||
description: VGA compatible controller
|
||||
@ -66,7 +66,7 @@ sudo lshw -C video
|
||||
resources: irq:139 memory:db000000-dbffffff memory:90000000-9fffffff ioport:f000(size=64) memory:c0000-dffff
|
||||
```
|
||||
|
||||
#### 额外的技巧:以图形方式检查显卡详细信息
|
||||
#### 附赠技巧:以图形方式检查显卡详细信息
|
||||
|
||||
并非必须使用命令行在 Linux 中查找显卡详细信息。大多数 Linux 发行版(或者应该说是桌面环境)在设置中提供了必要的详细信息。
|
||||
|
||||
@ -85,7 +85,7 @@ via: https://itsfoss.com/check-graphics-card-linux/
|
||||
作者:[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/) 荣誉推出
|
||||
|
@ -0,0 +1,93 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12096-1.html)
|
||||
[#]: subject: (IEEE Standards Association Launches an Open Source Collaboration Platform)
|
||||
[#]: via: (https://itsfoss.com/ieee-open-source-collaboration-platform/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
IEEE 标准协会推出开源协作平台
|
||||
======
|
||||
|
||||
> IEEE 标准协会宣布了一个基于 GitLab 的开源协作平台。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/10/222910vjpiqd6lqqm6riqp.jpg)
|
||||
|
||||
[IEEE][1] 是世界上最大的技术专业组织,致力于推动技术的发展。<ruby>IEEE 标准协会<rt>the IEEE Standards Association</rt></ruby>(IEEE SA)是 IEEE 内部的一个组织,负责制定全球各行业的标准。
|
||||
|
||||
IEEE 标准协会(SA)提出了一个开源协作平台,即 [IEEE SA Open][2]。
|
||||
|
||||
技术上来说,它是一个自托管的 GitLab 实例,结合了 [Mattermost][3](一个 [Slack 的替代品][4])和 [GitLab Pages][5]。[其官方博文][6]对此进一步解释道:
|
||||
|
||||
> 该平台使独立软件开发者、初创企业、业界、学术机构等能够在一个协作、安全、负责任的环境中创建、测试、管理和部署创新项目。
|
||||
|
||||
### 它有什么不同或有用的地方?
|
||||
|
||||
这个平台最主要的吸引力应该是 IEEE 的会员网络、技术专长和资源。
|
||||
|
||||
IEEE 主席 [Robert Fish][7],也曾(在接受 Radio Kan 的采访时)简单地提到它有什么不同之处,以及为什么 IEEE 想要使用它。
|
||||
|
||||
> 如今,世界上大部分的基础设施都是由软件运行的,而这些软件需要符合通信网络、电网、农业等方面的标准。
|
||||
|
||||
这是有道理的 —— 如果我们想提高标准化技术,这在很大程度上取决于软件。所以,这听起来肯定是要对创新的开源项目进行标准化,让它们也能为潜在的资本机会做好准备。
|
||||
|
||||
IEEE 还澄清说:
|
||||
|
||||
> 随着软件在当今世界越来越普遍,道德规范、可靠性、透明度和民主治理成为必须具备的条件。IEEE 在赋予开源项目这些属性方面有着得天独厚的优势。
|
||||
|
||||
虽然听起来很好,但 IEEE 的开源平台究竟能提供什么?让我们一起来看看这个问题。
|
||||
|
||||
### IEEE SA Open 概览
|
||||
|
||||
![][8]
|
||||
|
||||
首先,它对所有人开放并且完全免费使用。你只需要创建一个 [IEEE 帐户][9],然后[登录到这个开源平台][10]就可以开始。
|
||||
|
||||
除了与 IEEE 广泛的会员网络相关的好处之外,你还可以期望其开源社区经理或社区成员提供指导性支持。
|
||||
|
||||
![Ieee Gitlab][11]
|
||||
|
||||
该平台提供了标准和非标准项目的用例,你可以尝试一下。
|
||||
|
||||
因为选择将 GitLab 与 Mattermost 和 Pages 结合起来,你可以获得一些有用的功能,它们是:
|
||||
|
||||
* 项目规划和管理功能
|
||||
* 源代码管理
|
||||
* 测试、代码质量和持续集成功能
|
||||
* Docker 容器注册库和 Kubernetes 集成
|
||||
* 应用程序的发布和交付功能
|
||||
* 集成了 Mattermost 聊天论坛的斜线命令(完全支持 Android 和 iPhone 应用程序)
|
||||
* 能够弥合标准制定和开源社区之间的差距,以便以更快的速度推进灵活和创造性的技术解决方案
|
||||
* 安全的开放空间,并有严格的行为准则。
|
||||
|
||||
### 小结
|
||||
|
||||
显然,有更多的平台来潜在地放大开源项目的曝光率是一件好事 —— 因此,IEEE 的举措听起来很有希望。
|
||||
|
||||
你对此有何看法?让我知道你的想法吧!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/ieee-open-source-collaboration-platform/
|
||||
|
||||
作者:[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://www.ieee.org/about/index.html
|
||||
[2]: https://standards.ieee.org/content/ieee-standards/en/initiatives/opensource/
|
||||
[3]: https://mattermost.com/
|
||||
[4]: https://itsfoss.com/open-source-slack-alternative/
|
||||
[5]: https://docs.gitlab.com/ee/user/project/pages/
|
||||
[6]: https://spectrum.ieee.org/the-institute/ieee-products-services/ieee-standards-association-launches-a-platform-for-open-source-collaboration
|
||||
[7]: https://www.linkedin.com/in/robertsfish/
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/ieee-opensource.jpg?ssl=1
|
||||
[9]: https://www.ieee.org/profile/public/createwebaccount/showRegister.html
|
||||
[10]: https://opensource.ieee.org/
|
||||
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/ieee-gitlab.jpg?ssl=1
|
@ -0,0 +1,161 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (MjSeven)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12092-1.html)
|
||||
[#]: subject: (Scheduling tasks on Linux using the at command)
|
||||
[#]: via: (https://www.networkworld.com/article/3535808/scheduling-tasks-on-linux-using-the-at-command.html)
|
||||
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
|
||||
|
||||
使用 at 命令在 Linux 上安排任务
|
||||
======
|
||||
|
||||
> at 命令可以很容易地安排 Linux 任务在你选择的任何时间或日期运行,让我们来看看它能为你做什么。
|
||||
|
||||
![][0]
|
||||
|
||||
当你希望命令或脚本在某个特定时间运行时,你不需要将手指放在键盘上盘旋等待按下回车键,或者是在特定时间坐在办公桌前。相反,你可以通过 `at` 命令来设置任务。在本文中,我们将研究如何使用 `at` 来安排任务,如何精确地选择任务希望运行的时间,以及如何使用 `at` 来查看安排运行的任务。
|
||||
|
||||
### at vs cron
|
||||
|
||||
对于那些使用 cron 在 Linux 系统上安排任务的人来说,`at` 命令类似于 cron,因为你可以在选定的时间调度任务,但是 cron 用于定期运行的作业 —— 甚至是每年仅一次。大多数 cron 作业的频率都设置为每天、每周或每月运行一次,不过你可以控制运行的频率和时间。
|
||||
|
||||
另一方面,`at` 命令用于仅运行一次的任务。想在午夜重启系统?没问题,只要你有适当的权限,`at` 可以为你完成此操作。如果你希望系统在每个星期六凌晨 2 点重启,那么改用 cron。
|
||||
|
||||
### 使用 at
|
||||
|
||||
`at` 命令很容易使用,只需记住几件事。一个简单使用 `at` 的例子类似于这样:
|
||||
|
||||
```
|
||||
$ at 5:00PM
|
||||
at> date >> thisfile
|
||||
at> <EOT>
|
||||
```
|
||||
|
||||
在输入 `at` 和应该运行命令的时间,`at` 会提示你在设定时间会运行该命令(此例中是 `date` 命令)。输入 `^D`(`Ctrl + d`)来完成请求。
|
||||
|
||||
假设我们在下午 5 点之前设置这个 `at` 命令,那么这个日期和时间将在当天下午 5 点添加到名为 `thisfile` 文件的末尾。否则,该命令将在第二天下午 5 点运行。
|
||||
|
||||
与 `at` 命令进行交互时,可以输入多个命令。如果你要同时运行多个命令,只需输入多个命令行即可:
|
||||
|
||||
```
|
||||
$ at 6:22
|
||||
warning: commands will be executed using /bin/sh
|
||||
at> echo first >> thisfile
|
||||
at> echo second >> thisfile
|
||||
at> <EOT>
|
||||
```
|
||||
|
||||
在上面的命令中,我们使用了一个普通的用户账户,将一些简单的文本添加到该用户主目录的文件中。如果在上午 6:22 之后运行这些命令,那么命令会在第二天运行,因为 6:22 表示上午 6:22。如果你想在下午 6:22 运行,使用 `6:22 PM` 或者 `18:22`。`6:22 PM` 这样也是可以工作的。
|
||||
|
||||
你也可以通过使用 `at` 来安排命令在指定的日期或时间运行,例如 `10:00AM April 15 2021` 或 `noon + 5 days`(从今天起 5 天内的中午运行),以下是一些例子:
|
||||
|
||||
```
|
||||
at 6PM tomorrow
|
||||
at noon April 15 2021
|
||||
at noon + 5 days
|
||||
at 9:15 + 1000 days
|
||||
```
|
||||
|
||||
在指定要运行的命令并按下 `^D` 后,你会注意到 `at` 命令为每个请求分配了一个作业编号,这个数字将显示在 `at` 命令的作业队列中。
|
||||
|
||||
```
|
||||
$ at noon + 1000 days
|
||||
warning: commands will be executed using /bin/sh
|
||||
at> date >> thisfile
|
||||
at> <EOT>
|
||||
job 36 at Tue Dec 27 12:00:00 2022 <== job # is 36
|
||||
```
|
||||
|
||||
### 检查队列
|
||||
|
||||
你可以使用 `atq`(at queue)命令来查看 `at` 作业队列:
|
||||
|
||||
```
|
||||
$ atq
|
||||
32 Thu Apr 2 03:06:00 2020 a shs
|
||||
35 Mon Apr 6 12:00:00 2020 a shs
|
||||
36 Tue Dec 27 12:00:00 2022 a shs
|
||||
34 Thu Apr 2 18:00:00 2020 a shs
|
||||
```
|
||||
|
||||
如果你需要取消队列中的一个作业,使用 `atrm`(at remove)命令和作业编号:
|
||||
|
||||
```
|
||||
$ atrm 32
|
||||
$ atq
|
||||
35 Mon Apr 6 12:00:00 2020 a shs
|
||||
36 Tue Dec 27 12:00:00 2022 a shs
|
||||
34 Thu Apr 2 18:00:00 2020 a shs
|
||||
```
|
||||
|
||||
你可以使用 `at -c` 命令来查看安排任务的详细信息,其它详细信息(活动的搜索路径等)也可以看到,但是输出的最后一行将显示计划运行的命令。
|
||||
|
||||
```
|
||||
$ at -c 36 | tail -6
|
||||
cd /home/shs || {
|
||||
echo 'Execution directory inaccessible' >&2
|
||||
exit 1
|
||||
}
|
||||
date >> thisfile
|
||||
```
|
||||
|
||||
注意,该命令显示首先会测试是否可以通过 `cd` 命令进入用户目录。如果不可以,作业将退出并显示错误。如果可以,则运行在 `at` 中指定的命令。它将命令视为 “进入 `/home/shs` 或退出并显示错误”。
|
||||
|
||||
### 以 root 身份运行作业
|
||||
|
||||
要以 root 身份运行 `at` 作业,只需将 `sudo` 与你的 `at` 命令一起使用,如下所示:
|
||||
|
||||
```
|
||||
$ sudo at 8PM
|
||||
[sudo] password for shs:
|
||||
warning: commands will be executed using /bin/sh
|
||||
at> reboot now
|
||||
at> <EOT>
|
||||
job 37 at Wed Apr 1 16:00:00 2020
|
||||
```
|
||||
|
||||
注意,root 的任务以 `root` 作为执行者显示在队列中。
|
||||
|
||||
```
|
||||
35 Mon Apr 6 12:00:00 2020 a shs
|
||||
36 Tue Dec 27 12:00:00 2022 a shs
|
||||
37 Wed Apr 1 20:00:00 2020 a root <==
|
||||
```
|
||||
|
||||
### 运行脚本
|
||||
|
||||
你还可以使用 `at` 命令来运行脚本,这里有一个例子:
|
||||
|
||||
```
|
||||
$ at 4:30PM
|
||||
warning: commands will be executed using /bin/sh
|
||||
at> bin/tryme
|
||||
at> <EOT>
|
||||
```
|
||||
|
||||
### 禁止使用 at 命令
|
||||
|
||||
`/etc/at.deny` 文件提供了一种禁止用户使用 `at` 命令的方法。默认情况下,它可能会包含一个不允许的账户列表,例如 `ftp` 和 `nobody`。可以使用 `/etc/at.allow` 文件执行相反的操作,但是通常只配置 `at.deny` 文件。
|
||||
|
||||
### 总结
|
||||
|
||||
当你要安排一项一次性任务时,无论你是希望在今天下午或几年后运行,`at` 命令都是通用且易于使用的。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3535808/scheduling-tasks-on-linux-using-the-at-command.html
|
||||
|
||||
作者:[Sandra Henry-Stocker][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[MjSeven](https://github.com/MjSeven)
|
||||
校对:[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
|
||||
[0]: https://images.idgesg.net/images/article/2019/08/gettyimages-140389307-100808283-large.jpg
|
||||
[1]: 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)
|
||||
[2]: https://www.facebook.com/NetworkWorld/
|
||||
[3]: https://www.linkedin.com/company/network-world
|
@ -1,8 +1,8 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12109-1.html)
|
||||
[#]: subject: (Take back your dotfiles with Chezmoi)
|
||||
[#]: via: (https://fedoramagazine.org/take-back-your-dotfiles-with-chezmoi/)
|
||||
[#]: author: (Ryan Walter https://fedoramagazine.org/author/rwaltr/)
|
||||
@ -10,19 +10,19 @@
|
||||
用 Chezmoi 取回你的点文件
|
||||
======
|
||||
|
||||
![][1]
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/14/183618dwkhe4ehx1kthxvw.jpg)
|
||||
|
||||
在 Linux 中,点文件是隐藏的文本文件,用于存储从 Bash、Git 到 i3 或 VSCode 等更复杂的许多应用程序的配置设置。
|
||||
在 Linux 中,点文件是隐藏的文本文件,从 Bash、Git 到 i3 或 VSCode 等更复杂的许多应用程序,都用它存储配置设置。
|
||||
|
||||
这些文件大多数都放在 `~/.config` 目录中或用户主目录中。编辑这些文件使你可以自定义也许没有提供设置菜单的应用程序,并且它们可以跨设备甚至是跨其他 Linux 发行版移植。但是,Linux 发烧友社区中讨论的一个话题是如何管理这些点文件以及如何共享它们。
|
||||
这些文件大多数都放在 `~/.config` 目录中或用户主目录中。编辑这些文件使你可以自定义也许没有提供设置菜单的应用程序,并且它们可以跨设备甚至是跨其它 Linux 发行版移植。但是,整个 Linux 发烧友社区的讨论焦点是如何管理这些点文件以及如何共享它们。
|
||||
|
||||
我们将展示一个名为 [Chezmoi][2] 的工具,该工具与其他工具略有不同。
|
||||
我们将展示一个名为 [Chezmoi][2] 的工具,该工具与其它工具略有不同。
|
||||
|
||||
### 点文件管理的历史
|
||||
|
||||
如果你在 [GitHub 上搜索“dotfile”][3],那么你将看到有超过 10 万个存储库在解决一个目标:将人们的点文件存储在可共享且可重复的领地中。但是,除了都在使用 Git 之外,它们存储文件的方式各有不同。
|
||||
如果你在 [GitHub 上搜索“dotfiles”][3],那么你将看到有超过 10 万个存储库在解决一个目标:将人们的点文件存储在可共享且可重复的领地中。但是,除了都在使用 Git 之外,它们存储文件的方式各有不同。
|
||||
|
||||
虽然 Git 解决了代码管理问题,也将其转换为配置文件管理,但它并没有解决如何区分发行版、角色(例如家用计算机与工作计算机)、机密管理以及按设备配置的问题。
|
||||
虽然 Git 解决了代码管理问题,也将其转换为配置文件管理,但它并没有解决如何区分发行版、角色(例如家用计算机与工作计算机)、机密信息管理以及按设备配置的问题。
|
||||
|
||||
因此,许多用户决定制定自己的解决方案,多年来,社区已经做出了许多成果。本文将简要介绍已有的一些解决方案。
|
||||
|
||||
@ -38,27 +38,27 @@ $ podman run --rm -it fedora
|
||||
|
||||
#### 安装问题
|
||||
|
||||
如果将点文件存储在 Git 存储库中,你肯定希望可以使更改轻松地自动应用到主目录之中,乍一看,最简单的方法是使用符号链接,例如 `ln -s ~/.dotfies/bashrc ~/.bashrc`。这将使你的更改在更新存储库时立即就绪。
|
||||
如果将点文件存储在 Git 存储库中,你肯定希望可以让更改轻松地自动应用到主目录之中,乍一看,最简单的方法是使用符号链接,例如 `ln -s ~/.dotfies/bashrc ~/.bashrc`。这可以使你的更改在更新存储库时立即就绪。
|
||||
|
||||
符号链接的问题在于管理符号链接可能很麻烦。Stow 和 [RCM(在 Fedora 杂志上介绍过)][4]可以帮助你管理这些,但是这些并不是非常舒服的解决方案。下载后,需要对私有文件进行适当的修改和设置访问模式。如果你在一个系统上修改了点文件,然后将存储库下载到另一个系统,则可能会发生冲突并需要进行故障排除。
|
||||
符号链接的问题在于管理符号链接可能很麻烦。Stow 和 [RCM][4](在 Fedora 杂志上介绍过)可以帮助你管理这些,但是这些并不是非常舒服的解决方案。下载后,需要对私有文件进行适当的修改和设置访问模式。如果你在一个系统上修改了点文件,然后将存储库下载到另一个系统,则可能会发生冲突并需要进行故障排除。
|
||||
|
||||
解决此问题的另一种方法是编写自己的安装脚本。这是最灵活的选项,但要权衡需要花费更多时间来构建自定义解决方案是否值得。
|
||||
解决此问题的另一种方法是编写自己的安装脚本。这是最灵活的选项,但要权衡花费更多时间来构建自定义解决方案是否值得。
|
||||
|
||||
#### 机密问题
|
||||
#### 机密信息问题
|
||||
|
||||
Git 旨在跟踪更改。如果你在 Git 存储库中存储密码或 API 密钥之类的机密信息,则会比较麻烦,并且需要重写 Git 历史记录以删除该机密信息。如果你的存储库是公开的,那么如果其他人下载了你的存储库,你的机密信息将不再保密。仅这个问题就会阻止许多人与公共世界共享其 dotfile。
|
||||
Git 旨在跟踪更改。如果你在 Git 存储库中存储密码或 API 密钥之类的机密信息,则会比较麻烦,并且需要重写 Git 历史记录以删除该机密信息。如果你的存储库是公开的,那么如果其他人下载了你的存储库,你的机密信息将不再保密。仅这个问题就会阻止许多人与公共世界共享其点文件。
|
||||
|
||||
#### 多设备配置问题
|
||||
|
||||
问题不在于将配置拉到多个设备,而是当你有多个需要不同配置的设备时的问题。大多数人通过使用不同的文件夹或使用不同的复刻来处理此问题。这使得难以在不同设备和角色集之间共享配置。
|
||||
问题不在于如何将配置拉到多个设备,而是当你有多个需要不同配置的设备的问题。大多数人通过使用不同的文件夹或使用不同的<ruby>复刻<rt>fork</rt></ruby>来处理此问题。这使得难以在不同设备和角色集之间共享配置。
|
||||
|
||||
### Chezmoi 是如何干的
|
||||
|
||||
Chezmoi 是一种考虑了以上问题的用于管理点文件的工具,它不会盲目地从存储库复制或符号链接文件。 Chezmoi 更像是模板引擎,可以根据系统变量、模板、机密管理器和 Chezmoi 自己的配置文件来生成你的点文件。
|
||||
Chezmoi 是一种考虑了以上问题的用于管理点文件的工具,它不会盲目地从存储库复制或符号链接文件。 Chezmoi 更像是模板引擎,可以根据系统变量、模板、机密信息管理器和 Chezmoi 自己的配置文件来生成你的点文件。
|
||||
|
||||
#### Chezmoi 入门
|
||||
|
||||
目前,Chezmoi 不在 Fedora 的默认软件库中。你可以使用以下命令下载 Chezmoi 的当前版本。
|
||||
目前,Chezmoi 并不在 Fedora 的默认软件库中。你可以使用以下命令下载 Chezmoi 的当前版本。
|
||||
|
||||
```
|
||||
$ sudo dnf install https://github.com/twpayne/chezmoi/releases/download/v1.7.17/chezmoi-1.7.17-x86_64.rpm
|
||||
@ -72,7 +72,7 @@ $ sudo dnf install https://github.com/twpayne/chezmoi/releases/download/v1.7.17/
|
||||
$ chezmoi init
|
||||
```
|
||||
|
||||
它将在 `~/.local/share/chezmoi/` 中创建你的新存储库。你可以使用以下命令轻松地切换该目录:
|
||||
它将在 `~/.local/share/chezmoi/` 中创建你的新存储库。你可以使用以下命令轻松地切换到该目录:
|
||||
|
||||
```
|
||||
$ chezmoi cd
|
||||
@ -86,7 +86,7 @@ chezmoi add ~/.bashrc
|
||||
|
||||
这将你的 `.bashrc` 文件添加到 chezmoi 存储库。
|
||||
|
||||
注意:如果你的 `.bashrc` 文件实际上是一个符号链接,则需要添加 `-f` 标志以跟随它并读取实际文件的内容。
|
||||
注意:如果你的 `.bashrc` 文件实际上是一个符号链接,则需要添加 `-f` 标志以跟随它来读取实际文件的内容。
|
||||
|
||||
现在,你可以使用以下命令编辑该文件:
|
||||
|
||||
@ -106,7 +106,7 @@ Chezmoi 使用特殊的前缀来跟踪隐藏文件和私有文件,以解决 Gi
|
||||
$ chezmoi cd
|
||||
```
|
||||
|
||||
**请注意,标记为私有的文件实际上并不是私有的,它们仍会以纯文本格式保存在你的 Git 存储库中。稍后会解释更多。**
|
||||
**请注意,标记为私有的文件实际上并不是私有的,它们仍会以纯文本格式保存在你的 Git 存储库中。稍后会进一步解释。**
|
||||
|
||||
你可以使用以下方法应用任何更改:
|
||||
|
||||
@ -144,7 +144,7 @@ $ chezmoi edit-config
|
||||
name = "Fedora Mcdora"
|
||||
```
|
||||
|
||||
保存文件,然后再次运行 `chezmoi data`。你将在底部看到你的电子邮件和姓名现已添加。现在,你可以将这些与 Chezmoi 的模板一起使用。运行:
|
||||
保存文件,然后再次运行 `chezmoi data`。你将在底部看到你的电子邮件和姓名已经添加成功。现在,你可以将这些与 Chezmoi 的模板一起使用。运行:
|
||||
|
||||
```
|
||||
$ chezmoi add -T --autotemplate ~/.gitconfig
|
||||
@ -166,7 +166,7 @@ $ chezmoi add -T --autotemplate ~/.gitconfig
|
||||
$ chezmoi edit ~/.gitconfig
|
||||
```
|
||||
|
||||
然后使用
|
||||
然后使用:
|
||||
|
||||
```
|
||||
$ chezmoi cat ~/.gitconfig
|
||||
@ -176,17 +176,17 @@ $ chezmoi cat ~/.gitconfig
|
||||
|
||||
```
|
||||
[root@a6e273a8d010 ~]# chezmoi cat ~/.gitconfig
|
||||
[user]
|
||||
email = "fedorauser@example.com"
|
||||
name = "Fedora Mcdora"
|
||||
[root@a6e273a8d010 ~]#
|
||||
[user]
|
||||
email = "fedorauser@example.com"
|
||||
name = "Fedora Mcdora"
|
||||
[root@a6e273a8d010 ~]#
|
||||
```
|
||||
|
||||
它将在我们的 Chezmoi 配置中生成一个充满变量的文件。你也可以使用变量执行简单的逻辑语句。一个例子是:
|
||||
|
||||
```
|
||||
{{- if eq .chezmoi.hostname "fsteel" }}
|
||||
# this will only be included if the host name is equal to "fsteel"
|
||||
# 如果主机名为 "fsteel" 才包括此部分
|
||||
{{- end }}
|
||||
```
|
||||
|
||||
@ -224,7 +224,7 @@ $ chezmoi doctor
|
||||
[root@a6e273a8d010 ~]#
|
||||
```
|
||||
|
||||
您可以使用这些客户端,也可以使用[通用客户端][6],也可以使用系统的[密钥环][7]。
|
||||
你可以使用这些客户端,也可以使用[通用客户端][6],也可以使用系统的[密钥环][7]。
|
||||
|
||||
对于 GPG,你需要使用以下命令将以下内容添加到配置中:
|
||||
|
||||
@ -243,9 +243,9 @@ $ chezmoi edit-config
|
||||
$ chezmoi add --encrypt
|
||||
```
|
||||
|
||||
来添加任何文件,这些文件将在你的源存储库中加密,并且不会以纯文本格式公开。Chezmoi 会在申请时自动将其解密。
|
||||
来添加任何文件,这些文件将在你的源存储库中加密,并且不会以纯文本格式公开。Chezmoi 会在应用时自动将其解密。
|
||||
|
||||
我们也可以在模板中使用它们。例如,存储在 [Pass(已在 Fedora 杂志上介绍)][8]中的机密令牌。继续,生成你的机密信息。
|
||||
我们也可以在模板中使用它们。例如,存储在 [Pass][8](已在 Fedora 杂志上介绍)中的机密令牌。继续,生成你的机密信息。
|
||||
|
||||
在此示例中,它称为 `githubtoken`:
|
||||
|
||||
@ -291,7 +291,7 @@ via: https://fedoramagazine.org/take-back-your-dotfiles-with-chezmoi/
|
||||
作者:[Ryan Walter][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/) 荣誉推出
|
||||
|
@ -0,0 +1,121 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (qfzy1233)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12155-1.html)
|
||||
[#]: subject: (Bodhi Linux 5.1 Review: Slightly Different Lightweight Linux)
|
||||
[#]: via: (https://itsfoss.com/bodhi-linux-review/)
|
||||
[#]: author: (John Paul https://itsfoss.com/author/john/)
|
||||
|
||||
Bodhi Linux 5.1 一览: 略有不同的轻量化 Linux
|
||||
======
|
||||
|
||||
Bodhi Linux 是一个基于 Ubuntu 的[轻量级 Linux 发行版][1]。与其他大多数发行版不同,Bodhi 使用自己的 Moksha 桌面,并专注于为你提供一个可以在旧计算机上运行的最简设置。
|
||||
|
||||
### 什么是 Bodhi Linux?
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/27/093318yawppv07zqpva4j6.png)
|
||||
|
||||
[Bodhi Linux][3] 最早于 2011 年推出。它以“[简约、高效和用户自定义][4]”为设计理念。开发人员旨在提供一个“[实用但不臃肿的系统][5]”。因此,它使用轻量级的 Moksha 桌面,只预装了基本的应用程序。这一做法是为了给用户一个稳定的平台来构建他们想要的系统。它基于最新版的 Ubuntu 长期支持版本。
|
||||
|
||||
### Moksha 桌面
|
||||
|
||||
![Bodhi Desktop][6]
|
||||
|
||||
起初 Bodhi 是装载着 [Enlightenment 桌面环境][7]的。Bodhi Linux 一直被认为是“Enlightenment 系的” Linux 发行版。事实上,“Bodhi”(菩提)这个词是基于梵文的“<ruby>开悟<rt> enlightenment</rt></ruby>”。
|
||||
|
||||
然而,当 Enlightenment 18 版本发布以后,这一切都改变了。该版本是如此的糟糕,以至于它并没有集成到 Bodhi 中。Enlightenment 19 发布后修复了一些问题,但仍然存在一些不足。
|
||||
|
||||
在尝试与 Enlightenment 开发团队合作却毫无进展之后,Bodhi 开发者在 2015 年[复刻][8]了 Enlightenment 17。新的桌面环境被命名为 [Moksha][9],它是基于梵文单词“解脱、解放或释放”。你可以在 [GitHub][10] 上找到它的代码。
|
||||
|
||||
### 5.1.0 有什么新特性?
|
||||
|
||||
- [Bodhi Linux 5.1 Trailer](https://youtu.be/e8wcRL9F3p8)
|
||||
|
||||
[Bodhi 5.1.0][12] 是这两年内发布的第一个版本,也是基于 Ubuntu 18.04 的第二个版本。除了更新包,它还有新的默认图标和主题。该版本对默认应用程序做了几处更改。预装版 Leafpad 取代了 epad 并且 [GNOME Web][13](也被称为 Epiphany)代替了 [Midori][14]。删除了 eepDater 系统更新器。
|
||||
|
||||
目前有[四个不同的版本][15]的 Bodhi5.1.0 可以[下载][16]: <ruby>标准版<rt>Standard</rt></ruby>、<ruby>硬件支持版<rt>Hwe</rt></ruby>、<ruby>兼容版<rt>Legacy</rt></ruby> 和<ruby>软件包版<rt>AppPack</rt></ruby>。
|
||||
|
||||
* 标准适用于过去十年内电脑配置。它不推送内核更新。
|
||||
* 硬件支持版是 Bodhi 家族的新成员,其设计用来包括对更新的硬件的支持,并会接收到内核更新。5.1 版本的使用的是 5.3.0-42 内核。
|
||||
* 兼容版是仅有的 32 位版本。它使用“较旧的 4.9.0-6-686 Linux 内核,该内核针对旧的(15 年以上)硬件进行了优化。这个内核也不包括许多老系统不支持的 PAE 扩展。”
|
||||
* 软件包版是为那些想要一个开箱即用的全载系统的人准备的,并预装了许多应用程序。
|
||||
|
||||
### Bodhi Linux 的系统要求
|
||||
|
||||
最低系统要求:
|
||||
|
||||
* 500 MHz 处理器
|
||||
* 256 MB 内存
|
||||
* 5 GB 的硬盘存储空间
|
||||
|
||||
推荐系统要求:
|
||||
|
||||
* 1.0 GHz 处理器
|
||||
* 512 MB 内存
|
||||
* 10 GB 的硬盘存储空间
|
||||
|
||||
### 体验 Bodhi Linux
|
||||
|
||||
![Old Bodhi Linux][17]
|
||||
|
||||
由于它是基于 Ubuntu 的,所以安装 Bodhi 非常简单。当我登录到 Bodhi 后,新的主题和图标集让我大吃一惊。上次我安装 Bodhi(包括几个月前的 5.0)时,我认为它需要换一个新的外观。之前的主题并没有什么问题,但看起来像是二十一世纪初的东西。新的主题使它看起来更具现代感。
|
||||
|
||||
![Bodhi Linux 5.1][18]
|
||||
|
||||
我也很高兴看到 Midori 浏览器被 GNOME Web 所取代。我不是 [Midori 浏览器][19]的粉丝。对我来说,它总是显得功能太少了。(不过,随着 [Midori Next][20] 的推出,这种情况可能会改变。)GNOME Web 更像是我需要的网页浏览器。最重要的是它带有 Firefox Sync,这样我就可以同步我所有的书签和密码了。
|
||||
|
||||
与许多 Linux 发行版不同,Bodhi 并没有一个独立的软件中心。相反,如果你点击 AppCenter 图标,它会打开浏览器,并导航到 Bodhi 网站的软件中心页面 [AppCenter 页面][21]。这里的应用程序是按类别排序的,它们中的大多数是[轻量级应用程序][22]。
|
||||
|
||||
![Bodhi Linux Appcenter][23]
|
||||
|
||||
如果你点击其中一个页面并点击“安装”,(在你输入密码之后)Bodhi 就会安装它。这是通过一个名为 [apturl][24] 的小程序实现的,它是“是一个非常简单的从网页浏览器安装软件包的方法”。它非常灵巧,我希望更多基于 Ubuntu 的发行版使用它。
|
||||
|
||||
总的来说,我喜欢 Moksha 桌面。它坚持我们几十年来看到的桌面风格(这是我最喜欢的)。它不会影响你,却很容易改变和定制。我唯一怀念的是,当我按下超级键时,应用程序菜单不打开。但我猜你不可能拥有生活中的一切。
|
||||
|
||||
### 结语
|
||||
|
||||
我对最近发布的 Bodhi Linux 感到十分惊喜。过去,我经常折腾它。并且我一直很喜欢它,但最近的这个版本是迄今为止最好的。在某种程度上,他们打破了 Bodhi 只适合老系统的想法,加入了对较新内核的支持。
|
||||
|
||||
如果你想换换个环境,同时又想在 Ubuntu 的世界里寻找新的风景,那就试试[Bodhi Linux][3]吧。
|
||||
|
||||
你用过 Bodhi Linux 吗?你最喜欢的基于 Ubuntu 的发行版是什么?请在下面的评论中告诉我们。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/bodhi-linux-review/
|
||||
|
||||
作者:[John Paul][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[qfzy1233](https://github.com/qfzy1233)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/john/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/lightweight-linux-beginners/
|
||||
[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/bodhi-start-page.png?resize=800%2C500&ssl=1
|
||||
[3]: https://www.bodhilinux.com/
|
||||
[4]: https://www.bodhilinux.com/w/wiki/
|
||||
[5]: https://www.bodhilinux.com/w/what-is-bodhi-linux/
|
||||
[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/bodhi-desktop.jpg?resize=800%2C500&ssl=1
|
||||
[7]: https://www.enlightenment.org/start
|
||||
[8]: https://www.bodhilinux.com/2015/04/28/introducing-the-moksha-desktop/
|
||||
[9]: https://www.bodhilinux.com/moksha-desktop/
|
||||
[10]: https://github.com/JeffHoogland/moksha
|
||||
[11]: https://www.youtube.com/c/itsfoss?sub_confirmation=1
|
||||
[12]: https://www.bodhilinux.com/2020/03/25/bodhi-linux-5-1-0-released/
|
||||
[13]: https://wiki.gnome.org/Apps/Web/
|
||||
[14]: https://en.wikipedia.org/wiki/Midori_(web_browser
|
||||
[15]: https://www.bodhilinux.com/w/selecting-the-correct-iso-image/
|
||||
[16]: https://www.bodhilinux.com/download/
|
||||
[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/bodhi.png?resize=800%2C400&ssl=1
|
||||
[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/bodhi-Linux-5-1-screenshot.jpg?ssl=1
|
||||
[19]: https://itsfoss.com/midori-browser/
|
||||
[20]: https://www.midori-browser.org/2020/01/15/midori-next-come-on-yarovi-we-can/
|
||||
[21]: https://www.bodhilinux.com/a/
|
||||
[22]: https://itsfoss.com/lightweight-alternative-applications-ubuntu/
|
||||
[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/Bodhi-Linux-AppCenter.png?resize=800%2C500&ssl=1
|
||||
[24]: https://wiki.ubuntu.com/AptUrl
|
||||
[25]: https://reddit.com/r/linuxusersgroup
|
@ -0,0 +1,140 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12107-1.html)
|
||||
[#]: subject: (What is Arch User Repository (AUR)? How to Use AUR on Arch and Manjaro Linux?)
|
||||
[#]: via: (https://itsfoss.com/aur-arch-linux/)
|
||||
[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/)
|
||||
|
||||
什么是 Arch 用户仓库(AUR)以及如何使用?
|
||||
======
|
||||
|
||||
如果你一直在使用 [Arch Linux][1] 或其他基于 Arch 的发行版,如 Manjaro,那么可能会遇到 AUR。你尝试安装新软件,有人建议从 AUR 中安装它。这让你感到困惑。
|
||||
|
||||
什么是 AUR?为什么使用它?如何使用 AUR?我将在本文中回答这些问题。
|
||||
|
||||
### 什么是 AUR?
|
||||
|
||||
![][2]
|
||||
|
||||
AUR 表示<ruby>Arch 用户仓库<rt>Arch User Repository</rt></ruby>。它是针对基于 Arch 的 Linux 发行版用户的社区驱动的仓库。它包含名为 [PKGBUILD][3] 的包描述,它可让你使用 [makepkg][4] 从源代码编译软件包,然后通过 [pacman][5](Arch Linux 中的软件包管理器)安装。
|
||||
|
||||
创建 AUR 的目的是组织和共享社区中的新软件包,并帮助加速将流行的软件包纳入[社区仓库][6]。
|
||||
|
||||
进入官方仓库的大量新软件包都从 AUR 开始。在 AUR 中,用户可以贡献自己的软件包构建(PKGBUILD 和相关文件)。
|
||||
|
||||
AUR 社区可以对 AUR 中的软件包进行投票。如果一个软件包变得足够流行(假设它具有兼容的许可证和良好的打包技术),那么可以将其加入 `pacman` 直接访问的社区仓库中。
|
||||
|
||||
> 简而言之,AUR 是开发人员在 Arch 仓库中正式包含新软件之前向 Arch Linux 用户提供新软件的一种方式。
|
||||
|
||||
### 你应该使用 AUR 吗?有什么风险?
|
||||
|
||||
使用 AUR 就像过马路一样。如果你谨慎操作,应该就没问题。
|
||||
|
||||
如果你刚接触 Linux,建议你在建立有关 Arch/Manjaro 和 Linux 的基础知识之前不要使用 AUR。
|
||||
|
||||
的确,任何人都可以将软件包上传到 AUR,但[受信任用户][7](TU)负责监视上传的内容。尽管 TU 对上传的软件包执行质量控制,但不能保证 AUR 中的软件包格式正确或没有恶意。
|
||||
|
||||
在实践中,AUR 似乎很安全,但理论上讲它可以造成一定程度的损害,但前提是你不小心。从 AUR 构建软件包时,聪明的 Arch 用户**总是**检查 `PKGBUILD` 和 `*.install` 文件。
|
||||
|
||||
此外,TU(受信任用户)还会删除 AUR 中包含在 core/extra/community 中的软件包,因此它们之间不应存在命名冲突。AUR 通常会包含软件包的开发版本(cvs/svn/git 等),但它们的名称会被修改,例如 foo-git。
|
||||
|
||||
对于 AUR 软件包,`pacman` 会处理依赖关系并检测文件冲突,因此,除非你默认使用 `–force` 选项,否则你不必担心用另一个包中的文件会覆盖另一个包的文件。如果这么做了,你可能会遇到比文件冲突更严重的问题。
|
||||
|
||||
### 如何使用 AUR?
|
||||
|
||||
使用 AUR 的最简单方法是通过 AUR 助手。 [AUR 助手][8] 是一个命令行工具(有些还有 GUI),可让你搜索在 AUR 上发布的软件包并安装。
|
||||
|
||||
#### 在 Arch Linux 上安装 AUR 助手
|
||||
|
||||
假设你要使用 [Yay AUR 助手][9]。确保在 Linux 上安装了 git。然后克隆仓库,进入目录并构建软件包。
|
||||
|
||||
依次使用以下命令:
|
||||
|
||||
```
|
||||
sudo pacman -S git
|
||||
sudo git clone https://aur.archlinux.org/yay-git.git
|
||||
cd yay
|
||||
makepkg -si
|
||||
```
|
||||
|
||||
安装后,你可以使用 `yay` 命令来安装软件包:
|
||||
|
||||
```
|
||||
yay -S package_name
|
||||
```
|
||||
|
||||
并非必须使用 AUR 助手来从 AUR 安装软件包。从以下文章解如何在没有 AUR 助手的情况下使用 AUR。
|
||||
|
||||
#### 不使用 AUR 助手安装 AUR 软件包
|
||||
|
||||
如果你不想使用 AUR 助手,那么也可以自行从 AUR 安装软件包。
|
||||
|
||||
在 [AUR 页面][10]上找到要安装的软件包后,建议确认“许可证”、“流行程度”、“最新更新”、“依赖项”等,作为额外的质量控制步骤。
|
||||
|
||||
```
|
||||
git clone [package URL]
|
||||
cd [package name]
|
||||
makepkg -si
|
||||
```
|
||||
|
||||
例如。假设你要安装 [telegram 桌面包][11]:
|
||||
|
||||
```
|
||||
git clone https://aur.archlinux.org/telegram-desktop-git.git
|
||||
cd telegram-desktop-git
|
||||
makepkg -si
|
||||
```
|
||||
|
||||
#### 在 Manjaro Linux 中启用 AUR 支持
|
||||
|
||||
它默认情况下未启用 AUR,你必须通过 `pamac` 启用它。我的笔记本电脑运行 [Manjaro][12] Cinnamon,但是所有 Manjaro 变种的步骤都相同。
|
||||
|
||||
打开 Pamac(显示为 “Add/Remove Software”):
|
||||
|
||||
![][13]
|
||||
|
||||
进入 Pamac 后,请进入如下所示的<ruby>首选项<rt>preferences</rt></ruby>。
|
||||
|
||||
![][14]
|
||||
|
||||
在首选项对话框中,进入 “AUR” 选项卡,启用 AUR 支持,启用检查更新,并关闭对话框。
|
||||
|
||||
![][15]
|
||||
|
||||
现在,你可以搜索软件包,并且可以通过软件包描述下的标签来识别属于 AUR 的软件包。
|
||||
|
||||
![][16]
|
||||
|
||||
希望本文对你有用,并关注社交媒体上即将出现的与 Arch 相关的主题。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/aur-arch-linux/
|
||||
|
||||
作者:[Dimitrios Savvopoulos][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://itsfoss.com/author/dimitrios/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.archlinux.org/
|
||||
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/what-is-aur.png?ssl=1
|
||||
[3]: https://wiki.archlinux.org/index.php/PKGBUILD
|
||||
[4]: https://wiki.archlinux.org/index.php/Makepkg
|
||||
[5]: https://wiki.archlinux.org/index.php/Pacman#Additional_commands
|
||||
[6]: https://wiki.archlinux.org/index.php/Community_repository
|
||||
[7]: https://wiki.archlinux.org/index.php/Trusted_Users
|
||||
[8]: https://itsfoss.com/best-aur-helpers/
|
||||
[9]: https://github.com/Jguer/yay
|
||||
[10]: https://aur.archlinux.org/
|
||||
[11]: https://aur.archlinux.org/packages/telegram-desktop-git
|
||||
[12]: https://manjaro.org/
|
||||
[13]: https://i1.wp.com/i.imgur.com/kFF6HtW.png?ssl=1
|
||||
[14]: https://i0.wp.com/i.imgur.com/47r963A.png?ssl=1
|
||||
[15]: https://i1.wp.com/i.imgur.com/UThiDHO.png?ssl=1
|
||||
[16]: https://i2.wp.com/i.imgur.com/RM5BKi2.png?ssl=1
|
@ -0,0 +1,75 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12104-1.html)
|
||||
[#]: subject: (15 years of Git: How to get started or learn something new)
|
||||
[#]: via: (https://opensource.com/article/20/4/get-started-git)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
Git 都 15 岁了,如何入门或学习点新东西
|
||||
======
|
||||
|
||||
> 在 Git 15 周年之际,了解为什么 Git 是保持软件行业运行的重要组成部分。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/13/091410k80er3mttrznc22e.jpg)
|
||||
|
||||
如果说过去二十年来有什么东西改变了软件,那么 [Git][2] 肯定位列榜首。
|
||||
|
||||
如果你没有亲自使用过 Git,你可能会认为它只是一种技术时尚,只是因为它是由 [Linux][3] 项目的创始人创建的,所以在开发者中只是一个偶然的宠儿。这或许有一定的道理,但 Git 确实取得了一些其他行业所没有的成就。有了 Git,分布在世界各地的开发者们可以在同一时间对同一段代码进行工作,并记录下每一次修改的历史,然后将所有的工作合并到一起,形成一个成品。由于这件事情非常复杂,所以这个工具本身也会变得很复杂,但归根结底,它是维持软件行业运行的重要组成部分。
|
||||
|
||||
无论你是否了解 Git,如果你足够深入的研究开源软件,或者进入计算机科学领域,都有可能遇到它。无论你使用 Git 只是为了下载一个安装包,还是每天与它交互来管理代码,了解更多关于它的知识,都会对你有很大的启发和帮助。
|
||||
|
||||
### Git 术语
|
||||
|
||||
与任何专业工具一样,Git 中也有很多行话。像“<ruby>克隆<rt>clone</rt></ruby>”、“<ruby>合并<rt>merge</rt></ruby>”和“<ruby>变基<rt>rebase</rt></ruby>”这样的术语,最起码也是神秘的,而更糟的情况下会令人感到排斥。试图理解这些术语的含义可能会让人不知所措,但如果你从 Matthew Broberg 的优秀文章《[Git 术语基础][4]》中得到一点指导,就不会这样了。只需快速阅读一下,你就能真正理解地听懂关于 Git 的对话。
|
||||
|
||||
### Git 入门
|
||||
|
||||
如果你需要知道如何使用 Git,那么我自己的[关于使用 Git 的入门文章系列][5]是一个很好的开始。这些文章已经有几年的历史了,但就像许多 Linux 和 UNIX 技术一样,它的界面并没有发生很大的变化,所以这些文章和我写这些文章那时一样,在今天还是很有意义的。这一系列文章向你介绍了 Git 最基本的概念,并带领你完成创建仓库、提交文件、恢复文件、合并分支等过程。
|
||||
|
||||
### 常见的 Git 服务
|
||||
|
||||
Git 最常见的用途之一是公共的 Git 托管服务,比如 GitLab 和 GitHub。Kedar Vijay Kulkarni 在他的《[如何在 Git 中克隆、修改、添加和删除文件][6]》一文中,演示了大多数开发者使用 Git 执行的日常任务。这不是非开发者的必读书目,但对于任何想在公共 Git 托管服务上为项目做贡献的人来说,这篇文章是必读的。这篇文章专门针对的是 Github,因为它是当今最常见的平台之一,但其原理也适用于任何 Git 服务的 Web 前端,包括 [GitLab][7]、[Gogs][8] 和 [Gitea][9] 等流行的开源框架。
|
||||
|
||||
### 试试这个 Git 演练
|
||||
|
||||
与其漫无目的的探索,你是不是更喜欢在导游的带领下学习?有时候,学习一件事最简单的方法就是模仿别人的准确步骤。你知道最终的结果是肯定成功的,所以你在进行练习的时候会有信心,而你的大脑和手指也会得到重复的好处,从而建立起记忆。如果这是你的学习风格,那就跟着 Alan Formy-Duvall 的《[Git 的实用学习练习][10]》,找出成功的 Git 课程的感觉。
|
||||
|
||||
### Git 应用程序
|
||||
|
||||
信不信由你,Git 的界面比你在终端输入的文字更多。显然,在线托管的 Git 有 Web 界面,但是你也可以在计算机上使用 Git 客户端。如果想获得更多的帮助,请阅读 Jesse Duffield 关于 [Lazygit][11] 的文章或 Olaf Anders 关于 [Tig][12] 的文章。要获得完整的图形应用程序体验,请阅读我有关 [Git-cola][13]、[Sparkleshare][14] 以及[其它应用][15]的文章。是的,甚至还有[用于你的移动设备的界面][16]!
|
||||
|
||||
### 了解更多关于 Git 的信息
|
||||
|
||||
知识就是力量,所以不要让 Git 对你来说像个谜。无论你是直接使用它,还是只知道它的名字,或者你以前从未听说过它,现在都是了解 Git 的好时机。这里有很多资源可以帮助你了解它的工作原理、工作原理以及人们为什么这么喜欢它。潜入其中,按照自己的节奏来学习,并学会爱上 Git 吧!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/4/get-started-git
|
||||
|
||||
作者:[Seth Kenlon][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://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/document_free_access_cut_security.png?itok=ocvCv8G2 (Scissors cutting open access to files)
|
||||
[2]: https://en.wikipedia.org/wiki/Git
|
||||
[3]: https://opensource.com/resources/linux
|
||||
[4]: https://opensource.com/article/19/2/git-terminology
|
||||
[5]: https://opensource.com/life/16/7/stumbling-git
|
||||
[6]: https://opensource.com/article/18/2/how-clone-modify-add-delete-git-files
|
||||
[7]: https://about.gitlab.com/install/
|
||||
[8]: https://gogs.io/
|
||||
[9]: https://gitea.io/en-us/
|
||||
[10]: https://opensource.com/article/19/5/practical-learning-exercise-git
|
||||
[11]: https://opensource.com/article/20/3/lazygit
|
||||
[12]: https://opensource.com/article/19/6/what-tig
|
||||
[13]: https://opensource.com/article/20/3/git-cola
|
||||
[14]: https://opensource.com/article/19/4/file-sharing-git
|
||||
[15]: https://opensource.com/life/16/8/graphical-tools-git
|
||||
[16]: https://opensource.com/article/19/4/calendar-git#mobile
|
@ -0,0 +1,112 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12111-1.html)
|
||||
[#]: subject: (Bitwarden: A Free & Open Source Password Manager)
|
||||
[#]: via: (https://itsfoss.com/bitwarden/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
Bitwarden:一个自由开源的密码管理器
|
||||
======
|
||||
|
||||
> Bitwarden 是流行的开源密码管理器。在这里,我们来看看它提供了什么。
|
||||
|
||||
![][1]
|
||||
|
||||
[Bitwarden][2] 是一个自由开源的密码管理器。你可能还记得,我们之前将它列为 [Linux 中的最佳密码管理器][3]之一。
|
||||
|
||||
就个人而言,几个月来我一直在多个设备上使用 Bitwarden 作为我的密码管理器。因此,在本文中,我将说明它提供的功能以及我的使用经验。
|
||||
|
||||
**注意:** 如果你对服务的安全性有疑问,请查看其官方安全性[常见问题页面][4]。
|
||||
|
||||
### Bitwarden 密码管理器的特性
|
||||
|
||||
![][5]
|
||||
|
||||
[Bitwarden][2] 是许多其他方便的密码管理器的不错替代品。
|
||||
|
||||
以下是它的特性:
|
||||
|
||||
* 提供免费和付费选择
|
||||
* 适用于团队(企业)和个人
|
||||
* 开源
|
||||
* 支持自托管
|
||||
* 能够作为身份验证器应用(如 Google 身份验证器)
|
||||
* 跨平台支持(安卓、iOS、Linux、Windows 和 macOS)
|
||||
* 提供浏览器扩展(Firefox,、Chrome、Opera、Edge、Safari)
|
||||
* 提供命令行工具
|
||||
* 提供网页保管库
|
||||
* 能够导入/导出密码
|
||||
* [密码生成器][6]
|
||||
* 自动填充密码
|
||||
* 两步身份验证
|
||||
|
||||
从技术上讲,Bitwarden 使用完全免费。然而,它也提供了一些付费计划(个人付费和商务付费计划)。
|
||||
|
||||
通过付费计划,你可以与更多用户共享密码、获取 API 访问权限(业务使用)以及更多此类高级功能。
|
||||
|
||||
以下是定价(在编写本文时):
|
||||
|
||||
![][7]
|
||||
|
||||
对于大多数个人来说,考虑到支持开源项目,10 美元/年的高级个人计划不应成为问题。当然,你也可以选择没有限制地免费使用。
|
||||
|
||||
### 在 Linux 上安装 Bitwarden
|
||||
|
||||
![][8]
|
||||
|
||||
很容易将 Bitwarden 安装到你的 Linux 系统上,因为它提供了一个 .AppImage 文件。如果你还不知道[如何使用 AppImage][9] 文件,你可以参考我们的指南。
|
||||
|
||||
如果你不喜欢使用 AppImage,你可以选择 [snap 包][10]或在其[官方下载页面][11]上下载 .deb 或者 .rpm 文件。你还可以查看其 [GitHub 页面][12]了解更多信息。
|
||||
|
||||
- [下载 Bitwarden][2]
|
||||
|
||||
如果你对使用桌面应用不感兴趣,也可以使用浏览器扩展。
|
||||
|
||||
### 我使用 Bitwarden 的体验
|
||||
|
||||
在 Bitwarden 之前,我使用 [LastPass][13] 作为密码管理器。尽管这不是一个糟糕的选择,但它不是开源软件。
|
||||
|
||||
所以,在我发现 Bitwarden 后就决定使用它。
|
||||
|
||||
首先,我从 LastPass 导出我的数据,并导入到 Bitwarden 没有遇到困难。在此过程中我没有丢失任何数据。
|
||||
|
||||
除了桌面应用,我一直在使用 Bitwarden 的火狐插件和 Android 应用。使用六个多月后,我没有遇到任何问题。所以,如果你愿意试试看,我一定会给它好评!
|
||||
|
||||
### 总结
|
||||
|
||||
我想说,对于那些想要一个可以到处工作,并且跨设备轻松同步的密码管理器的用户而言,Bitwarden 是一个完整的解决方案。
|
||||
|
||||
你可以免费入门,但如果可以,请购买 **10 美元/年**的高级计划来支持这个开源项目。
|
||||
|
||||
如果你正在寻找更多选择,你也可以查看我们的 [Linux 中 5 个最佳密码管理器][3]。
|
||||
|
||||
你试过 Bitwarden 了吗?如果没有,请试试看!此外,你最喜欢的密码管理器是什么?让我在下面的评论中知道!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/bitwarden/
|
||||
|
||||
作者:[Ankush Das][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://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/bitwarden-screenshot.jpg?ssl=1
|
||||
[2]: https://bitwarden.com/
|
||||
[3]: https://linux.cn/article-11531-1.html
|
||||
[4]: https://help.bitwarden.com/security/
|
||||
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/bitwarden-dark-mode.jpg?ssl=1
|
||||
[6]: https://itsfoss.com/password-generators-linux/
|
||||
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/bitwarden-pricing.jpg?ssl=1
|
||||
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/bitwarden-settings.png?ssl=1
|
||||
[9]: https://itsfoss.com/use-appimage-linux/
|
||||
[10]: https://snapcraft.io/bitwarden
|
||||
[11]: https://bitwarden.com/#download
|
||||
[12]: https://github.com/bitwarden
|
||||
[13]: https://www.lastpass.com/
|
@ -0,0 +1,84 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12114-1.html)
|
||||
[#]: subject: (New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu)
|
||||
[#]: via: (https://itsfoss.com/ubuntudde/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
新的 Linux 发行版 UbuntuDDE 将漂亮的深度桌面带到 Ubuntu
|
||||
======
|
||||
|
||||
深度是一个漂亮桌面环境,拥有直观的 UI。UbuntuDDE 项目结合了 Ubuntu 的强大和深度之美。
|
||||
|
||||
[深度桌面环境][1](DDE)是由[深度 Linux][2] 的开发人员创建的漂亮桌面环境。最初,深度 Linux 基于 [Ubuntu][3],但后来他们切换到了 [Debian][4]。
|
||||
|
||||
![Deepin Desktop Environment in Ubuntu][5]
|
||||
|
||||
深度 Linux 的一个主要问题是它的下载服务器速度较慢。常规系统需要花几个小时才能下载,因为他们的所有服务器都在中国,而这些服务器很不幸的是速度极慢。
|
||||
|
||||
如果你想使用深度桌面,那没有什么可以阻止你将其安装在常规 Ubuntu 系统上。[UbuntuDDE][6] 试图通过在 Ubuntu 之上为你提供开箱即用的深度桌面体验来使其更简单。这样可以节省你在 Ubuntu 上安装和配置深度桌面的时间和精力。
|
||||
|
||||
![Screenshot of UbuntuDDE][7]
|
||||
|
||||
### Ubuntu DDE:Ubuntu 的强大和深度桌面的漂亮
|
||||
|
||||
请注意,UbuntuDDE 不是 Ubuntu 的官方变种。UbuntuDDE 的开发人员与 Ubuntu 团队无关。UbuntuDDE 目前一个混合发行版,其目标是在未来的发行版中被接纳为 Ubuntu 的官方变种。
|
||||
|
||||
UbuntuDDE 开发人员得到了 Ubuntu Snapcraft 团队的 Alan Pope、Ubuntu Budgie 团队和 [Ubuntu Cinnamon][8] 团队,以及其他开发者,如 Hualet Wang 和 Felix Yan 的帮助。
|
||||
|
||||
在与 FOSS 的对话中,其主要开发人员 Arun 强调说,该项目的重点是定期维护 Ubuntu 的 DDE 软件包,并帮助用户享受 DDE(深度桌面环境)的全部乐趣。
|
||||
|
||||
![Ubuntu Deepin Edition login screen][9]
|
||||
|
||||
Arun 还提到,这个 Ubuntu 和深度的混合项目首先是维护和打包来自上游(即深度仓库)的最新版本。然后,它最终与 Ubuntu 20.04 focal 结合,生成了一个镜像文件,每个人都可以安装,而不必麻烦地先安装常规的 Ubuntu,然后再安装深度桌面。UbuntuDDE 不仅是 DDE 和 Ubuntu 的组合,而且还是 UbuntuDDE 团队的软件包选择和设计变更的融合。
|
||||
|
||||
![UbuntuDDE screenshot][10]
|
||||
|
||||
与 Deepin Linux 不同,UbuntuDDE 不使用深度应用商店。它改用 Ubuntu 软件中心。如果你被[这个来自武汉的深度 Linux 的间谍软件谣言][11]吓到了,这应该是一个好消息。
|
||||
|
||||
### 下载 UbuntuDDE 20.04 Beta
|
||||
|
||||
UbuntuDDE 的目标是与 Ubuntu 20.04 一起发布第一个正式的稳定版本。像[其他 Ubuntu 变种][12]一样,UbuntuDDE 20.04 beta 也可供你下载并尝试。
|
||||
|
||||
> 警告!
|
||||
>
|
||||
> 一句话警告。 UbuntuDDE 是正在开发的新手项目。请不要在你的主用系统上使用它。如果要尝试,请在虚拟机或备用系统中使用它。
|
||||
|
||||
- [下载 Ubuntu 20.04 DDE Beta][13]
|
||||
|
||||
![Installing UbuntuDDE][14]
|
||||
|
||||
由于本质上是 Ubuntu,因此安装 UbuntuDDE 与安装 Ubuntu 相同。你可以参考这篇教程,其中展示了[如何在 VirtualBox 内安装 Ubuntu][15]。
|
||||
|
||||
我知道你可能会认为这“不过是另一个 Ubuntu” 或者“只是 Ubuntu 上的深度,任何人都可以做到的”。但是我也知道有一小部分用户喜欢像 UbuntuDDE 这样的项目,这对他们来说使事情变得容易。我的意思是有许多 Ubuntu 变种就是这样出现的。你怎么看?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/ubuntudde/
|
||||
|
||||
作者:[Abhishek Prakash][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://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.deepin.org/en/dde/
|
||||
[2]: https://www.deepin.org/en/
|
||||
[3]: https://ubuntu.com/
|
||||
[4]: https://www.debian.org/
|
||||
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot.jpg?ssl=1
|
||||
[6]: https://ubuntudde.com/
|
||||
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-1.jpg?ssl=1
|
||||
[8]: https://itsfoss.com/ubuntu-cinnamon/
|
||||
[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-5.jpg?ssl=1
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-2.jpg?ssl=1
|
||||
[11]: https://www.deepin.org/en/2018/04/14/linux-deepin-is-not-spyware/
|
||||
[12]: https://itsfoss.com/which-ubuntu-install/
|
||||
[13]: https://ubuntudde.com/download/
|
||||
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-4.jpg?ssl=1
|
||||
[15]: https://itsfoss.com/install-linux-in-virtualbox/
|
@ -0,0 +1,203 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: 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)
|
||||
|
||||
使用 Reveal.js 和 Git 创建网页教程
|
||||
======
|
||||
|
||||
> 通过这个简单的工作流程创建的研讨会幻灯片,可以在任何浏览器、设备和平台上获得一致的查看效果。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/23/094800ohkpbjd3zbj0dj0d.jpg)
|
||||
|
||||
无论你是学习者还是教师,你可能都会认识到采用幻灯片放映来传播知识的在线<ruby>研讨会<rt>workshop</rt></ruby>的价值。如果你曾经偶然看到过这样一个逐页、逐章设置的井井有条的教程,你可能会想知道创建这样的一个网站有多难。
|
||||
|
||||
好吧,让我在这里向你展示,使用全自动化的流程来生成这样的教程是多么容易。
|
||||
|
||||
### 介绍
|
||||
|
||||
当我开始将学习内容放到网上置时,体验并不是很好。我想要的是一种可重复的、一致的、易于维护的东西,因为我的内容会随着我教学的技术发展而变化。
|
||||
|
||||
我尝试了许多交付模型,从 [Asciidoctor][2] 这样的低级代码生成器到在单个 PDF 文件中放置教程。全都不能让我满意。当我举办现场的在座研讨会时,我喜欢使用幻灯片放映,因此我想知道我是否可以为我自己的在线的,自定进度的研讨会体验做同样的事情。
|
||||
|
||||
经过一番挖掘,我为创建无痛的研讨会网站打下了基础。当时我已经在使用一个演示文稿生成框架,这对我来说是很有帮助的,因为这个框架可以产生对网站友好的格式(HTML)。
|
||||
|
||||
### 设置
|
||||
|
||||
这里是这个项目所需要的基本组件。
|
||||
|
||||
* 研讨会的想法(这是你的问题,我帮不了你)
|
||||
* 用于研讨会幻灯片的 Reveal.js
|
||||
* GitLab 项目仓库
|
||||
* 你常用的 HTML 代码编辑器
|
||||
* Web 浏览器
|
||||
* 在你的机器上安装好 Git
|
||||
|
||||
如果这个列表看起来令人望而生畏,那么有一个快速入门的方法,不需要把所有的东西一个个都拉到一起。你可以用我的模板项目来给你提供幻灯片和项目设置的入门教程。
|
||||
|
||||
本文假设你熟悉 Git 和在 Git 平台(如 GitLab)上托管项目。如果你需要指导或教程,请查看我们的[Git 入门系列][3]。
|
||||
|
||||
首先,将模板项目克隆到本地机器上。
|
||||
|
||||
```
|
||||
$ git clone https://gitlab.com/eschabell/beginners-guide-automated-workshops.git
|
||||
```
|
||||
|
||||
为此设置一个新的 GitLab 项目,导入模板项目作为初始导入。
|
||||
|
||||
研讨会网站有一些重要的文件。在**根目录**下,你会发现一个名为 `.gitlab-ci.yml` 的文件,当你向主分支提交修改时(即将拉取请求合并到 `master` 分支),这个文件会作为触发器。它可以触发将 `slides` 目录的全部内容复制到 GitLab 项目的 `website` 文件夹中。
|
||||
|
||||
我把它托管在我的 GitLab 账户中,名为 `beginners-guide-automated-workshops`。当它部署完毕后,你可以在浏览器中通过导航到下列地址查看 `slides` 目录的内容:
|
||||
|
||||
```
|
||||
https://eschabell.gitlab.io/beginners-guide-automated-workshops
|
||||
```
|
||||
|
||||
对于你的用户帐户和项目,URL 如下所示:
|
||||
|
||||
```
|
||||
https://[YOUR_USERNAME].gitlab.io/[YOUR_PROJECT_NAME]
|
||||
```
|
||||
|
||||
这些是你开始创建网站内容所需要的基本素材。当你推送修改后,它们会自动生成更新过的研讨会网站。请注意,默认模板包含了几个示例幻灯片,这将是你完成对存储库的完整签入后的第一个研讨会网站。
|
||||
|
||||
研讨会模板生成的结果是一个 [receive.js][4] 幻灯片,可以在任何浏览器中运行,并可以自动调整大小,几乎可以让任何人在任何地方、任何设备上观看。
|
||||
|
||||
这样创建一个方便、易访问的研讨会怎么样?
|
||||
|
||||
### 它是如何工作的
|
||||
|
||||
有了这些背景信息,你就可以开始探索研讨会的这些素材,并开始把你的内容放在一起了。你需要的一切都可以在项目的 `slides` 目录中找到;这里是使用 reveal.js 在浏览器中创建研讨会幻灯片的地方。
|
||||
|
||||
你将用来制作研讨会的文件和目录是:
|
||||
|
||||
* `default.css`文件
|
||||
* `images` 目录
|
||||
* `index.html`文件
|
||||
|
||||
在你常用的 HTML/CSS 编辑器中打开每一个文件,然后进行下面描述的修改。你用哪个编辑器并不重要,我更喜欢 [RubyMine IDE][5],因为它能在本地浏览器中提供页面预览。这对我在将内容推送到研讨会网站之前测试内容时很有帮助。
|
||||
|
||||
#### default.css 文件
|
||||
|
||||
文件 `css/theme/default.css` 是一个基础文件,你将在这里为你的研讨会幻灯片设置重要的全局设置。其中值得注意的两个主要的项目是所有幻灯片的默认字体和背景图片。
|
||||
|
||||
在 `default.css` 中,看一下标有 `GLOBAL STYLES` 的部分。当前的默认字体在这一行中列出了。
|
||||
|
||||
```
|
||||
font-family: "Red Hat Display", "Overpass", san-serif;
|
||||
```
|
||||
|
||||
如果你使用的是非标准字体类型,则必须在以下行中将其导入(Overpass 字体类型就是这样做的):
|
||||
|
||||
```
|
||||
@import url('SOME_URL');
|
||||
```
|
||||
|
||||
`background` 是你创建的每张幻灯片的默认图像。它存储在 `images` 目录下(见下面),并在下面这一行中设置(重点是图像路径)。
|
||||
|
||||
```
|
||||
background: url("…/…/images/backgrounds/basic.png")
|
||||
```
|
||||
|
||||
要设置一个默认背景,只需将这一行指向你要使用的图片。
|
||||
|
||||
#### images 目录
|
||||
|
||||
顾名思义,`images` 目录是用来存储你想在研讨会幻灯片上使用的图片。例如,我通常会把展示研讨会主题进展的截图放在我的个人幻灯片上。
|
||||
|
||||
现在,你只需要知道你需要将背景图片存储在一个子目录(`backgrounds`)中,并将你计划在幻灯片中使用的图片存储在 `images` 目录中。
|
||||
|
||||
#### index.html 文件
|
||||
|
||||
现在你已经把这两个文件整理好了,剩下的时间你就可以在 HTML 文件中创建幻灯片了,从 `index.html` 开始。为了让你的研讨会网站开始成形,请注意这个文件中的以下三个部分。
|
||||
|
||||
* `head `部分,在这里你可以设置标题、作者和描述。
|
||||
* `body` 部分,你可以在这里找到要设计的单个幻灯片。
|
||||
* 你可以在每个 `section` 中定义各个幻灯片的内容。
|
||||
|
||||
从 `head` 部分开始,因为它在顶部。模板项目有三个占位符行供你更新。
|
||||
|
||||
```
|
||||
<title>INSERT-YOUR-TITLE-HERE</title>
|
||||
<meta name="description" content="YOUR DESCIPTION HERE.">
|
||||
<meta name="author" content="YOUR NAME">
|
||||
```
|
||||
|
||||
`title` 标签包含文件打开时显示在浏览器选项卡中的文字。请将其改为与你的研讨会的标题相关的内容(或研讨会的某个部分),但记得要简短,因为标签页的标题空间有限。`description` 元标签包含了对你的工作坊的简短描述,而 `author` 元标签是你应该把你的名字(如果你是为别人写的,则是工作坊创建者的名字)。
|
||||
|
||||
现在继续到 `body` 部分。你会注意到它被分成了许多 `section` 标签。`body` 的开头包含了一个注释,说明你正在为每个标有 `section` 的打开和关闭的标签创建幻灯片。
|
||||
|
||||
```
|
||||
<body>
|
||||
<div class="reveal">
|
||||
|
||||
<!-- Any section element inside of this container is displayed as a slide -->
|
||||
<div class="slides">
|
||||
```
|
||||
|
||||
接下来,创建你的各个幻灯片,每张幻灯片都用 `section` 标签封装起来。这个模板包括了一些幻灯片来帮助你开始制作。例如,这里是第一张幻灯片。
|
||||
|
||||
```
|
||||
<section>
|
||||
<div style="width: 1056px; height: 300px">
|
||||
<h1>Beginners guide</h1>
|
||||
<h2>to automated workshops</h2>
|
||||
</div>
|
||||
<div style="width: 1056px; height: 200px; text-align: left">
|
||||
Brought to you by,<br/>
|
||||
YOUR-NAME<br/>
|
||||
</div>
|
||||
<aside class="notes">Here are notes: Welcome to the workshop!</aside>
|
||||
</section>
|
||||
```
|
||||
|
||||
这张幻灯片有两个区域,用 `div` 标签分隔。用空格隔开了标题和作者。
|
||||
|
||||
如果你有一定的 HTML 使用知识,可以尝试各种东西来开发你的研讨会。使用浏览器预览结果的时候真的很方便。有些 IDE 提供了本地查看修改,但你也可以打开 `index.html` 文件查看你的修改,然后再推送到资源库中。
|
||||
|
||||
一旦你对你的研讨会感到满意,推送你的修改,然后等待它们通过持续集成管道。它们将像模板项目一样被托管在 <https://eschabell.gitlab.io/beginners-guide-automated-workshops>。
|
||||
|
||||
### 了解更多
|
||||
|
||||
要了解更多关于这个工作流程可以做什么,请查看下面的示例研讨会和托管了研讨会集合的网站。所有这些都是基于本文中描述的工作流程。
|
||||
|
||||
研讨会例子:
|
||||
|
||||
* [Red Hat Process Automation Manage workshop][6]
|
||||
* [JBoss Travel Agency BPM Suite online workshop][7]
|
||||
|
||||
研讨会集合:
|
||||
|
||||
* [Rule the world: Practical decisions & process automation development workshops][8]
|
||||
* [Application development in the cloud workshop][9]
|
||||
* [Portfolio architecture: Workshops for creating impactful architectural diagrams][10]
|
||||
|
||||
我希望这本新手指南和模板研讨会项目能让你看到,在开发和维护研讨会网站的过程中,可以轻松、无痛地完成。我也希望这个工作流程能让你的研讨会受众几乎在任何设备上都能完全访问你的内容,这样他们就能从你分享的知识中学习到你的知识。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/4/create-web-tutorial-git
|
||||
|
||||
作者:[Eric D. Schabell][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://opensource.com/users/eschabell
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/read_book_guide_tutorial_teacher_student_apaper.png?itok=_GOufk6N (Person reading a book and digital copy)
|
||||
[2]: https://asciidoctor.org/
|
||||
[3]: https://opensource.com/resources/what-is-git
|
||||
[4]: https://revealjs.com/#/
|
||||
[5]: https://www.jetbrains.com/ruby/
|
||||
[6]: https://gitlab.com/bpmworkshop/rhpam-devops-workshop
|
||||
[7]: https://gitlab.com/bpmworkshop/presentation-bpmworkshop-travel-agency
|
||||
[8]: https://bpmworkshop.gitlab.io/
|
||||
[9]: https://appdevcloudworkshop.gitlab.io/
|
||||
[10]: https://redhatdemocentral.gitlab.io/portfolio-architecture-workshops
|
@ -0,0 +1,84 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (qfzy1233)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12118-1.html)
|
||||
[#]: subject: (How to Create Templates in LibreOffice to Save Time and Increase Productivity)
|
||||
[#]: via: (https://itsfoss.com/create-templates-libreoffice/)
|
||||
[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/)
|
||||
|
||||
如何在 LibreOffice 中创建模板以实现省时高效
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/16/214314y17oww0ymfylyn1m.jpg)
|
||||
|
||||
在 [LibreOffice][1] 中为你经常使用的文档创建模板可以为你节省一些时间。它可以是信件、财务表格抑或是简报。
|
||||
|
||||
模板不仅可以为你节省时间,另一方面它可以保证在同一机构内参与统一项目的小组成员文档的一致性。
|
||||
|
||||
举例而言,如果你是一家需要经常开具工作经验证明的企业,你可以创建一个模板,而不再需要从某个地方复制粘贴已保存的文档。当你需要开具一个新的经验证明时,你可以从模板中创建,稍微编辑一下就可以了。
|
||||
|
||||
LibreOffice 默认情况下提供了一些模板,但并不仅仅局限于使用这些,你可以根据自己的需求自由定制。
|
||||
|
||||
我认为模板是每个用户都应该了解的 [LibreOffice 基础技巧之一][2]。下面我将为你演示如何使用。
|
||||
|
||||
### 如何在 LibreOffice 中创建一个模板
|
||||
|
||||
首先,创建你希望通过最少的编辑就可以重复使用的文档。它可以是文档、电子表格或演示文稿。我在示例中使用的是 word 文档,但是所有步骤都是相同的。
|
||||
|
||||
然后转到“文件”选项卡并选择“存储为模板”。你将被提示输入“名称”及选择“类别”,再单击“保存”。
|
||||
|
||||
![Creating a new template in LibreOffice][3]
|
||||
|
||||
此文件将以 .ots 格式保存在 LibreOffice 的模板文件夹中。你可以在其他安装了 LibreOffice 的系统上使用这些 .ots 文件,并在这些系统上使用相同的模板。
|
||||
|
||||
### 如何在 LibreOffice 中使用模板
|
||||
|
||||
要使用模板,请选择 “文件选项卡”,然后选择 “模板”。
|
||||
|
||||
不要担心! LibreOffice 在打开一个模板时会在不影响原始模板的情况下创建一个副本。你可以随意编辑文档而不必担心模板发生改动。
|
||||
|
||||
![Using templates][4]
|
||||
|
||||
选择模板后,单击打开。你就可以随意编辑了。
|
||||
|
||||
### 如何在 LibreOffice 中更改模板
|
||||
|
||||
我们需求可能会不时变化,所以需要对模板进行相应。
|
||||
|
||||
编辑一个现有的模板,单击“文件” -> “模板”,然后右键单击所需的模板,然后单击“编辑”。
|
||||
|
||||
![edit Template][5]
|
||||
|
||||
当你完成对模板的编辑时,单击“保存”以使更改生效。
|
||||
|
||||
总之,模板不仅可以减少重复任务的工作量,还可以防止用户出错。你可以利用电脑优势来灵活的处理重复性的任务,并以此提高你的效率。
|
||||
|
||||
> 福利小贴士
|
||||
|
||||
你可以在 [LibreOffice 网站][7]上找到大量的附加模板。你可以搜索你需要的,下载并使用它们。请注意,这些模板来自第三方和未经验证的用户。所以使用它们的风险需要自己承担。
|
||||
|
||||
之后我会继续分享更多这样的技巧。同时,你还可以学习一下如何创建模板[在 GNOME 的右键菜单上下文中添加“创建新文档”选项][8]。
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/create-templates-libreoffice/
|
||||
|
||||
作者:[Dimitrios Savvopoulos][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[qfzy1233](https://github.com/qfzy1233)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/dimitrios/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.libreoffice.org/
|
||||
[2]: https://itsfoss.com/libreoffice-tips/
|
||||
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/1.Template-save-as.png?resize=800%2C567&ssl=1
|
||||
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/2.Use-a-template.png?ssl=1
|
||||
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/3.edit-template.png?ssl=1
|
||||
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/LibreOffice-logo.jpeg?fit=800%2C450&ssl=1
|
||||
[7]: https://extensions.libreoffice.org/templates
|
||||
[8]: https://itsfoss.com/add-new-document-option/
|
@ -0,0 +1,111 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12124-1.html)
|
||||
[#]: subject: (Here’s 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 论坛中寻求帮助,那么你可能会被问以下问题:
|
||||
|
||||
> “你使用的是哪个桌面环境?”
|
||||
|
||||
你知道什么是<ruby>桌面环境<rt>desktop environment</rt></ruby>(DE),但你如何知道你使用的是哪一个?我会告诉你如何找到它。我将首先展示命令行方法,因为这适用于[各种 Linux 发行版][1]。我还将展示如何通过图形方式获得。
|
||||
|
||||
### 检查你使用的是哪个桌面环境
|
||||
|
||||
![][2]
|
||||
|
||||
你可以[在 Linux 中使用 echo 命令][3]在终端中显示 `XDG_CURRENT_DESKTOP` 变量的值。
|
||||
|
||||
打开终端并复制粘贴此命令:
|
||||
|
||||
```
|
||||
echo $XDG_CURRENT_DESKTOP
|
||||
```
|
||||
|
||||
例如,这表明我在 [Ubuntu 20.04][5] 中使用了 [GNOME 桌面][4]:
|
||||
|
||||
```
|
||||
[email protected]:~$ echo $XDG_CURRENT_DESKTOP
|
||||
ubuntu:GNOME
|
||||
```
|
||||
|
||||
尽管此命令可以快速告诉你正在使用哪个桌面环境,但它不会提供任何其他信息。
|
||||
|
||||
在某些情况下,了解桌面环境版本可能很重要。软件的每个新版本都会带来新功能或删除某些功能。[GNOME 3.36][6] 引入了“请勿打扰”选项,以关闭所有桌面通知。
|
||||
|
||||
假设你了解了这个新的“请勿打扰”功能。你确认自己正在使用 GNOME,但是在 GNOME 桌面上看不到此选项。如果你可以检查系统上已安装的 GNOME 桌面版本,那么这会很清楚。
|
||||
|
||||
我将先向你展示命令检查桌面环境版本,因为你可以在任何运行桌面环境的 Linux 中使用它。
|
||||
|
||||
### 如何获取桌面环境版本
|
||||
|
||||
与获取桌面环境的名称不同。获取其版本号的方法并不直接,因为它没有标准的命令或环境变量可以提供此信息。
|
||||
|
||||
在 Linux 中获取桌面环境信息的一种方法是使用 [Screenfetch][7] 之类的工具。此[命令行工具以 ascii 格式显示 Linux 发行版的 logo][8] 以及一些基本的系统信息。桌面环境版本就是其中之一。
|
||||
|
||||
在基于 Ubuntu 的发行版中,你可以通过[启用 Universe 仓库][9]安装 Screenfetch,然后使用以下命令:
|
||||
|
||||
```
|
||||
sudo apt install screenfetch
|
||||
```
|
||||
|
||||
对于其他 Linux 发行版,请使用系统的软件包管理器来安装此程序。
|
||||
|
||||
安装后,只需在终端中输入 `screenfetch` 即可,它应该显示桌面环境版本以及其他系统信息。
|
||||
|
||||
![Check Desktop Environment Version][10]
|
||||
|
||||
如上图所示,我的系统使用 GNOME 3.36.1(基本版本是 GNOME 3.36)。你也可以这样[检查 Linux 内核版本][11]和其他详细信息。
|
||||
|
||||
请记住,Screenfetch 不一定显示桌面环境版本。我查看了它的源码,它有许多 if-else 代码,可以从各种桌面环境中的许多源和参数获取版本信息。如果找不到任何版本,那么仅显示桌面环境名称。
|
||||
|
||||
### 使用 GUI 检查桌面环境版本
|
||||
|
||||
几乎所有桌面环境在其 “Settings”->“About” 部分中都提供了基本的系统详细信息。
|
||||
|
||||
一个主要问题是,大多数桌面环境看起来都不同,因此我无法展示每个桌面环境的确切步骤。我将展示 GNOME 的,让你在桌面上发现它。
|
||||
|
||||
在菜单中搜索 “Settings”(按 Windows 键并搜索):
|
||||
|
||||
![Search for Settings application][12]
|
||||
|
||||
在这里,找到底部的 “About” 部分。单击它,你应该就能看到桌面环境及其版本。
|
||||
|
||||
![Check Desktop Environment in Ubuntu][13]
|
||||
|
||||
如你所见,这表明我的系统正在使用 GNOME 3.36。
|
||||
|
||||
我希望这个快速入门技巧对你有所帮助。如果你有任何疑问或建议,请在下面发表评论。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/find-desktop-environment/
|
||||
|
||||
作者:[Abhishek Prakash][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://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/what-is-linux/
|
||||
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment.jpg?ssl=1
|
||||
[3]: https://linuxhandbook.com/echo-command/
|
||||
[4]: https://www.gnome.org/
|
||||
[5]: https://itsfoss.com/ubuntu-20-04-release-features/
|
||||
[6]: https://itsfoss.com/gnome-3-36-release/
|
||||
[7]: https://github.com/KittyKatt/screenFetch
|
||||
[8]: https://itsfoss.com/display-linux-logo-in-ascii/
|
||||
[9]: https://itsfoss.com/ubuntu-repositories/
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment-version.jpg?ssl=1
|
||||
[11]: https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/
|
||||
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/applications_menu_settings.jpg?ssl=1
|
||||
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment-ubuntu.jpg?ssl=1
|
@ -0,0 +1,136 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: 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 种语言的?
|
||||
======
|
||||
|
||||
> 通过使用人类和机器生成的翻译,可以将关键的健康短语翻译成世界各地的当地语言。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/20/184427f1a2t5z61m5xxo1t.jpg)
|
||||
|
||||
你可能不知道,目前世界上有 [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 种语言和英语之间的跨语言单词嵌入。然后,这些嵌入方法可以从现有文档中提取出与目标短语相似的短语。
|
||||
|
||||
我与 SIL 国际公司的同事们合作完成了这项工作,他们收集了该短语的更多的人工翻译结果。这些人工翻译结果和我的一些机器翻译结果的组合可以在[这个民族语指南页面][3]上搜索到(机器生成的短语用一个小的机器人图标表示),更多的翻译将在生成/收集到的时候加入。
|
||||
|
||||
### 利用现有的语料库
|
||||
|
||||
SIL 国际公司已经完成了 2000 多种语言的语言工作,目前管理着 1600 多个语言项目。因此,当我解决这个特殊的问题时,我知道我们很可能已经多次将“请洗手”和/或类似的短语翻译成了数百种语言,而这一猜测得到了回报。我很快就从我们的档案库中收集到了超过 900 种语言的文档(主要是完成的贝壳书模板、教材和圣经)。这些文档中的每一份都有一个英文的对应版本,其中必然包括“请洗手”和/或类似“请洗脸”这样的短语。此外,这些文档的质量都很高,并与当地语言社区合作进行了翻译和检查。
|
||||
|
||||
这是相当多语言的数据集。然而,有两个问题需要克服。首先,这个数据包含了大多数语言的数千种样本,这与训练机器翻译模型所使用的数百万个样本形成了鲜明对比。其次,即使文档中包含目标语言中的“请洗手”这个短语,我们也不知道这个短语在周围文本中的确切位置。
|
||||
|
||||
我们当然可以利用[低资源语言的机器翻译][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>的单词嵌入。
|
||||
|
||||
![Using fasttext along with MUSE to perform cross-language embedding][8]
|
||||
|
||||
一旦产生了跨语言嵌入,我们就可以开始在目标语言文档中寻找短语组件。结果发现,整个文档中清楚地使用了“请洗脸”这个短语以及单独的“手”、“请洗”等词。对于每一种语言,我都通过 n-gram 搜索我预期该短语会出现的地方(根据其在英语的对应版本中的用法)。使用跨语言嵌入法对 n-gram 进行了矢量化处理,并使用各种距离指标与英语短语的矢量化版本进行了比较。在嵌入空间中,与英文短语“最接近”的 n-gram 被确定为与目标语言匹配。
|
||||
|
||||
最后,将与英语对应的成分短语进行组合,生成目标语言中的“请洗手”短语。这种组合方式再次利用了跨语言嵌入,以确保以合适方式组合组件。例如,如果我们在目标语言中匹配“请洗脚”这个短语,就必须将“脚”对应的 n-gram 替换成“手”对应的 n-gram。下面是<ruby>伯利兹·克里奥尔<rt>Belize Kriol</rt></ruby>英语的一个例子:
|
||||
|
||||
![][9]
|
||||
|
||||
当然,在这个匹配过程中,会做一些假设,这个过程完全有可能不能产生语法上正确的预测。例如,我假设在大多数语言中,“手”的单词和“脚”的单词都是一个<ruby>字元<rt>token</rt></ruby>长的(字元由空格和标点符号隔开)。当然并非总是如此。这可能会造成类似于“和洗和手你”或类似的瑕疵词条。希望我们可以克服其中的一些局限性,并在未来扩展这个系统,但是,现在,我们选择用图形来强化这个想法。
|
||||
|
||||
我们将世界卫生组织的洗手说明改编成了一个 PNG 图片模板。然后,我们把我们翻译和生成的短语,用 Bash 和 Go 脚本的组合将其渲染到洗手图像中。这样,在文字和图像中都强调了正确洗手的理念(以防万一我们生成的翻译很尴尬)。
|
||||
|
||||
![][10]
|
||||
|
||||
### 结果
|
||||
|
||||
到目前为止,我已经能够训练出 544 种语言的跨语言嵌入。我使用上述讨论过的方法尝试为所有这些语言构建“请洗手”这个短语。因为我没有许多语言对的对齐数据,所以我使用了同样包含“请洗手”成分的单独的保留文档来帮助验证构造短语中的字元。这让我们对公开发布的翻译版本有了一些信心(至少它们包含了表示“洗”和/或“手”的信息)。此外,我还将该方法与谷歌翻译支持的和/或有可用的人工翻译的语言对进行了比较。以下是来自 [Ethnologue][11] 带有语言统计的翻译样本。
|
||||
|
||||
**语言:意大利语 [Ita]**
|
||||
|
||||
- 地点:意大利
|
||||
- 人口: 68,000,000
|
||||
- 我们的系统: làvati la mani
|
||||
- 谷歌翻译: Lavati le mani
|
||||
|
||||
**语言:保加利亚语 [bul]**
|
||||
|
||||
- 地点:保加利亚
|
||||
- 人口:8,000,000
|
||||
- 我们的系统:умий ръцете
|
||||
- 谷歌翻译:Измий си ръцете
|
||||
|
||||
**语言: 荷兰语 [nld]**
|
||||
|
||||
- 地点:荷兰
|
||||
- 人口:24,000,000,000
|
||||
- 我们的系统:wast uw handen
|
||||
- 谷歌翻译:Was je handen
|
||||
|
||||
**语言: Pijin [pis]**
|
||||
|
||||
- 地点:所罗门群岛
|
||||
- 人口: 550,000
|
||||
- 我们的系统:wasim han
|
||||
- 谷歌翻译:不支持
|
||||
|
||||
**语言:Tikar [tik]**
|
||||
|
||||
- 地点:喀麦隆
|
||||
- 人口:110,000
|
||||
- 我们的系统:ɓɔsi fyàʼ
|
||||
- 谷歌翻译:不支持
|
||||
|
||||
**语言:Waffa [waj]**
|
||||
|
||||
- 地点:巴布亚新几内亚
|
||||
- 人口:1,300
|
||||
- 我们的系统:yaakuuvaitana nnikiiyauvaa fini
|
||||
- 谷歌翻译:不支持
|
||||
|
||||
构造的短语类似于参考翻译,或者似乎是“请洗手”的另一种说法。例如,在保加利亚语中,我预测为“умий ръцете”,而谷歌翻译预测为“Измий си ръцете”。 然而,如果我用谷歌翻译回译我的预测,我还是会得到“请洗手”。有一些不确定的地方,我无法与参考译文(例如,所罗门群岛的 Pijin [pis])或人类注释的跨度进行比较,但我仍然可以验证“洗”(wasim)和“手”(han)分别用在其他必定是谈论洗或手的参考文件中。 大约有 15% 的译文可以用这个方法验证,我希望在收集参考文献字典的过程中能进行更多的验证。
|
||||
|
||||
请注意,我最多使用了每种语言中大约 7000 个句子来得到上述译文,即使是意大利语这样的高资源语言也是如此。我也不依赖语言对之间的对齐句子。尽管存在这种数据非常稀缺、无监督的情况,但对于两个系统都支持的语言,我仍然能够获得类似于谷歌翻译的短语。这证明了这种“混合”方法(无监督的单词嵌入+基于规则的匹配)在将短语翻译成数据非常少的语言中的潜在用途。
|
||||
|
||||
注意:我绝对不是说这是解决冠状病毒和其他健康相关的信息传播问题的解决方案。这里仍有很多东西需要探索和正式评估,我们正在为此努力。在很多情况下,这种方法无法帮助构建数百种语言的重要信息资料。但是,我认为,我们所有人都应该尝试着为当前危机的相关问题制定创造性的解决方案。也许这只是一个非常大的拼图中的一块。
|
||||
|
||||
你可以在[这个民族语言指南][3]上查看经过验证的译文加上人工翻译的完整列表。此外,我们即将以论文的形式对这一系统进行更深入的描述和分析。我们欢迎公众对翻译进行反馈,以帮助系统进行微调,最重要的是,确保将健康信息传递给世界各地的边缘化语言社区。
|
||||
|
||||
### 制作自己的洗手海报
|
||||
|
||||
我们已经开源了[用于渲染复合的脚本和生成洗手海报的代码][12]。这种方法应该能够处理几乎所有的语言和脚本。你可以在海报中添加你自己的“请洗手”的翻译,以帮助传播,或者根据自己的本地语境进行翻译。请务必在社交媒体上以 #WashYourHands 为标签分享你生成的海报。
|
||||
|
||||
### 培养你的 AI 技能
|
||||
|
||||
有很多令人兴奋的 AI 问题,可以给世界带来巨大的影响。如果你想用人工智能解决像上面提到的问题,或者你认为你的企业可能需要开始利用人工智能来做其他事情(供应链优化、推荐、客户服务自动化等),那么不要错过今年 5 月的[AI 课堂培训活动][13]。*AI 课堂*是一个沉浸式的、为期三天的虚拟培训活动,适合至少有一定编程经验和数学基础知识的人参加。该培训提供了使用 Python 和开源框架(如 TensorFlow 和 PyTorch)进行现实的 AI 开发的实用基础知识。完成课程后,学员将有信心开始开发和部署自己的 AI 解决方案。
|
||||
|
||||
本文经许可转载自 https://datadan.io/blog/wash-your-hands
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/4/ai-translation
|
||||
|
||||
作者:[Daniel Whitenack][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://opensource.com/users/datadan
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/world_hands_diversity.png?itok=zm4EDxgE (Two diverse hands holding a globe)
|
||||
[2]: https://www.ethnologue.com/guides/how-many-languages
|
||||
[3]: https://www.ethnologue.com/guides/health
|
||||
[4]: https://datadan.io/blog/resources-for-low-resource-machine-translation
|
||||
[5]: https://en.wikipedia.org/wiki/BLEU
|
||||
[6]: https://github.com/facebookresearch/MUSE
|
||||
[7]: https://fasttext.cc/
|
||||
[8]: https://opensource.com/sites/default/files/uploads/ai-language-translation-wash-your-hands-opensourcedotcom.gif (Using fasttext along with MUSE to perform cross-language embedding)
|
||||
[9]: https://opensource.com/sites/default/files/uploads/ai-language-translation-wash-your-hands-opensourcedotcom2.gif
|
||||
[10]: https://opensource.com/sites/default/files/uploads/ai-language-translation-wash-your-hands-opensourcedotcom3.gif
|
||||
[11]: https://www.ethnologue.com/
|
||||
[12]: https://github.com/sil-ai/wash-your-hands
|
||||
[13]: https://datadan.io/
|
@ -0,0 +1,112 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (HankChow)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12098-1.html)
|
||||
[#]: subject: (How to Go Full Dark Mode in Ubuntu 20.04)
|
||||
[#]: via: (https://itsfoss.com/dark-mode-ubuntu/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
在 Ubuntu 20.04 中完全进入深色模式
|
||||
======
|
||||
|
||||
> 深色模式是 Ubuntu 20.04 最受瞩目的[新功能][1]之一了。任何版本的 Ubuntu 都可以通过[安装深色主题][2]让用户界面拥有一个深色的外观,但在 Ubuntu 20.04 中,这个过程变得更简单。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/11/200841gvvaja25jaz5z7hv.jpg)
|
||||
|
||||
在 Ubuntu 20.04 中,无需额外安装主题,默认主题(称为 Yaru)本身就带有三种模式,其中就包括深色模式。
|
||||
|
||||
下面我会展示如何将 Ubuntu 系统完全设置为深色模式。
|
||||
|
||||
### 在 Ubuntu 20.04 打开深色模式
|
||||
|
||||
- [video](https://player.vimeo.com/video/405726943)
|
||||
|
||||
这个步骤是在 GNOME 桌面上进行的,如果你[使用的是其它桌面][4],你看到的可能会和下面的截图不一样。
|
||||
|
||||
按下 super 键(或 Windows 键),然后输入 “settings”,就可以找到系统设置。
|
||||
|
||||
![Search for Settings][5]
|
||||
|
||||
在系统设置中,进入“<ruby>外观<rt>Appearance</rt></ruby>”部分,就可以看到<ruby>浅色<rt>light</rt></ruby>、<ruby>标准<rt>standard</rt></ruby>和<ruby>深色<rt>dark</rt></ruby>三个选项。既然要使用深色模式,那自然而然要选择“深色”这个选项了。
|
||||
|
||||
![Enable Dark Theme in Ubuntu][6]
|
||||
|
||||
完成设置以后,使用了 GTK3 的应用程序都可以跟随深色模式。因此你会看到系统中包括文本编辑器、终端、LibreOffice 等在内的大多数应用程序都已经切换成深色了。但未使用 GTK3 的应用程序可能并没有跟随进入深色模式,下面我会展示如何更完整地进入深色模式。
|
||||
|
||||
### 继续调整,进入完整深色模式
|
||||
|
||||
这个时候你会发现,shell 主题、屏幕顶部面板中的消息托盘和系统托盘还仍然保持在原有的模式当中。
|
||||
|
||||
![No Dark Shell by default in Ubuntu][7]
|
||||
|
||||
现在就需要使用 [GNOME 扩展][8]安装 Yaru 深色 shell 主题了。[在 Ubuntu 中通过 Ctrl+Alt+T 打开终端][9],然后执行以下这个命令安装浏览器扩展:
|
||||
|
||||
```
|
||||
sudo apt install chrome-gnome-shell
|
||||
```
|
||||
|
||||
进入[扩展页面][10]启用这个扩展:
|
||||
|
||||
![Enable User Themes GNOME Extension][11]
|
||||
|
||||
执行以下命令安装 [GNOME 调整工具][12]:
|
||||
|
||||
```
|
||||
sudo apt install gnome-tweaks
|
||||
```
|
||||
|
||||
打开 GNOME 调整工具,进入“<ruby>外观<rt>Appearance</rt></ruby>”部分,就可以看到 shell 主题的选项,现在只需要把它启用就可以了。
|
||||
|
||||
![Enable Yaru Dark Shell Theme in Ubuntu][13]
|
||||
|
||||
设置完之后再观察一下,桌面通知、消息托盘、系统托盘等等都已经进入深色模式了。
|
||||
|
||||
![Yaru Dark Shell Theme in Ubuntu][14]
|
||||
|
||||
现在感觉好多了。但你可能还会注意到,在使用浏览器访问网站的时候,很多网站都使用了白色的背景色。如果期望网站方提供深色模式,那是很不现实的,但我们可以自己实现这一件事。
|
||||
|
||||
你需要用到的东西就是诸如 [Dark Reader][15] 这样的浏览器扩展。《[在 Firefox 中启用深色模式][16]》这篇文章中也有讨论过这个浏览器扩展,它的使用过程并不复杂,如果你使用的浏览器是 Firefox、Chrome 或 [Ubuntu 下的 Chromium][17],就可以直接安装[其官方网站][15]上列出的扩展。
|
||||
|
||||
Dark Reader 安装完成后,就会以深色模式打开网站了。
|
||||
|
||||
![It’s FOSS Homepage in Dark Mode with Dark Reader][18]
|
||||
|
||||
当然,有些外部的第三方应用程序可能仍然是浅色状态。如果它们自己附带了深色模式的选项,就需要手动启用它们的深色模式。
|
||||
|
||||
如今,深色模式在非开发者人群中也越来越流行了。按照以上的步骤,你就可以轻松进入深色模式。
|
||||
|
||||
请享受深色模式。
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/dark-mode-ubuntu/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[HankChow](https://github.com/HankChow)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [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://itsfoss.com/install-themes-ubuntu/
|
||||
[3]: https://www.youtube.com/c/itsfoss?sub_confirmation=1
|
||||
[4]: https://itsfoss.com/find-desktop-environment/
|
||||
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/settings-search-ubuntu-20-04.jpg?ssl=1
|
||||
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/enable-dark-theme-ubuntu.png?ssl=1
|
||||
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/no-dark-shell-ubuntu.jpg?ssl=1
|
||||
[8]: https://itsfoss.com/gnome-shell-extensions/
|
||||
[9]: https://itsfoss.com/ubuntu-shortcuts/
|
||||
[10]: https://extensions.gnome.org/extension/19/user-themes/
|
||||
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/enable-user-themes-gnome.jpg?ssl=1
|
||||
[12]: https://itsfoss.com/gnome-tweak-tool/
|
||||
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-yaru-dark-shell-theme.jpeg?ssl=1
|
||||
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/yaru-dark-shell-theme-ubuntu.jpg?ssl=1
|
||||
[15]: https://darkreader.org/
|
||||
[16]: https://itsfoss.com/firefox-dark-mode/
|
||||
[17]: https://itsfoss.com/install-chromium-ubuntu/
|
||||
[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/01/itsfoss_dark_mode.jpg?ssl=1
|
@ -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” 并选择了所需的镜像文件。这个过程几乎是相同的。唯一真正的不同是我必须在下载目录中搜寻并选择一个镜像。文件写完后,回到树莓派 3,RISC 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/
|
@ -0,0 +1,94 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12121-1.html)
|
||||
[#]: subject: (How to Add Multiple Time Zones in Ubuntu)
|
||||
[#]: via: (https://itsfoss.com/add-multiple-time-zones-ubuntu/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
如何在 Ubuntu 中添加多个时区
|
||||
======
|
||||
|
||||
> 本快速教程介绍了在 Ubuntu 和其他发行版中使用 GNOME 桌面环境添加多时区时钟的步骤。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/18/142021jborblzkglbebrkk.jpg)
|
||||
|
||||
如果你的家人或同事在另一个国家,或者你居住在一个有多个时区的国家,那么了解时差就变得很重要。毕竟,你不想在凌晨 4 点打电话打扰别人。
|
||||
|
||||
一些 Linux 用户还会记下 [UTC 时间][1],因为大多数服务器都使用 UTC。
|
||||
|
||||
如果你有多个时钟,那么可以更好地管理此类情况。你可以将一个时钟设置为本地时间,并将其他时钟同步到其他时区。这使得了解不同时间变得更加容易。
|
||||
|
||||
在本教程中,我将向你展示如何在 Ubuntu 和其他使用 GNOME 桌面环境的 Linux 发行版中添加其他时钟。
|
||||
|
||||
### 在 Ubuntu(以及其他使用 GNOME 的 Linux)中添加多个时区时钟
|
||||
|
||||
请[检查你正在使用的桌面环境][2]。本教程仅适用于 GNOME 桌面。
|
||||
|
||||
要添加其他时钟,可以使用一个叫 [GNOME Clocks][3] 的小程序。
|
||||
|
||||
GNOME Clocks 是一个简单的应用,它可以显示多个位置的时间和日期。你也可以使用它来设置闹钟或计时器,它还包括秒表功能。
|
||||
|
||||
GNOME Clocks 存在于 Ubuntu 的 Universe 仓库中。因此,请确保首先[启用 Universe 仓库][4]。
|
||||
|
||||
你可以在软件中心中搜索 “GNOME Clocks” 并从那里安装它。
|
||||
|
||||
![Gnome Clocks Ubuntu Software Center][5]
|
||||
|
||||
或者,你可以打开终端并使用以下命令来安装 GNOME Clocks:
|
||||
|
||||
```
|
||||
sudo apt install gnome-clocks
|
||||
```
|
||||
|
||||
如果你使用的是其他 Linux 发行版,那么请使用发行版的软件中心或软件包管理器来安装此程序。
|
||||
|
||||
安装后,请按 `Super` 键( `Windows` 键)并搜索 clocks:
|
||||
|
||||
![Gnome Clocks App Search Ubuntu][6]
|
||||
|
||||
启动程序,你应该会看到一个界面,提供一些选项,例如添加世界时钟、设置闹钟、使用秒表和计时器。
|
||||
|
||||
单击左上角的 “+” 号,它将为你提供搜索地理位置的选项。搜索、选择并添加。
|
||||
|
||||
![Adding additional clocks][7]
|
||||
|
||||
通过地理位置添加所需的时区后,你可以看到现在在消息托盘中添加了这个新时钟。它还显示了你当地时间与其他时区之间的时差。
|
||||
|
||||
![Multiple clocks for multiple time zones][8]
|
||||
|
||||
你可以使用 `Super + M` 键快速打开消息托盘。你可以掌握这些[有用的 Ubuntu 快捷方式][9]来节省时间。
|
||||
|
||||
如果要删除其他时钟,你可以从 GNOME Clocks 应用界面执行以下操作:
|
||||
|
||||
![Remove Additional Clocks][10]
|
||||
|
||||
你无法(在这里)删除当前时区并设置为其他时区。有其他方法[更改 Linux 中的当前时区][11]。
|
||||
|
||||
我希望你喜欢这个快速技巧。欢迎提出问题和建议。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/add-multiple-time-zones-ubuntu/
|
||||
|
||||
作者:[Abhishek Prakash][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://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://en.wikipedia.org/wiki/Coordinated_Universal_Time
|
||||
[2]: https://itsfoss.com/find-desktop-environment/
|
||||
[3]: https://wiki.gnome.org/Apps/Clocks
|
||||
[4]: https://itsfoss.com/ubuntu-repositories/
|
||||
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/gnome-clocks-ubuntu-software-center.jpg?ssl=1
|
||||
[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/gnome-clocks-app-search-ubuntu.jpg?ssl=1
|
||||
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/add-multiple-time-zones-gnome.jpg?ssl=1
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/multiple-clocks-ubuntu.jpg?ssl=1
|
||||
[9]: https://itsfoss.com/ubuntu-shortcuts/
|
||||
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/remove-additional-clocks-ubuntu.jpg?ssl=1
|
||||
[11]: https://itsfoss.com/change-timezone-ubuntu/
|
149
published/202004/20200413 How to install Python on Linux.md
Normal file
149
published/202004/20200413 How to install Python on Linux.md
Normal 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
|
@ -0,0 +1,82 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: 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/)
|
||||
|
||||
如何在 Linux 的 Nautilus 文件管理器中以管理员身份打开文件和文件夹
|
||||
======
|
||||
|
||||
> 了解如何在 Ubuntu 和其他 Linux 发行版的 Nautilus 文件管理器的右键菜单中添加“以管理员身份打开”选项。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/19/211224hurk01u0kuvqnpvn.jpg)
|
||||
|
||||
如果要以根用户身份打开或编辑文件,你总是可以在终端中执行此操作。但我知道有些人对命令行不适应。
|
||||
|
||||
桌面 Linux 通常为那些害怕终端的人提供方法避免命令行。
|
||||
|
||||
如果你必须以 root 用户身份访问文件夹或以 root 用户权限编辑文件,那你可以在 [Nautilus 文件管理器][1]中以图形方式进行操作。
|
||||
|
||||
一个小巧优雅的 Nautilus 技巧能让你以管理员(也就是 root)打开文件和文件夹。让我向你展示如何做。
|
||||
|
||||
### 在 Nautilus 文件管理器的右键菜单中添加“以管理员身份打开”选项
|
||||
|
||||
> 警告!请不要以 root 用户身份打开和编辑随机文件,因为这样可能会弄乱文件并导致系统损坏。仅在需要时使用它。
|
||||
|
||||
我展示的是 Ubuntu 的步骤。你可以根据你的发行版的软件包管理器进行更改。
|
||||
|
||||
你必须使用终端(即使你不喜欢它)来安装 Nautilus 插件。请[确保已启用 Universe 仓库][4]:
|
||||
|
||||
```
|
||||
sudo apt install nautilus-admin
|
||||
```
|
||||
|
||||
关闭并再次打开 Nautilus 文件管理器以查看更改生效。
|
||||
|
||||
![Right clock to see the “Open as Administrator” option][5]
|
||||
|
||||
你也可以用 root 用户身份编辑文件。只需选择文件,右键单击它,然后选择“以管理员身份编辑”选项。
|
||||
|
||||
![Edit Files As Root Ubuntu][6]
|
||||
|
||||
这两种情况下,系统都会提示你输入帐户密码:
|
||||
|
||||
![You need to enter your password, of course][7]
|
||||
|
||||
差不多了。你可以享受 GUI 的舒适了。
|
||||
|
||||
如果你不想再以 root 用户身份运行 Nautilus,那么可以删除此插件。删除已安装但不再使用的其他东西总是没错的。
|
||||
|
||||
在终端中(没错,再一次在终端),使用以下命令删除 Nautilus 插件。
|
||||
|
||||
```
|
||||
sudo apt remove nautilus-admin
|
||||
```
|
||||
|
||||
顺便说一句,如果你在使用 [Ubuntu MATE][8],你可以使用 caja-admin 代替 nautilus-admin。其他文件管理器可能会或可能不会提供此类功能。
|
||||
|
||||
我希望这个快速技巧对你有所帮助。随时欢迎提出问题和建议。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/open-nautilus-as-administrator/
|
||||
|
||||
作者:[Abhishek Prakash][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://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://wiki.gnome.org/Apps/Files
|
||||
[3]: https://itsfoss.com/root-user-ubuntu/
|
||||
[4]: https://itsfoss.com/ubuntu-repositories/
|
||||
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/open-folder-as-administrator-ubuntu.jpg?ssl=1
|
||||
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/edit-files-as-root-ubuntu.jpg?ssl=1
|
||||
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/authentication-pop-up-ubuntu.png?ssl=1
|
||||
[8]: https://ubuntu-mate.org/
|
@ -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]指出的:
|
||||
|
||||
>“第 1–7 行是源码包的控制信息。第 9–13 行是二进制包的控制信息。”
|
||||
|
||||
以下是我使用的:
|
||||
|
||||
* `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
|
@ -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
|
@ -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
|
@ -0,0 +1,88 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12160-1.html)
|
||||
[#]: subject: (MystiQ: A Free and Open Source Audio/Video Converter)
|
||||
[#]: via: (https://itsfoss.com/mystiq/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
MystiQ:一个自由开源的音视频转换器
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/28/223258cr9rxzyrj344kh68.jpg)
|
||||
|
||||
> 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 位系统的安装包
|
||||
* 能够调整音频质量(采样率、比特率等)进行转换
|
||||
* 基本的视频编辑功能(剪辑视频、插入字幕、旋转视频、缩放视频等)
|
||||
* 将彩色视频转换为黑白
|
||||
* 有几个预设方案,可轻松转换视频以获得最佳质量或获得最佳压缩效果。
|
||||
|
||||
### 安装 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)
|
||||
校对:[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/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
|
@ -0,0 +1,198 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12165-1.html)
|
||||
[#]: 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/)
|
||||
|
||||
如何在 Linux 上检查网卡信息
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/29/214835m1ms3n00s6qbcycz.jpg)
|
||||
|
||||
默认情况下,在设置服务器时你会配置主网络接口。这是每个人所做的构建工作的一部分。有时出于各种原因,你可能需要配置额外的网络接口。
|
||||
|
||||
这可以是通过网络<ruby>绑定<rt>bonding</rt><ruby>/<ruby>协作<rt>teaming</rt></ruby>来提供高可用性,也可以是用于应用需求或备份的单独接口。
|
||||
|
||||
为此,你需要知道计算机有多少接口以及它们的速度来配置它们。
|
||||
|
||||
有许多命令可检查可用的网络接口,但是我们仅使用 `ip` 命令。以后,我们会另外写一篇文章来全部介绍这些工具。
|
||||
|
||||
在本教程中,我们将向你显示可用网络网卡(NIC)信息,例如接口名称、关联的 IP 地址、MAC 地址和接口速度。
|
||||
|
||||
### 什么是 ip 命令
|
||||
|
||||
[ip 命令][1] 类似于 `ifconfig`, 用于分配静态 IP 地址、路由和默认网关等。
|
||||
|
||||
```
|
||||
# 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
|
||||
```
|
||||
|
||||
### 什么是 ethtool 命令
|
||||
|
||||
`ethtool` 用于查询或控制网络驱动或硬件设置。
|
||||
|
||||
```
|
||||
# ethtool eth0
|
||||
```
|
||||
|
||||
### 1)如何在 Linux 上使用 ip 命令检查可用的网络接口
|
||||
|
||||
在不带任何参数的情况下运行 `ip` 命令时,它会提供大量信息,但是,如果仅需要可用的网络接口,请使用以下定制的 `ip` 命令。
|
||||
|
||||
```
|
||||
# ip a |awk '/state UP/{print $2}'
|
||||
|
||||
eth0:
|
||||
eth1:
|
||||
```
|
||||
|
||||
### 2)如何在 Linux 上使用 ip 命令检查网络接口的 IP 地址
|
||||
|
||||
如果只想查看 IP 地址分配给了哪个接口,请使用以下定制的 `ip` 命令。
|
||||
|
||||
```
|
||||
# ip -o a show | cut -d ' ' -f 2,7
|
||||
或
|
||||
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)如何在 Linux 上使用 ip 命令检查网卡的 MAC 地址
|
||||
|
||||
如果只想查看网络接口名称和相应的 MAC 地址,请使用以下格式。
|
||||
|
||||
检查特定的网络接口的 MAC 地址:
|
||||
|
||||
```
|
||||
# ip link show dev eth0 |awk '/link/{print $2}'
|
||||
00:00:00:55:43:5c
|
||||
```
|
||||
|
||||
检查所有网络接口的 MAC 地址,创建该脚本:
|
||||
|
||||
```
|
||||
# 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
|
||||
```
|
||||
|
||||
运行该脚本获取多个网络接口的 MAC 地址:
|
||||
|
||||
```
|
||||
# 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)如何在 Linux 上使用 ethtool 命令检查网络接口速度
|
||||
|
||||
如果要在 Linux 上检查网络接口速度,请使用 `ethtool` 命令。
|
||||
|
||||
检查特定网络接口的速度:
|
||||
|
||||
```
|
||||
# ethtool eth0 |grep "Speed:"
|
||||
|
||||
Speed: 10000Mb/s
|
||||
```
|
||||
|
||||
检查所有网络接口速度,创建该脚本:
|
||||
|
||||
```
|
||||
# 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
|
||||
```
|
||||
|
||||
运行该脚本获取多个网络接口速度:
|
||||
|
||||
```
|
||||
# sh /opt/scripts/port-speed.sh
|
||||
|
||||
eth0:
|
||||
Speed: 10000Mb/s
|
||||
eth1:
|
||||
Speed: 10000Mb/s
|
||||
```
|
||||
|
||||
### 5)验证网卡信息的 Shell 脚本
|
||||
|
||||
通过此 shell 脚本你可以收集上述所有信息,例如网络接口名称、网络接口的 IP 地址,网络接口的 MAC 地址以及网络接口的速度。创建该脚本:
|
||||
|
||||
```
|
||||
# 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
|
||||
```
|
||||
|
||||
运行该脚本检查网卡信息:
|
||||
|
||||
```
|
||||
# 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]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [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/
|
@ -0,0 +1,129 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12158-1.html)
|
||||
[#]: 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/)
|
||||
|
||||
关于 Ubuntu 20.04 你应该了解的事情
|
||||
======
|
||||
|
||||
[Ubuntu 20.04][1] 已经发布,你可能对升级、安装等有一些问题和疑问。
|
||||
|
||||
我在各种社交媒体渠道上主持了一些问答环节,回答像你这样的读者的疑虑。我将列出这些关于 Ubuntu 20.04 的常见问题,并给出答案。我希望它能帮助你消除你的疑虑。如果你仍有问题,请随时在下面的评论栏提问。
|
||||
|
||||
### Ubuntu 20.04:已回复的问题
|
||||
|
||||
![][2]
|
||||
|
||||
为了澄清一下,这里的一些答案也许受我个人意见的影响。如果你是一个有经验的 Ubuntu 用户,有些问题听起来可能有点愚蠢,但它对 Ubuntu 新用户不是这样。
|
||||
|
||||
#### Ubuntu 20.04 何时发布?
|
||||
|
||||
Ubuntu 20.04 LTS 于 2020 年 4 月 23 日发布。所有变种,如 Kubuntu、Lubuntu,、Xubuntu、Budgie、MATE 都将和 20.04 同一天发布。
|
||||
|
||||
#### Ubuntu 20.04 的系统要求是什么?
|
||||
|
||||
对于默认的 GNOME 版本,应至少具有 4GB 的内存、2GHz 双核处理器和至少 25GB 的磁盘空间。
|
||||
|
||||
其他 [Ubuntu 变种][3]可能有不同的系统要求。
|
||||
|
||||
#### 我可以在 32 位系统上使用 Ubuntu 20.04 吗?
|
||||
|
||||
完全不行。你不能在 32 位系统上使用 Ubuntu 20.04。即使你使用的是 32 位 Ubuntu 18.04,也不能升级到 Ubuntu 20.04。32 位的系统 ISO 是以前用的。
|
||||
|
||||
![Error while upgrading 32-bit Ubuntu 18.04 to Ubuntu 20.04][4]
|
||||
|
||||
#### 我可以在 Ubuntu 20.04 上使用 Wine 吗?
|
||||
|
||||
是的,你仍然可以在 Ubuntu 20.04 上使用 Wine,因为仍然用于 Wine 和 [Steam Play][5] 软件包所需的 32 位库。
|
||||
|
||||
#### 我需要购买 Ubuntu 20.04 或许可证?
|
||||
|
||||
不,Ubuntu 完全可以免费使用。你不必像在 Windows 中那样购买许可证密钥或激活 Ubuntu。
|
||||
|
||||
Ubuntu 的下载页会请求你捐赠一些资金,如果你想为开发这个强大的操作系统捐钱,由你自己决定。
|
||||
|
||||
#### GNOME 版本是什么?
|
||||
|
||||
Ubuntu 20.04 有 GNOME 3.36。
|
||||
|
||||
#### Ubuntu 20.04 的性能是否优于 Ubuntu 18.04?
|
||||
|
||||
是的,在几个方面。Ubuntu 20.04 系统速度更快,甚至超快。我在下面这个视频的 4:40 处展示了性能对比。
|
||||
|
||||
- [video](https://img.linux.net.cn/static/video/Top%207%20Best%20Features%20You%27ll%20Love%20in%20Ubuntu%2020.04-lpq8pm_xkSE.mp4)
|
||||
|
||||
在 GNOME 3.36 中,滚动、窗口动画和其他 UI 元素更加流畅,提供了更流畅的体验。
|
||||
|
||||
#### Ubuntu 20.04 将支持多长时间?
|
||||
|
||||
它是一个长期支持(LTS)版本,与任何 LTS 版本一样,它将在五年内得到支持。这意味着 Ubuntu 20.04 将在 2025 年 4 月之前获得安全和维护更新。
|
||||
|
||||
#### 升级到 Ubuntu 20.04 时,是否会丢失数据?
|
||||
|
||||
你可以从 Ubuntu 19.10 或 Ubuntu 18.04 升级到 Ubuntu 20.04。你无需创建 live USB 并从中安装。你所需要的是一个良好的互联网连接,来下载约 1.5GB 的数据。
|
||||
|
||||
从现有系统升级不会破坏你的文件。你应该会留有所有文件,并且大多数现有软件应具有相同的版本或升级后的版本。
|
||||
|
||||
如果你使用了某些第三方工具或[其他 PPA][6],升级过程将禁用它们。如果 Ubuntu 20.04 可以使用这些其他存储库,那么可以再次启用它们。
|
||||
|
||||
升级大约需要一个小时,重启后,你将登录到新版本。
|
||||
|
||||
虽然你的数据不会被触碰,并且不会丢失系统文件和配置,但最好在外部设备备份重要数据。
|
||||
|
||||
#### 何时可以升级到 Ubuntu 20.04?
|
||||
|
||||
![][7]
|
||||
|
||||
如果你正在使用 Ubuntu 19.10 并有正确的更新设置(如前面部分所述),那么应在发布后的几天内通知你升级到 Ubuntu 20.04。
|
||||
|
||||
对于 Ubuntu 18.04 用户,可能需要几周时间才能正式通知他们 Ubuntu 20.04 可用。可能,你可能会在第一个点版本 Ubuntu 20.04.1 后获得提示。
|
||||
|
||||
#### 如果我升级到 Ubuntu 20.04,我可以降级到 19.10 或 18.04 吗?
|
||||
|
||||
不行。虽然升级到新版本很容易,但无法选择降级。如果你想回到 Ubuntu 18.04,你需要重新[安装 Ubuntu 18.04][8]。
|
||||
|
||||
#### 我使用的是 Ubuntu 18.04 LTS。我应该升级到 Ubuntu 20.04 LTS 吗?
|
||||
|
||||
这取决于你。如果你对 Ubuntu 20.04 中的新功能印象深刻,并希望上手尝试,那么你应该升级。
|
||||
|
||||
如果你想要一个更稳定的系统,我建议等待第一个点版本 Ubuntu 20.04.1,新版本会有 bug 修复。20.04.1 通常在 Ubuntu 20.04 发布后大约两个月到来。
|
||||
|
||||
无论是那种情况,我都建议你或早或晚升级到 Ubuntu 20.04。Ubuntu 20.04 具有更新的内核、性能改进,尤其是仓库中有更新版本的软件。
|
||||
|
||||
在外部磁盘上进行备份,并且有良好的互联网连接,升级不应成为问题。
|
||||
|
||||
#### 我应该重新安装 Ubuntu 20.04 还是从 18.04/19.10 升级到 Ubuntu?
|
||||
|
||||
如果你可以选择,请备份数据,并重新安装 Ubuntu 20.04。
|
||||
|
||||
从现有版本升级到 20.04 是一个方便的选择。然而,在我看来,它仍然保留有一些旧版本的痕迹/包。全新安装更加干净。
|
||||
|
||||
#### 关于 Ubuntu 20.04 的任何其他问题?
|
||||
|
||||
如果你对 Ubuntu 20.04 有任何疑问,请随时在下面发表评论。如果你认为应该将其他信息添加到列表中,请让我知道。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/ubuntu-20-04-faq/
|
||||
|
||||
作者:[Abhishek Prakash][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://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://linux.cn/article-12142-1.html
|
||||
[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/
|
@ -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/
|
@ -0,0 +1,56 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (CrazyShipOne)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12157-1.html)
|
||||
[#]: 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)
|
||||
|
||||
开源的广告拦截器不但节能,而且能拯救生命!
|
||||
======
|
||||
> 三个开源广告拦截器与“无广告拦截器”对照组进行了测试。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/27/220109b86sidn56sn6inoh.jpg)
|
||||
|
||||
一项旨在调查自由开源的广告拦截器节能的情况的[研究][2],意外地发现了互联网广告正在浪费你大量的时间。
|
||||
|
||||
更重要的是,研究结果表明了你可以挽救回这些失去的时间。这项研究评估发现,使用 [uBlock Origin][3](一个开源免费的广告拦截器)的情况下平均每个网民一年可以节约超过 100 个小时的时间。uBlock Origin 是测试中最有效的广告拦截器,不过其他的广告拦截器也为网民节省了时间、能源以及金钱。
|
||||
|
||||
![Ad blocker screen comparison][4]
|
||||
|
||||
在研究结果中,[AdBlock+][5] 减少了 11% 的页面加载时间,[Privacy Badger][6] 减少了 22%,[uBlock Origin][3] 减少了 28%。对于单独一个页面来说这个时间並不算多,但是网民们一半以上的浏览时间都是在网站间快速跳转,通常在一个页面停留少于 15 秒。鉴于这种情况,加载广告的额外时间加起来就很多了。
|
||||
|
||||
发布于 Technologies 杂志上的《[用开源的广告拦截器节能][7]》一文最初旨在解决日益增长的能源消耗问题。随着全球网民每日上网时间超过 6.5 小时,与互联网相关的用电量正在快速地增加。以美国人为例,自 2000 年他们的上网时间已经增加了一倍,几乎达到每周 24 小时。开源广告拦截器通过消灭上网和观看视频时产生的广告,潜在地减少了时间,从而减少用电。
|
||||
|
||||
在研究过程中,对三个开源广告拦截器与“无广告拦截器”对照组进行了测试。研究人员记录了浏览全球访问量最大的网站的页面加载时间,其中包括网络搜索(谷歌、雅虎、必应)、信息(Weather.com、维基百科)和新闻网站(CNN、福克斯、纽约时报)。除此之外,研究还分析了观看流行与非流行视频内容时广告所花费的时间。这部分研究由于缺乏 Youtube 上流行和非流行内容观看比例的数据而非常具有挑战性。每个视频浪费在广告观看上的时间可以从 0.06% 到惊人的 21% 不等。而且,这还只是浏览器上记录的加载广告而失去的时间。
|
||||
|
||||
总的来说,研究结果表明加载广告所浪费的能源并不是是小事。由于运行电脑所使用的大量电力仍然来自于煤炭,而煤炭会造成空气污染和过早死亡,因此该研究分析了广告拦截器拯救美国人生命的潜力。(LCTT 译注:由于这项研究是美国人完成的,所以这里仅提及了美国人,但是同理可推至全球。)结果是令人震惊的:如果美国人都使用开源广告拦截器,每年节约的能源将会拯救超过 36 个美国人的生命。
|
||||
|
||||
电能即金钱,所以削减广告也可以为消费者节约钱财。在美国,如果所有的网民都在他们的电脑上开启 [Privacy Badger][8],美国人每年可以节约超过 9100 万美元。在全球范围内,调查研究的结果则更令人吃惊。uBlock Origin 每年可以为全球消费者节约 18 亿美元。
|
||||
|
||||
这项研究始于人们因为新冠肺炎大流行而被迫居家之前,因此所有的数据都可以被认为是保守的估算。整体来说,研究发现了开源广告拦截器是一项潜在的节能技术。
|
||||
|
||||
虽然自由开源的广告拦截器可以节约能源,对自然环境也有好处,但你可能主要是为了拦截恼人的广告和节省自己的时间而使用它们。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/4/ad-blockers
|
||||
|
||||
作者:[Joshua Pearce][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[CrazyShipOne](https://github.com/CrazyShipOne)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [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
|
||||
[8]: https://privacybadger.org/
|
@ -0,0 +1,76 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12168-1.html)
|
||||
[#]: 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/)
|
||||
|
||||
IPv5 发生了什么?为什么有 IPv4、IPv6 但没有 IPv5?
|
||||
======
|
||||
|
||||
如果你花过很多时间在互联网上,那么你应该已经听说过计算机每天使用的 IPv4 和 IPv6 协议。
|
||||
|
||||
你可能会问的一个问题是:为什么没有 IPv5?为什么 IPv6 在 IPv4 之后而不是 IPv5 之后出现?是否有 IPv5,如果是,那么 IPv5 发生了什么?
|
||||
|
||||
答案是肯定的,曾经有一个 IPv5。让我解释一下这里发生的事。
|
||||
|
||||
### 互联网的早期历史
|
||||
|
||||
![ARPA Logical Map in 1977 | Image courtesy: Wikipedia][1]
|
||||
|
||||
在 1960 年代后期,美国国防部的[高级研究计划局][2](DARPA)发起了一个[项目][3]来连接全国的计算机。最初的目标是创建一个由全国 ARPA 资助的所有计算机组成的网络系统。
|
||||
|
||||
由于这是第一次将如此规模的网络整合在一起,因此他们也在不断发展自己的技术和硬件。他们首先做的工作之一就是开发名为<ruby>[传输控制协议][4]<rt>Transmission Control Protocol</rt></ruby>(TCP)的<ruby>互联网协议<rt>Internet Protocol</rt></ruby>(IP)。该协议“可靠、有序,并会对运行于通过 IP 网络传输的主机上的应用的八进制(字节)流通讯进行错误检测”。简单来说,它可以确保数据安全到达。
|
||||
|
||||
最初,TCP 被设计为[“主机级别的端到端协议以及封装和路由协议”][5]。但是,他们意识到他们需要拆分协议以使其更易于管理。于是决定由 IP 协议处理封装和路由。
|
||||
|
||||
那时,TCP 已经经历了三个版本,因此新协议被称为 IPv4。
|
||||
|
||||
### IPv5 的诞生
|
||||
|
||||
IPv5 开始时有个不同的名字:<ruby>互联网流协议<rt>Internet Stream Protocol</rt></ruby>(ST)。它是[由 Apple、NeXT 和 Sun Microsystems][6] 为试验流式语音和视频而创建的。
|
||||
|
||||
该新协议能够“在保持通信的同时,以特定频率传输数据包”。
|
||||
|
||||
### 那么 IPv5 发生了什么?
|
||||
|
||||
![][7]
|
||||
|
||||
IPv5 从未被接受为正式的互联网协议。这主要是由于 32 位限制。
|
||||
|
||||
IPV5 使用与 IPv4 相同的寻址系统。每个地址由 0 到 255 之间的四组数字组成。这将可能的地址数量限制为 [43 亿][6]个。
|
||||
|
||||
在 1970 年代初,这似乎比全世界所需要的还要多。但是,互联网的爆炸性增长证明了这一想法是错误的。2011 年,世界上的IPv4地址正式用完了。
|
||||
|
||||
在 1990 年代,一个新项目开始致力于研究下一代互联网协议(IPng)。这形成了 128 位的 IPv6。IPv6 地址包含 [“8 组 4 字符的十六进制数字”][6],它可以包含从 0 到 9 的数字和从 A 到 F 的字母。与 IPv4 不同,IPv6 拥有数万亿个可能的地址,因此我们应该能安全一阵子。
|
||||
|
||||
同时,IPv5 奠定了 VoIP 的基础,而该技术已被我们用于当今世界范围内的通信。**因此,我想在某种程度上,你可以说 IPv5 仍然可以保留到了今天**。
|
||||
|
||||
希望你喜欢有关互联网历史的轶事。你可以阅读其他[关于 Linux 和技术的琐事文章][8]。
|
||||
|
||||
如果你觉得这篇文章有趣,请花一点时间在社交媒体、Hacker News 或 [Reddit][9] 上分享它。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/what-happened-to-ipv5/
|
||||
|
||||
作者:[John Paul][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://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
|
77
published/202004/20200428 Fedora 32 is officially here.md
Normal file
77
published/202004/20200428 Fedora 32 is officially here.md
Normal file
@ -0,0 +1,77 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12164-1.html)
|
||||
[#]: subject: (Fedora 32 is officially here!)
|
||||
[#]: via: (https://fedoramagazine.org/announcing-fedora-32/)
|
||||
[#]: author: (Matthew Miller https://fedoramagazine.org/author/mattdm/)
|
||||
|
||||
Fedora 32 正式发布!
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
它来了! 我们很荣幸地宣布 Fedora 32 的发布。感谢成千上万的 Fedora 社区成员和贡献者的辛勤工作,我们又一次准时发布了。
|
||||
|
||||
如果你只想马上就能拿到它,请马上访问 <https://getfedora.org/>。更多详情,请继续阅读本文。
|
||||
|
||||
### Fedora 的全部变种
|
||||
|
||||
Fedora Editions 是针对特定的“展示”用途输出的。
|
||||
|
||||
Fedora Workstation 专注于桌面系统。特别是,它面向的是那些希望获得“可以工作的” Linux 操作系统体验的软件开发者。这个版本采用了 [GNOME 3.36][2],一如既往地有很多很棒的改进。我最喜欢的是新的锁屏!
|
||||
|
||||
Fedora Server 以一种易于部署的方式为系统管理员带来了新锐的开源服务器软件。对于边缘计算用例,[Fedora IoT][3] 为 IoT 生态系统提供了坚实的基础。
|
||||
|
||||
Fedora CoreOS 是一个新兴的 Fedora Edition。它是一个自动更新的、最小化的操作系统,用于安全地大规模运行容器化工作负载。它提供了几个[更新流][4],遵循大约每两周一次的自动更新。目前,next 流是基于 Fedora 32,后续还有 testing 流和 stable 流。你可以从[下载页面][5]中找到关于按 next 流发布的工件的信息,并在 [Fedora CoreOS 文档][6]中找到关于如何使用这些工件的信息。
|
||||
|
||||
当然,我们制作的不仅仅是 Editions。[Fedora Spins][7] 和[实验室][8]针对的是不同的受众和用例,包括[Fedora 天文学实验室][9],它为业余和专业的天文学家带来了完整的开源工具链,还有像 [KDE Plasma][10] 和 [Xfce][11] 这样的桌面环境。Fedora 32 中新增的 [计算神经科学实验室][12] 是由我们的神经科学特别兴趣小组开发的,它可以实现计算神经科学。
|
||||
|
||||
还有,别忘了我们的备用架构,[ARM AArch64、Power 和 S390x][13]。特别值得一提的是,我们改进了对 Rockchip 系统级芯片的支持,包括 Rock960、RockPro64 和 Rock64。
|
||||
|
||||
### 一般性的改进
|
||||
|
||||
无论你使用 Fedora 的哪个变体,你都能获得最新的开源世界。遵循我们的“[First][14]”理念,我们更新了关键的编程语言和系统库包,包括 GCC 10、Ruby 2.7 和 Python 3.8。当然,随着 Python 2 已经过了报废期,我们已经从 Fedora 中删除了大部分 Python 2 包,但我们为仍然需要它的开发者和用户提供了一个遗留的 python27 包。在 Fedora Workstation 中,我们默认启用了 EarlyOOM 服务,以改善低内存情况下的用户体验。
|
||||
|
||||
我们非常期待你能尝试一下新版本的使用体验! 现在就去 <https://getfedora.org/> 下载它。或者如果你已经在运行 Fedora 操作系统,请按照简单的[升级说明][15]进行升级。
|
||||
|
||||
### 万一出现问题……
|
||||
|
||||
如果你遇到问题,请查看[Fedora 32 常见错误][16]页面,如果有问题,请访问我们的 [Askedora][17] 用户支持平台。
|
||||
|
||||
### 谢谢大家
|
||||
|
||||
感谢在这个发布周期中为 Fedora 项目做出贡献的成千上万的人,特别是感谢那些在大流行期间为又一次准时发布而付出额外努力的人。Fedora 是一个社区,很高兴看到我们彼此之间的支持。我邀请大家参加 4 月28-29 日的[红帽峰会虚拟体验][18],了解更多关于 Fedora 和其他社区的信息。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/announcing-fedora-32/
|
||||
|
||||
作者:[Matthew Miller][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://fedoramagazine.org/author/mattdm/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2020/04/f32-final-816x345.png
|
||||
[2]: https://www.gnome.org/news/2020/03/gnome-3-36-released/
|
||||
[3]: https://iot.fedoraproject.org/
|
||||
[4]: https://docs.fedoraproject.org/en-US/fedora-coreos/update-streams/
|
||||
[5]: https://getfedora.org/en/coreos/download?stream=next
|
||||
[6]: https://docs.fedoraproject.org/en-US/fedora-coreos/getting-started/
|
||||
[7]: https://spins.fedoraproject.org/
|
||||
[8]: https://labs.fedoraproject.org/
|
||||
[9]: https://labs.fedoraproject.org/en/astronomy/
|
||||
[10]: https://spins.fedoraproject.org/en/kde/
|
||||
[11]: https://spins.fedoraproject.org/en/xfce/
|
||||
[12]: https://labs.fedoraproject.org/en/comp-neuro
|
||||
[13]: https://alt.fedoraproject.org/alt/
|
||||
[14]: https://docs.fedoraproject.org/en-US/project/#_first
|
||||
[15]: https://docs.fedoraproject.org/en-US/quick-docs/upgrading/
|
||||
[16]: https://fedoraproject.org/wiki/Common_F32_bugs
|
||||
[17]: http://ask.fedoraproject.org
|
||||
[18]: https://www.redhat.com/en/summit
|
@ -0,0 +1,110 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12166-1.html)
|
||||
[#]: subject: (Manjaro 20 Lysia Arrives with ZFS and Snap Support)
|
||||
[#]: via: (https://itsfoss.com/manjaro-20-release/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
Manjaro 20 Lysia 到来,支持 ZFS 和 Snap
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/29/232925j8paomvp11pfu12v.jpg)
|
||||
|
||||
> Manjaro Linux 刷新了其 Manjaro 20 “Lysia” 的 ISO。现在在 Pamac 中支持了 Snap 和 Flatpak 软件包。在 Manjaro Architect 安装程序中增加了 ZFS 选项,并使用最新的内核 5.6 作为基础。
|
||||
|
||||
最近新的发行版的发布像下雨一样。在上周发布了 [Ubuntu 20.04 LTS](https://linux.cn/article-12142-1.html) ,紧接着 [Fedora 32](https://linux.cn/article-12164-1.html) 也刚刚发布,而现在 [Manjaro 发布了版本 20][1],代号为 Lysia。
|
||||
|
||||
### Manjaro 20 Lysia 有什么新东西?
|
||||
|
||||
其实有很多。让我给大家介绍一下 Manjaro 20 中的一些主要新功能。
|
||||
|
||||
#### 新的抹茶主题
|
||||
|
||||
Manjaro 20 有一个新的默认主题,名为 Matcha(抹茶)。它让桌面看起来更有质感。
|
||||
|
||||
![][2]
|
||||
|
||||
#### 对 Snap 和 Flatpak 的支持
|
||||
|
||||
Snap 和 Flatpak 软件包的支持得到了改进。如果你愿意,你可以在命令行中使用它们。
|
||||
|
||||
你还可以在 Pamac 图形界面包管理器中启用 Snap 和 Flatpak 支持。
|
||||
|
||||
![Enable Snap support in Pamac Manjaro][3]
|
||||
|
||||
启用后,你可以在 Pamac 软件管理器中找到并安装 Snap/Flatpak 应用程序。
|
||||
|
||||
![Snap applications in Pamac][4]
|
||||
|
||||
#### Pamac 提供了基于搜索安装新软件的方式(在 GNOME 中)
|
||||
|
||||
在 GNOME 变种中,如果你搜索某个东西,Pamac 软件管理器会提供安装符合查询的软件。在其他使用 GNOME 桌面的发行版中,GNOME 软件中心也会这样做。
|
||||
|
||||
#### ZFS 支持登陆了 Manjaro Architect
|
||||
|
||||
现在,你可以在 Manjaro Linux 中轻松地使用 ZFS 作为根文件系统。在 [Manjaro Architect][6] 中提供了对 [ZFS 文件系统][5]的支持。
|
||||
|
||||
请注意,我说的是 Manjaro Architect,即基于终端的安装程序。它和普通的图形化的 [Calamares 安装程序][7]不一样。
|
||||
|
||||
![][8]
|
||||
|
||||
#### Linux kernel 5.6
|
||||
|
||||
最新的稳定版 [Linux 内核 5.6][9] 带来了更多的硬件支持,如 thunderbolt、Nvidia 和 USB4。你也可以使用 [WireGuard VPN][10]。
|
||||
|
||||
![][11]
|
||||
|
||||
#### 其他杂项变化
|
||||
|
||||
* 新的桌面环境版本:Xfce 4.14、GNOME 3.36 和 KDE Plasma 5.18。
|
||||
* 新的默认 shell 是 zsh。
|
||||
* Display-Profiles 允许你存储一个或多个配置文件,用于你的首选显示配置。
|
||||
* 改进后的 Gnome-Layout-Switcher。
|
||||
* 最新的驱动程序。
|
||||
* 改进和完善了 Manjaro 工具。
|
||||
|
||||
### 如何取得 Manjaro 20 Lysia?
|
||||
|
||||
如果你已经在使用 Manjaro,只需更新你的 Manjaro Linux 系统,你就应该已经在使用 Lysia 了。
|
||||
|
||||
Manjaro 采用了滚动发布模式,这意味着你不必手动从一个版本升级到另一个版本。只要有新的版本发布,不需要重新安装就可以使用了。
|
||||
|
||||
既然 Manjaro 是滚动发布的,为什么每隔一段时间就会发布一个新版本呢?这是因为他们要刷新 ISO,这样下载 Manjaro 的新用户就不用再安装过去几年的更新了。这就是为什么 Arch Linux 也会每个月刷新一次 ISO 的原因。
|
||||
|
||||
Manjaro 的“ISO 刷新”是有代号和版本的,因为它可以帮助开发者清楚地标明每个开发阶段的发展方向。
|
||||
|
||||
所以,如果你已经在使用它,只需使用 Pamac 或命令行[更新你的 Manjaro Linux 系统][12]即可。
|
||||
|
||||
如果你想尝试 Manjaro 或者想使用 ZFS,那么你可以通过从它的网站上[下载 ISO][14] 来[安装 Manjaro][13]。
|
||||
|
||||
愿你喜欢新的 Manjaro Linux 发布。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/manjaro-20-release/
|
||||
|
||||
作者:[Abhishek Prakash][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/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://forum.manjaro.org/t/manjaro-20-0-lysia-released/138633
|
||||
[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/manjaro-20-lysia.jpeg?resize=800%2C440&ssl=1
|
||||
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/enable-snap-in-pamac-manjaro.jpg?resize=800%2C490&ssl=1
|
||||
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/snap-app-pacman.jpg?resize=800%2C489&ssl=1
|
||||
[5]: https://itsfoss.com/what-is-zfs/
|
||||
[6]: https://itsfoss.com/manjaro-architect-review/
|
||||
[7]: https://calamares.io/
|
||||
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/pacman-prompts-install-apps.jpg?resize=800%2C331&ssl=1
|
||||
[9]: https://itsfoss.com/linux-kernel-5-6/
|
||||
[10]: https://itsfoss.com/wireguard/
|
||||
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/manjaro-20-neofetch-screen.jpg?resize=800%2C495&ssl=1
|
||||
[12]: https://itsfoss.com/update-arch-linux/
|
||||
[13]: https://itsfoss.com/install-manjaro-linux/
|
||||
[14]: https://manjaro.org/download/
|
192
published/20200420 4 Git scripts I can-t live without.md
Normal file
192
published/20200420 4 Git scripts I can-t live without.md
Normal file
@ -0,0 +1,192 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12180-1.html)
|
||||
[#]: 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 基本功能的补充。以下是如何安装、使用和贡献的方法。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202005/03/211446dshwbzoh235b3gre.jpg)
|
||||
|
||||
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)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [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
|
@ -0,0 +1,238 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12172-1.html)
|
||||
[#]: 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)
|
||||
|
||||
使用 Python 来可视化 COVID-19 预测
|
||||
======
|
||||
|
||||
> 我将演示如何利用提供的全球病毒传播的开放数据,使用开源库来创建两个可视效果。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202005/01/193624a2p2osojyf0yg4go.jpg)
|
||||
|
||||
使用 [Python][2] 和一些图形库,你可以预测 COVID-19 确诊病例总数,也可以显示一个国家(本文以印度为例)在给定日期的死亡总数。人们有时需要帮助解释和处理数据的意义,所以本文还演示了如何为五个国家创建一个动画横条形图,以显示按日期显示病例的变化。
|
||||
|
||||
### 印度的确诊病例和死亡人数预测
|
||||
|
||||
这要分三步来完成。
|
||||
|
||||
#### 1、下载数据
|
||||
|
||||
科学数据并不总是开放的,但幸运的是,许多现代科学和医疗机构都乐于相互之间及与公众共享信息。关于 COVID-19 病例的数据可以在网上查到,并且经常更新。
|
||||
|
||||
要解析这些数据,首先必须先下载。 <https://raw.githubusercontent.com/datasets/covid-19/master/data/countries-aggregated.csv>。
|
||||
|
||||
直接将数据加载到 Pandas `DataFrame` 中。Pandas 提供了一个函数 `read_csv()`,它可以获取一个 URL 并返回一个 `DataFrame` 对象,如下所示。
|
||||
|
||||
```
|
||||
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)) # 获取数据帧中的前 3 项
|
||||
print(df1.tail(3)) # 获取数据帧中的后 3 项
|
||||
```
|
||||
|
||||
数据集的顶行包含列名。
|
||||
|
||||
1. `Date`
|
||||
2. `Country`
|
||||
3. `Confirmed`
|
||||
4. `Recovered`
|
||||
5. `Deaths`
|
||||
|
||||
`head` 查询的输出包括一个唯一的标识符(不作为列列出)和每个列的条目。
|
||||
|
||||
```
|
||||
0 2020-01-22 Afghanistan 0 0 0
|
||||
1 2020-01-22 Albania 0 0 0
|
||||
1 2020-01-22 Algeria 0 0 0
|
||||
```
|
||||
|
||||
`tail` 查询的输出类似,但包含数据集的尾端。
|
||||
|
||||
```
|
||||
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
|
||||
```
|
||||
|
||||
从输出中,可以看到 DataFrame(`df1`)有以下几个列:
|
||||
|
||||
1. 日期
|
||||
2. 国家
|
||||
3. 确诊
|
||||
4. 康复
|
||||
5. 死亡
|
||||
|
||||
此外,你可以看到 `Date` 栏中的条目从 1 月 22 日开始到 3 月 31 日。这个数据库每天都会更新,所以你会有当前的值。
|
||||
|
||||
#### 2、选择印度的数据
|
||||
|
||||
在这一步中,我们将只选择 DataFrame 中包含印度的那些行。这在下面的脚本中可以看到。
|
||||
|
||||
```
|
||||
#### ----- Step 2 (Select data for India)----
|
||||
df_india = df1[df1['Country'] == 'India']
|
||||
print(df_india.head(3))
|
||||
```
|
||||
|
||||
#### 3、数据绘图
|
||||
|
||||
在这里,我们创建一个条形图。我们将把日期放在 X 轴上,把确诊的病例数和死亡人数放在 Y 轴上。这一部分的脚本有以下几个值得注意的地方。
|
||||
|
||||
* `plt.rcParams["figure.figsize"]=20,20` 这一行代码只适用于 Jupyter。所以如果你使用其他 IDE,请删除它。
|
||||
* 注意这行代码:`ax1 = plt.gca()`。为了确保两个图,即确诊病例和死亡病例的图都被绘制在同一个图上,我们需要给第二个图的 `ax` 对象。所以我们使用 `gca()` 来完成这个任务。(顺便说一下,`gca` 代表 “<ruby>获取当前坐标轴<rt>get current axis</rt></ruby>”)
|
||||
|
||||
完整的脚本如下所示。
|
||||
|
||||
```
|
||||
# Author:- Anurag Gupta # email:- 999.anuraggupta@gmail.com
|
||||
%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()
|
||||
```
|
||||
|
||||
整个脚本[可在 GitHub 上找到][4]。
|
||||
|
||||
### 为五个国家创建一个动画水平条形图
|
||||
|
||||
关于 Jupyter 的注意事项:要在 Jupyter 中以动态动画的形式运行,而不是静态 png 的形式,你需要在单元格的开头添加一个神奇的命令,即: `%matplotlib notebook`。这将使图形保持动态,而不是显示为静态的 png 文件,因此也可以显示动画。如果你在其他 IDE 上,请删除这一行。
|
||||
|
||||
#### 1、下载数据
|
||||
|
||||
这一步和前面的脚本完全一样,所以不需要重复。
|
||||
|
||||
#### 2、创建一个所有日期的列表
|
||||
|
||||
如果你检查你下载的数据,你会发现它有一列 `Date`。现在,这一列对每个国家都有一个日期值。因此,同一个日期会出现多次。我们需要创建一个只具有唯一值的日期列表。这会用在我们条形图的 X 轴上。我们有一行代码,如 `list_dates = df[‘Date’].unique()`。`unique()` 方法将只提取每个日期的唯一值。
|
||||
|
||||
#### 3、挑选五个国家并创建一个 `ax` 对象。
|
||||
|
||||
做一个五个国家的名单。(你可以选择你喜欢的国家,也可以增加或减少国家的数量。)我也做了一个五个颜色的列表,每个国家的条形图的颜色对应一种。(如果你喜欢的话,也可以改一下。)这里有一行重要的代码是:`fig, ax = plt.subplots(figsize=(15, 8))`。这是创建一个 `ax` 对象所需要的。
|
||||
|
||||
#### 4、编写回调函数
|
||||
|
||||
如果你想在 Matplotlib 中做动画,你需要创建一个名为 `matplotlib.animation.FuncAnimation` 的类的对象。这个类的签名可以在网上查到。这个类的构造函数,除了其他参数外,还需要一个叫 `func` 的参数,你必须给这个参数一个回调函数。所以在这一步中,我们会写个回调函数,这个回调函数会被反复调用,以渲染动画。
|
||||
|
||||
#### 5、创建 `FuncAnimation` 对象
|
||||
|
||||
这一步在上一步中已经部分说明了。
|
||||
|
||||
我们创建这个类的对象的代码是:
|
||||
|
||||
```
|
||||
my_anim = animation.FuncAnimation(fig = fig, func = plot_bar,
|
||||
frames = list_dates, blit = True,
|
||||
interval=20)
|
||||
```
|
||||
|
||||
要给出的三个重要参数是:
|
||||
|
||||
* `fig`,必须给出一个 fig 对象,也就是我们之前创建的 fig 对象。
|
||||
* `func`,必须是回调函数。
|
||||
* `frames`,必须包含要做动画的变量。在我们这里,它是我们之前创建的日期列表。
|
||||
|
||||
#### 6、将动画保存为 mp4 文件
|
||||
|
||||
你可以将创建的动画保存为 mp4 文件。但是,你需要 `ffmpeg`。你可以用 `pip` 下载:`pip install ffmpeg-python`,或者用 conda(在 Jupyter 上):`install -c conda-forge ffmpeg`。
|
||||
|
||||
最后,你可以使用 `plt.show()` 运行动画。请注意,在许多平台上,`ffmpeg` 可能无法正常工作,可能需要进一步“调整”。
|
||||
|
||||
```
|
||||
%matplotlib notebook
|
||||
# Author:- Anurag Gupta # email:- 999.anuraggupta@gmail.com
|
||||
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()
|
||||
```
|
||||
|
||||
完整的脚本[可以在 GitHub 上找到][5]。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/4/python-data-covid-19
|
||||
|
||||
作者:[AnuragGupta][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://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
|
@ -0,0 +1,91 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12170-1.html)
|
||||
[#]: 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 包管理器的不同之处
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202004/30/215525o4e88nen85d8dzd7.jpg)
|
||||
|
||||
软件包管理器在 Linux 系统中扮演着重要的角色。它允许你安装、更新、查看、搜索和删除软件包,以满足你的需求。
|
||||
|
||||
每个发行版都有自己的一套包管理器,依据你的 Linux 发行版来分别使用它们。
|
||||
|
||||
RPM 是最古老的传统软件包管理器之一,它是为基于 Red Hat 的系统设计的,如 Red Hat Enterprise Linux(RHEL)、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 UPdater(YUP)开发于 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)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.2daygeek.com/author/magesh/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://linux.cn/article-12161-1.html
|
||||
[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/
|
213
published/20200425 Inlining optimisations in Go.md
Normal file
213
published/20200425 Inlining optimisations in Go.md
Normal file
@ -0,0 +1,213 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (lxbwolf)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12176-1.html)
|
||||
[#]: subject: (Inlining optimisations in Go)
|
||||
[#]: via: (https://dave.cheney.net/2020/04/25/inlining-optimisations-in-go)
|
||||
[#]: author: (Dave Cheney https://dave.cheney.net/author/davecheney)
|
||||
|
||||
Go 中的内联优化
|
||||
======
|
||||
|
||||
> 本文讨论 Go 编译器是如何实现内联的,以及这种优化方法如何影响你的 Go 代码。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202005/02/222202e3v3pppkhnndpbpn.jpg)
|
||||
|
||||
*请注意:*本文重点讨论 *gc*,这是来自 [golang.org](https://github.com/golang/go) 的事实标准的 Go 编译器。讨论到的概念可以广泛适用于其它 Go 编译器,如 gccgo 和 llgo,但它们在实现方式和功效上可能有所差异。
|
||||
|
||||
### 内联是什么?
|
||||
|
||||
<ruby>内联<rt>inlining</rt></ruby>就是把简短的函数在调用它的地方展开。在计算机发展历程的早期,这个优化是由程序员手动实现的。现在,内联已经成为编译过程中自动实现的基本优化过程的其中一步。
|
||||
|
||||
### 为什么内联很重要?
|
||||
|
||||
有两个原因。第一个是它消除了函数调用本身的开销。第二个是它使得编译器能更高效地执行其他的优化策略。
|
||||
|
||||
#### 函数调用的开销
|
||||
|
||||
在任何语言中,调用一个函数 [^1] 都会有消耗。把参数编组进寄存器或放入栈中(取决于 ABI),在返回结果时的逆反过程都会有开销。引入一次函数调用会导致程序计数器从指令流的一点跳到另一点,这可能导致管道滞后。函数内部通常有<ruby>前置处理<rt>preamble</rt></ruby>,需要为函数执行准备新的栈帧,还有与前置相似的<ruby>后续处理<rt>epilogue</rt></ruby>,需要在返回给调用方之前释放栈帧空间。
|
||||
|
||||
在 Go 中函数调用会消耗额外的资源来支持栈的动态增长。在进入函数时,goroutine 可用的栈空间与函数需要的空间大小进行比较。如果可用空间不同,前置处理就会跳到<ruby>运行时<rt>runtime</rt></ruby>的逻辑中,通过把数据复制到一块新的、更大的空间的来增长栈空间。当这个复制完成后,运行时就会跳回到原来的函数入口,再执行栈空间检查,现在通过了检查,函数调用继续执行。这种方式下,goroutine 开始时可以申请很小的栈空间,在有需要时再申请更大的空间。[^2]
|
||||
|
||||
这个检查消耗很小,只有几个指令,而且由于 goroutine 的栈是成几何级数增长的,因此这个检查很少失败。这样,现代处理器的分支预测单元可以通过假定检查肯定会成功来隐藏栈空间检查的消耗。当处理器预测错了栈空间检查,不得不放弃它在推测性执行所做的操作时,与为了增加 goroutine 的栈空间运行时所需的操作消耗的资源相比,管道滞后的代价更小。
|
||||
|
||||
虽然现代处理器可以用预测性执行技术优化每次函数调用中的泛型和 Go 特定的元素的开销,但那些开销不能被完全消除,因此在每次函数调用执行必要的工作过程中都会有性能消耗。一次函数调用本身的开销是固定的,与更大的函数相比,调用小函数的代价更大,因为在每次调用过程中它们做的有用的工作更少。
|
||||
|
||||
因此,消除这些开销的方法必须是要消除函数调用本身,Go 的编译器就是这么做的,在某些条件下通过用函数的内容来替换函数调用来实现。这个过程被称为*内联*,因为它在函数调用处把函数体展开了。
|
||||
|
||||
#### 改进的优化机会
|
||||
|
||||
Cliff Click 博士把内联描述为现代编译器做的优化措施,像常量传播(LCTT 译注:此处作者笔误,原文为 constant proportion,修正为 constant propagation)和死代码消除一样,都是编译器的基本优化方法。实际上,内联可以让编译器看得更深,使编译器可以观察调用的特定函数的上下文内容,可以看到能继续简化或彻底消除的逻辑。由于可以递归地执行内联,因此不仅可以在每个独立的函数上下文处进行这种优化决策,也可以在整个函数调用链中进行。
|
||||
|
||||
### 实践中的内联
|
||||
|
||||
下面这个例子可以演示内联的影响:
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import "testing"
|
||||
|
||||
//go:noinline
|
||||
func max(a, b int) int {
|
||||
if a > b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
var Result int
|
||||
|
||||
func BenchmarkMax(b *testing.B) {
|
||||
var r int
|
||||
for i := 0; i < b.N; i++ {
|
||||
r = max(-1, i)
|
||||
}
|
||||
Result = r
|
||||
}
|
||||
```
|
||||
|
||||
运行这个基准,会得到如下结果:[^3]
|
||||
|
||||
```bash
|
||||
% go test -bench=.
|
||||
BenchmarkMax-4 530687617 2.24 ns/op
|
||||
```
|
||||
|
||||
在我的 2015 MacBook Air 上 `max(-1, i)` 的耗时约为 2.24 纳秒。现在去掉 `//go:noinline` 编译指令,再看下结果:
|
||||
|
||||
```bash
|
||||
% go test -bench=.
|
||||
BenchmarkMax-4 1000000000 0.514 ns/op
|
||||
```
|
||||
|
||||
从 2.24 纳秒降到了 0.51 纳秒,或者从 `benchstat` 的结果可以看出,有 78% 的提升。
|
||||
|
||||
```bash
|
||||
% benchstat {old,new}.txt
|
||||
name old time/op new time/op delta
|
||||
Max-4 2.21ns ± 1% 0.49ns ± 6% -77.96% (p=0.000 n=18+19)
|
||||
```
|
||||
|
||||
这个提升是从哪儿来的呢?
|
||||
|
||||
首先,移除掉函数调用以及与之关联的前置处理 [^4] 是主要因素。把 `max` 函数的函数体在调用处展开,减少了处理器执行的指令数量并且消除了一些分支。
|
||||
|
||||
现在由于编译器优化了 `BenchmarkMax`,因此它可以看到 `max` 函数的内容,进而可以做更多的提升。当 `max` 被内联后,`BenchmarkMax` 呈现给编译器的样子,看起来是这样的:
|
||||
|
||||
```go
|
||||
func BenchmarkMax(b *testing.B) {
|
||||
var r int
|
||||
for i := 0; i < b.N; i++ {
|
||||
if -1 > i {
|
||||
r = -1
|
||||
} else {
|
||||
r = i
|
||||
}
|
||||
}
|
||||
Result = r
|
||||
}
|
||||
```
|
||||
|
||||
再运行一次基准,我们看一下手动内联的版本和编译器内联的版本的表现:
|
||||
|
||||
```bash
|
||||
% benchstat {old,new}.txt
|
||||
name old time/op new time/op delta
|
||||
Max-4 2.21ns ± 1% 0.48ns ± 3% -78.14% (p=0.000 n=18+18)
|
||||
```
|
||||
|
||||
现在编译器能看到在 `BenchmarkMax` 里内联 `max` 的结果,可以执行以前不能执行的优化措施。例如,编译器注意到 `i` 初始值为 `0`,仅做自增操作,因此所有与 `i` 的比较都可以假定 `i` 不是负值。这样条件表达式 `-1 > i` 永远不是 `true`。[^5]
|
||||
|
||||
证明了 `-1 > i` 永远不为 true 后,编译器可以把代码简化为:
|
||||
|
||||
```go
|
||||
func BenchmarkMax(b *testing.B) {
|
||||
var r int
|
||||
for i := 0; i < b.N; i++ {
|
||||
if false {
|
||||
r = -1
|
||||
} else {
|
||||
r = i
|
||||
}
|
||||
}
|
||||
Result = r
|
||||
}
|
||||
```
|
||||
|
||||
并且因为分支里是个常量,编译器可以通过下面的方式移除不会走到的分支:
|
||||
|
||||
```go
|
||||
func BenchmarkMax(b *testing.B) {
|
||||
var r int
|
||||
for i := 0; i < b.N; i++ {
|
||||
r = i
|
||||
}
|
||||
Result = r
|
||||
}
|
||||
```
|
||||
|
||||
这样,通过内联和由内联解锁的优化过程,编译器把表达式 `r = max(-1, i))` 简化为 `r = i`。
|
||||
|
||||
### 内联的限制
|
||||
|
||||
本文中我论述的内联称作<ruby>叶子内联<rt>leaf inlining</rt></ruby>:把函数调用栈中最底层的函数在调用它的函数处展开的行为。内联是个递归的过程,当把函数内联到调用它的函数 A 处后,编译器会把内联后的结果代码再内联到 A 的调用方,这样持续内联下去。例如,下面的代码:
|
||||
|
||||
```go
|
||||
func BenchmarkMaxMaxMax(b *testing.B) {
|
||||
var r int
|
||||
for i := 0; i < b.N; i++ {
|
||||
r = max(max(-1, i), max(0, i))
|
||||
}
|
||||
Result = r
|
||||
}
|
||||
```
|
||||
|
||||
与之前的例子中的代码运行速度一样快,因为编译器可以对上面的代码重复地进行内联,也把代码简化到 `r = i` 表达式。
|
||||
|
||||
下一篇文章中,我会论述当 Go 编译器想要内联函数调用栈中间的某个函数时选用的另一种内联策略。最后我会论述编译器为了内联代码准备好要达到的极限,这个极限 Go 现在的能力还达不到。
|
||||
|
||||
[^1]: 在 Go 中,一个方法就是一个有预先定义的形参和接受者的函数。假设这个方法不是通过接口调用的,调用一个无消耗的函数所消耗的代价与引入一个方法是相同的。
|
||||
[^2]: 在 Go 1.14 以前,栈检查的前置处理也被垃圾回收器用于 STW,通过把所有活跃的 goroutine 栈空间设为 0,来强制它们切换为下一次函数调用时的运行时状态。这个机制[最近被替换][8]为一种新机制,新机制下运行时可以不用等 goroutine 进行函数调用就可以暂停 goroutine。
|
||||
[^3]: 我用 `//go:noinline` 编译指令来阻止编译器内联 `max`。这是因为我想把内联 `max` 的影响与其他影响隔离开,而不是用 `-gcflags='-l -N'` 选项在全局范围内禁止优化。关于 `//go:` 注释在[这篇文章][10]中详细论述。
|
||||
[^4]: 你可以自己通过比较 `go test -bench=. -gcflags=-S` 有无 `//go:noinline` 注释时的不同结果来验证一下。
|
||||
[^5]: 你可以用 `-gcflags=-d=ssa/prove/debug=on` 选项来自己验证一下。
|
||||
|
||||
#### 相关文章:
|
||||
|
||||
1. [使 Go 变快的 5 件事](https://dave.cheney.net/2014/06/07/five-things-that-make-go-fast)
|
||||
2. [为什么 Goroutine 的栈空间会无限增长?](https://dave.cheney.net/2013/06/02/why-is-a-goroutines-stack-infinite)
|
||||
3. [Go 中怎么写基准测试](https://dave.cheney.net/2013/06/30/how-to-write-benchmarks-in-go)
|
||||
4. [Go 中隐藏的编译指令](https://dave.cheney.net/2018/01/08/gos-hidden-pragmas)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://dave.cheney.net/2020/04/25/inlining-optimisations-in-go
|
||||
|
||||
作者:[Dave Cheney][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://dave.cheney.net/author/davecheney
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://github.com/golang/go
|
||||
[2]: tmp.gBQ2tEtMHc#easy-footnote-bottom-1-4053 (In Go, a method is just a function with a predefined formal parameter, the receiver. The relative costs of calling a free function vs a invoking a method, assuming that method is not called through an interface, are the same.)
|
||||
[3]: tmp.gBQ2tEtMHc#easy-footnote-bottom-2-4053 (Up until Go 1.14 the stack check preamble was also used by the garbage collector to stop the world by setting all active goroutine’s stacks to zero, forcing them to trap into the runtime the next time they made a function call. This system was <a href="https://github.com/golang/proposal/blob/master/design/24543-non-cooperative-preemption.md">recently replaced</a> with a mechanism which allowed the runtime to pause an goroutine without waiting for it to make a function call.)
|
||||
[4]: tmp.gBQ2tEtMHc#easy-footnote-bottom-3-4053 (I’m using the <code>//go:noinline</code> pragma to prevent the compiler from inlining <code>max</code>. This is because I want to isolate the effects of inlining on <code>max</code> rather than disabling optimisations globally with <code>-gcflags='-l -N'</code>. I go into detail about the <code>//go:</code> comments in <a href="https://dave.cheney.net/2018/01/08/gos-hidden-pragmas">this presentation</a>.)
|
||||
[5]: tmp.gBQ2tEtMHc#easy-footnote-bottom-4-4053 (You can check this for yourself by comparing the output of <code>go test -bench=. -gcflags=-S</code> with and without the <code>//go:noinline</code> annotation.)
|
||||
[6]: tmp.gBQ2tEtMHc#easy-footnote-bottom-5-4053 (You can check this yourself with the <code>-gcflags=-d=ssa/prove/debug=on</code> flag.)
|
||||
[7]: tmp.gBQ2tEtMHc#easy-footnote-1-4053
|
||||
[8]: https://github.com/golang/proposal/blob/master/design/24543-non-cooperative-preemption.md
|
||||
[9]: tmp.gBQ2tEtMHc#easy-footnote-2-4053
|
||||
[10]: https://dave.cheney.net/2018/01/08/gos-hidden-pragmas
|
||||
[11]: tmp.gBQ2tEtMHc#easy-footnote-3-4053
|
||||
[12]: tmp.gBQ2tEtMHc#easy-footnote-4-4053
|
||||
[13]: tmp.gBQ2tEtMHc#easy-footnote-5-4053
|
||||
[14]: https://dave.cheney.net/2014/06/07/five-things-that-make-go-fast (Five things that make Go fast)
|
||||
[15]: https://dave.cheney.net/2013/06/02/why-is-a-goroutines-stack-infinite (Why is a Goroutine’s stack infinite ?)
|
||||
[16]: https://dave.cheney.net/2013/06/30/how-to-write-benchmarks-in-go (How to write benchmarks in Go)
|
||||
[17]: https://dave.cheney.net/2018/01/08/gos-hidden-pragmas (Go’s hidden #pragmas)
|
@ -0,0 +1,165 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (lxbwolf)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12181-1.html)
|
||||
[#]: subject: (Three Methods Boot CentOS/RHEL 7/8 Systems in Single User Mode)
|
||||
[#]: via: (https://www.2daygeek.com/boot-centos-7-8-rhel-7-8-single-user-mode/)
|
||||
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
|
||||
|
||||
以单用户模式启动 CentOS/RHEL 7/8 的三种方法
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202005/03/230109uw1f9zvv9upbhwv8.jpg)
|
||||
|
||||
单用户模式,也被称为维护模式,超级用户可以在此模式下恢复/修复系统问题。
|
||||
|
||||
通常情况下,这类问题在多用户环境中修复不了。系统可以启动但功能不能正常运行或者你登录不了系统。
|
||||
|
||||
在基于 [Red Hat][1](RHEL)7/8 的系统中,使用 `runlevel1.target` 或 `rescue.target` 来实现。
|
||||
|
||||
在此模式下,系统会挂载所有的本地文件系统,但不开启网络接口。
|
||||
|
||||
系统仅启动特定的几个服务和修复系统必要的尽可能少的功能。
|
||||
|
||||
当你想运行文件系统一致性检查来修复损坏的文件系统,或忘记 root 密码后重置密码,或要修复系统上的一个挂载点问题时,这个方法会很有用。
|
||||
|
||||
你可以用下面三种方法以单用户模式启动 [CentOS][2]/[RHEL][3] 7/8 系统。
|
||||
|
||||
* 方法 1:通过向内核添加 `rd.break` 参数来以单用户模式启动 CentOS/RHEL 7/8 系统
|
||||
* 方法 2:通过用 `init=/bin/bash` 或 `init=/bin/sh` 替换内核中的 `rhgb quiet` 语句来以单用户模式启动 CentOS/RHEL 7/8 系统
|
||||
* 方法 3:通过用 `rw init=/sysroot/bin/sh` 参数替换内核中的 `ro` 语句以单用户模式启动 CentOS/RHEL 7/8 系统
|
||||
|
||||
### 方法 1
|
||||
|
||||
通过向内核添加 `rd.break` 参数来以单用户模式启动 CentOS/RHEL 7/8 系统。
|
||||
|
||||
重启你的系统,在 GRUB2 启动界面,按下 `e` 键来编辑选中的内核。你需要选中第一行,第一个是最新的内核,然而如果你想用旧的内核启动系统你也可以选择其他的行。
|
||||
|
||||
![](https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-2.png)
|
||||
|
||||
根据你的 RHEL/CentOS 版本,找到 `linux16` 或 `linux` 语句,按下键盘上的 `End` 键,跳到行末,像下面截图中展示的那样添加关键词 `rd.break`,按下 `Ctrl+x` 或 `F10` 来进入单用户模式。
|
||||
|
||||
如果你的系统是 RHEL/CentOS 7,你需要找 `linux16`,如果你的系统是 RHEL/CentOS 8,那么你需要找 `linux`。
|
||||
|
||||
![](https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-3.png)
|
||||
|
||||
这个修改会让你的 root 文件系统以 “只读(`ro`)” 模式挂载。你可以用下面的命令来验证下。下面的输出也明确地告诉你当前是在 “<ruby>紧急模式<rt>Emergency Mode</rt></ruby>”。
|
||||
|
||||
```
|
||||
# mount | grep root
|
||||
```
|
||||
|
||||
![](https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-5.png)
|
||||
|
||||
为了修改 `sysroot` 文件系统,你需要用读写模式(`rw`)重新挂载它。
|
||||
|
||||
```
|
||||
# mount -o remount,rw /sysroot
|
||||
```
|
||||
|
||||
运行下面的命令修改环境,这就是大家熟知的 “监禁目录” 或 “chroot 监狱”。
|
||||
|
||||
```
|
||||
# chroot /sysroot
|
||||
```
|
||||
|
||||
![](https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-8.png)
|
||||
|
||||
现在,单用户模式已经完全准备好了。当你修复了你的问题要退出单用户模式时,执行下面的步骤。
|
||||
|
||||
CentOS/RHEL 7/8 默认使用 SELinux,因此创建下面的隐藏文件,这个文件会在下一次启动时重新标记所有文件。
|
||||
|
||||
```
|
||||
# touch /.autorelabel
|
||||
```
|
||||
|
||||
最后,用下面的命令重启系统。你也可以输入两次 `exit` 命令来重启你的系统。
|
||||
|
||||
```
|
||||
# reboot -f
|
||||
```
|
||||
|
||||
### 方法 2
|
||||
|
||||
通过用 `init=/bin/bash` 或 `init=/bin/sh` 替换内核中的 `rhgb quiet` 语句来以单用户模式启动 CentOS/RHEL 7/8 系统。
|
||||
|
||||
重启你的系统,在 GRUB2 启动界面,按下 `e` 键来编辑选中的内核。
|
||||
|
||||
![](https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-2.png)
|
||||
|
||||
找到语句 `rhgb quiet`,用 `init=/bin/bash` 或 `init=/bin/sh` 替换它,然后按下 `Ctrl+x` 或 `F10` 来进入单用户模式。
|
||||
|
||||
`init=/bin/bash` 的截图。
|
||||
|
||||
![](https://www.2daygeek.com/wp-content/uploads/2018/12/method-reset-forgotten-root-password-on-rhel-7-centos-7-1.png)
|
||||
|
||||
`init=/bin/sh` 的截图。
|
||||
|
||||
![](https://www.2daygeek.com/wp-content/uploads/2018/12/method-reset-forgotten-root-password-on-rhel-7-centos-7-1a.png)
|
||||
|
||||
默认情况下,上面的操作会以只读(`ro`)模式挂载你的 `/` 分区,因此你需要以读写(`rw`)模式重新挂载 `/` 文件系统,这样才能修改它。
|
||||
|
||||
```
|
||||
# mount -o remount,rw /
|
||||
```
|
||||
|
||||
![](https://www.2daygeek.com/wp-content/uploads/2018/12/method-reset-forgotten-root-password-on-rhel-7-centos-7-4.png)
|
||||
|
||||
现在你可以执行你的任务了。当结束时,执行下面的命令来开启重启时的 SELinux 重新标记。
|
||||
|
||||
```
|
||||
# touch /.autorelabel
|
||||
```
|
||||
|
||||
最后,重启系统。
|
||||
|
||||
```
|
||||
# exec /sbin/init 6
|
||||
```
|
||||
|
||||
### 方法 3
|
||||
|
||||
通过用 `rw init=/sysroot/bin/sh` 参数替换内核中的 `ro` 单词,以单用户模式启动 CentOS/RHEL 7/8 系统。
|
||||
|
||||
为了中断自动启动的过程,重启你的系统并在 GRUB2 启动界面按下任意键。
|
||||
|
||||
现在会展示你系统上所有可用的内核,选择最新的内核,按下 `e` 键来编辑选中的内核参数。
|
||||
|
||||
找到以 `linux` 或 `linux16` 开头的语句,用 `rw init=/sysroot/bin/sh` 替换 `ro`。替换完后按下 `Ctrl+x` 或 `F10` 来进入单用户模式。
|
||||
|
||||
运行下面的命令把环境切换为 “chroot 监狱”。
|
||||
|
||||
```
|
||||
# chroot /sysroot
|
||||
```
|
||||
|
||||
如果需要,做出必要的修改。修改完后,执行下面的命令来开启重启时的 SELinux 重新标记。
|
||||
|
||||
```
|
||||
# touch /.autorelabel
|
||||
```
|
||||
|
||||
最后,重启系统。
|
||||
|
||||
```
|
||||
# reboot -f
|
||||
```
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.2daygeek.com/boot-centos-7-8-rhel-7-8-single-user-mode/
|
||||
|
||||
作者:[Magesh Maruthamuthu][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://www.2daygeek.com/author/magesh/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.2daygeek.com/category/red-hat/
|
||||
[2]: https://www.2daygeek.com/category/centos/
|
||||
[3]: https://www.2daygeek.com/category/rhel/
|
||||
[4]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
|
@ -0,0 +1,228 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12175-1.html)
|
||||
[#]: subject: (Pop OS 20.04 Review: Best Ubuntu-based Distribution Just Got Better)
|
||||
[#]: via: (https://itsfoss.com/pop-os-20-04-review/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
Pop!_OS 20.04 点评:最好的基于 Ubuntu 的发行版越来越好了
|
||||
======
|
||||
|
||||
> Pop!_OS 20.04 是一款令人印象深刻的基于 Ubuntu 的 Linux 发行版。我在这篇评论中回顾了其主要的新功能,并分享了我对最新版本的体验。
|
||||
|
||||
现在,Ubuntu 20.04 LTS 及其官方变体版本已经发布了 - 是时候看看 [System76][1] 的 Pop!_OS 20.04 了,这是基于 Ubuntu 的最好的发行版之一。
|
||||
|
||||
老实说,Pop!_OS 是我最喜欢的 Linux 发行版,主要用于我做的所有事情。
|
||||
|
||||
现在,Pop!_OS 20.04 终于来了。是时候来看看它提供了哪些功能,以及你是否应该升级?
|
||||
|
||||
### Pop!_OS 20.04 LTS 中有什么新东西?
|
||||
|
||||
![][2]
|
||||
|
||||
从视觉上看,Pop!\_OS 20.04 LTS 与 Pop!\_OS 19.10 并没有太大的区别。然而,你可以发现几个新功能和改进。
|
||||
|
||||
但是,如果你之前使用的是 Pop!_OS 18.04 LTS,则可以发现有很多东西可以尝试。
|
||||
|
||||
随着 [GNOME 3.36][3] 的到来,及其带来的一些新功能,Pop!_OS 20.04 成为了一个令人激动的版本。
|
||||
|
||||
总的来说,以下是一些主要的亮点。
|
||||
|
||||
* 自动窗口平铺
|
||||
* 新的应用程序切换器和启动器
|
||||
* 在 Pop!_Shop 中增加了对 Flatpack 的支持。
|
||||
* GNOME 3.36
|
||||
* Linux 内核 5.4
|
||||
* 改进的混合图形支持
|
||||
|
||||
虽然听起来很有趣,但我们还是来了解一下详细的变化,以及到目前为止 Pop!_OS 20.04 的体验如何。
|
||||
|
||||
#### Pop!_OS 20.04 中的用户体验提升
|
||||
|
||||
毫无疑问,很多 Linux 发行版都提供了开箱即用的用户体验。同样的,[Ubuntu 20.04 LTS 也有一流的改进和功能][4]。
|
||||
|
||||
而对于 System76 的 Pop!_OS,他们总是试图更进一步。并且,大多数新功能旨在通过提供有用的功能来改善用户体验。
|
||||
|
||||
在这里,我将介绍一些改进,其中包括 [GNOME 3.36][3] 和 Pop!_OS 特有的一些功能。
|
||||
|
||||
#### 支持系统托盘图标
|
||||
|
||||
总算是有了!这可能不是什么大的改变 —— 但 Pop!_OS 以前没有支持系统托盘图标(或小程序图标)。
|
||||
|
||||
![][5]
|
||||
|
||||
随着 20.04 LTS 的发布,默认情况就有了系统托盘,不需要任何扩展。
|
||||
|
||||
依靠系统托盘图标的程序可能并不多 —— 但它仍然是重要的东西。
|
||||
|
||||
就我而言,我以前无法在 Pop!_OS 19.10 上使用 [ActivityWatch][6] —— 但现在可以了。
|
||||
|
||||
#### 自动窗口平铺
|
||||
|
||||
![][7]
|
||||
|
||||
自动窗口平铺是我一直想尝试的东西 —— 但从来没花时间使用过 [i3][9] 这样的[平铺窗口管理器][8]来设置它,更别说是 [Regolith 桌面][10]了。
|
||||
|
||||
在 Pop!_OS 20.04 中,你就不需要这样做了。自动窗口平铺功能已经内置,无需设置。
|
||||
|
||||
它还提供了“显示活动提示”的选项,也就是说,它将高亮显示活动窗口以避免混淆。而且,你还可以调整窗口之间的间隙。
|
||||
|
||||
![][11]
|
||||
|
||||
你可以在他们的官方视频中看到它是如何工作的:
|
||||
|
||||
- [System76 Pop!_OS 20.04 - Auto Tiling](https://youtu.be/-fltwBKsMY0)
|
||||
|
||||
而且,我得说,这是 Pop!_OS 20.04 上最大的新增功能之一,有可能帮助你更有效地进行多任务处理。
|
||||
|
||||
即使每次使用该功能都很方便,但为了最大程度地利用它,最好是使用一个大于 21 英寸的显示屏(至少)! 而且,因为这个原因 —— 我真的很想把我的显示器也升级一下!
|
||||
|
||||
#### 新的扩展应用
|
||||
|
||||
![][13]
|
||||
|
||||
Pop!_OS 内置了一些独特的 GNOME 扩展。但是,你不需要用 GNOME Tweaks 来管理扩展。
|
||||
|
||||
新增加的 “Extensions” 应用可以让你在 Pop!_OS 20.04 上配置和管理扩展程序。
|
||||
|
||||
#### 改进的通知中心
|
||||
|
||||
![][14]
|
||||
|
||||
在新的 GNOME 3.36 中,通知中心的外观经过了改进。这里,我启用了黑暗模式。
|
||||
|
||||
#### 新的应用程序切换器 & 启动器
|
||||
|
||||
![][15]
|
||||
|
||||
你仍然可以用 `ALT+TAB` 或 `Super+TAB` 来浏览正在运行的应用程序。
|
||||
|
||||
但是,当你有很多事情要做的时候,这很耗时。所以,在 Pop!_OS 20.04上,你可以使用 `Super+ /` 激活应用程序切换器和启动器。
|
||||
|
||||
一旦你习惯了这个快捷键,它将是非常方便的东西。
|
||||
|
||||
除此以外,你可能会发现 Pop!_OS 20.04 上的图标/窗口在视觉上有许多其它细微的改进。
|
||||
|
||||
#### 新的登录界面
|
||||
|
||||
嗯,这是 GNOME 3.36 带来的一个明显的变化。但是,它看起来确实很不错!
|
||||
|
||||
![][16]
|
||||
|
||||
#### Pop!_Shop 支持 Flatpak
|
||||
|
||||
通常,Pop!_Shop 已经是一个非常有用的东西了,包括它自有的在内,它带有一个巨大的软件仓库。
|
||||
|
||||
现在,在 Pop!\_OS 20.04 中,你可以用 Pop!_Shop 安装任何可用软件的 Debian 包或 Flatpak(通过 Flathub) —— 当然,前提是某个软件有 Flatpak 软件包。
|
||||
|
||||
如果你没有使用 Pop!_OS 20.04,你可能要看看[如何在 Linux 上使用 Flatpak][18]。
|
||||
|
||||
![][19]
|
||||
|
||||
就我个人而言,我并不是 Flatpak 的粉丝,但有些应用如 GIMP 需要你安装 Flatpak 包才能获得最新版本。所以,在 Pop!_Shop 上直接支持了 Flatpak 绝对是一件好事。
|
||||
|
||||
#### 键盘快捷键更改
|
||||
|
||||
如果你习惯了 Pop!_OS 19.10 或更早的版本上现有的键盘快捷键,这可能会让你很烦。
|
||||
|
||||
不管是哪种情况,有几个重要的键盘快捷键变化可能会改善你的体验,如下:
|
||||
|
||||
* 锁定屏幕:`Super + L` 改为 `Super + Escape`。
|
||||
* 移动工作区:`Super + 上/下箭头键` 改为 `Super + CTRL + 上/下箭头键`。
|
||||
* 关闭窗口:`Super + W` 变更为 `Super + Q`。
|
||||
* 切换最大化:`Super +向上箭头` 改为 `Super + M`。
|
||||
|
||||
#### Linux 内核 5.4
|
||||
|
||||
与其他大多数最新的 Linux 发行版相似,Pop!_OS 20.04 搭载了 [Linux 内核 5.4][20]。
|
||||
|
||||
所以,很明显,你可以期望获得对 [exFAT 支持][21]、改进的 AMD 图形兼容性以及它附带所有其他功能。
|
||||
|
||||
#### 性能提升
|
||||
|
||||
尽管 Pop!_OS 并不称自己是轻量级的 Linux 发行版,但它仍然是一个资源节约型的发行版。而且,有了 GNOME 3.36 的支持,它的速度应该足够快了。
|
||||
|
||||
考虑到我已经将 Pop!\_OS 作为主要发行版使用已经一年多了,我从来没有遇到过性能问题。这就是你安装了 Pop!_OS 20.04 之后的资源使用情况(取决于你的系统配置)。
|
||||
|
||||
![][22]
|
||||
|
||||
给你一个作为参考,我的台式机配置包括 i5-7400 处理器、16GB 内存(2400MHz)、NVIDIA GTX 1050ti 显卡和 SSD。
|
||||
|
||||
我不是一个系统基准测试的忠实拥护者,因为除非你去尝试,否则它并不能让你知道特定的应用或游戏的性能。
|
||||
|
||||
你可以试试 [Phoronix 测试套件][23]来分析你的系统表现。但是,Pop!_OS 20.04 LTS 应该是一个很爽快的体验!
|
||||
|
||||
#### 软件包更新 & 其他改进
|
||||
|
||||
尽管每个基于Ubuntu的发行版都受益于Ubuntu 20.04 LTS的改进,但也有一些 Pop!_OS 特有的错误修复和改进。
|
||||
|
||||
除此之外,一些主要的应用程序/包(如 Firefox 75.0)也已经更新到了最新版本。
|
||||
|
||||
到现在为止,应该没有任何严重的错误,至少对我来说没有。
|
||||
|
||||
你可以在 [GitHub 上查看他们的开发进度][24],以了解他们在测试期间已经修复的问题和发布后即将修复的问题。
|
||||
|
||||
### 下载 & 支持 Pop!_OS 20.04
|
||||
|
||||
![][25]
|
||||
|
||||
在这个版本中,System76 终于增加了一个可选的订阅模式来支持 Pop!_OS 的开发。
|
||||
|
||||
你可以免费下载 Pop!_OS 20.04 —— 但如果你想支持他们,我建议你只需要 \$1/月就可以订阅。
|
||||
|
||||
- [Pop!_OS 20.04][26]
|
||||
|
||||
### 我对 Pop OS 20.04 的看法
|
||||
|
||||
我必须提到的是,我正在为最新的 20.04 版本提供全新的墙纸。但是,这没什么大不了的。
|
||||
|
||||
有了窗口平铺功能、支持 flatpak,以及众多其他改进,到目前为止,我对 Pop!_OS 20.04 的体验是一流的。另外,很高兴看到他们在一些流行软件的开箱即用支持上突出了他们对创意专业人士的关注。
|
||||
|
||||
![][27]
|
||||
|
||||
Ubuntu 20.04 的所有优点,再加上 System76 的一些额外的加料,让我印象深刻!
|
||||
|
||||
你试过 Pop!_OS 20.04 吗?请在下面的评论中告诉我你的想法。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/pop-os-20-04-review/
|
||||
|
||||
作者:[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://system76.com
|
||||
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/pop_os_20_04_review.jpg?ssl=1
|
||||
[3]: https://itsfoss.com/gnome-3-36-release/
|
||||
[4]: https://itsfoss.com/ubuntu-20-04-release-features/
|
||||
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/system-tray-icons-pop-os.jpg?ssl=1
|
||||
[6]: https://activitywatch.net/
|
||||
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/pop-os-automatic-screen-tiling.png?ssl=1
|
||||
[8]: https://en.wikipedia.org/wiki/Tiling_window_manager
|
||||
[9]: https://i3wm.org/
|
||||
[10]: https://itsfoss.com/regolith-linux-desktop/
|
||||
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/tile-feature-options-popos.jpg?ssl=1
|
||||
[12]: https://www.youtube.com/c/itsfoss?sub_confirmation=1
|
||||
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/pop-os-extensions.jpg?ssl=1
|
||||
[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/notification-center-pop-os.jpg?ssl=1
|
||||
[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/pop-os-application-launcher.jpg?ssl=1
|
||||
[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/pop-os-20-04-lock-screen.jpg?ssl=1
|
||||
[17]: https://launchpad.net/~system76/+archive/ubuntu/pop
|
||||
[18]: https://itsfoss.com/flatpak-guide/
|
||||
[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/pop-os-flatpak-deb.jpg?ssl=1
|
||||
[20]: https://itsfoss.com/linux-kernel-5-4/
|
||||
[21]: https://itsfoss.com/mount-exfat/
|
||||
[22]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/pop-os-20-04-performance.jpg?ssl=1
|
||||
[23]: https://www.phoronix-test-suite.com/
|
||||
[24]: https://github.com/orgs/pop-os/projects/13
|
||||
[25]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/support-pop-os.jpg?ssl=1
|
||||
[26]: https://pop.system76.com/
|
||||
[27]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/pop-os-stem-focus.jpg?ssl=1
|
@ -1,91 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Remember Unity8 from Ubuntu? UBports is Renaming it to Lomiri)
|
||||
[#]: via: (https://itsfoss.com/unity8-lomiri/)
|
||||
[#]: author: (John Paul https://itsfoss.com/author/john/)
|
||||
|
||||
Remember Unity8 from Ubuntu? UBports is Renaming it to Lomiri
|
||||
======
|
||||
|
||||
Ever since Ubuntu abandoned the Unity project, UBports continued the maintenance and development of Unity. On February 27th 2020, [UBports][1] announced that they are giving Unity8 a new branding in the form of Lomiri.
|
||||
|
||||
### Unity8 is now Lomiri
|
||||
|
||||
![Unity8 in action | Image Credit: UBports][2]
|
||||
|
||||
[UBports announced][3] that the Unity8 desktop environment would be renamed as Lomiri. They gave three reasons for this fairly drastic announcement.
|
||||
|
||||
First, they want to avoid confusion with the [Unity game engine][4]. Quite a few people confused the two. UBports noted that they are frequently receiving questions regarding “how to import 3D models and meshes into our shell”. When you search “Unity” in your favorite search engine, most of the top links are for the game engine.
|
||||
|
||||
The second reason for the name change has to do with the new effort to package Unity8 for Debian. Unfortunately, many of the Unity8’s dependencies have Ubuntu in the name, for example, _**ubuntu-ui-toolkit**_. Debian packagers warned that packages that have Ubuntu in the name may not be accepted into [Debian][5].
|
||||
|
||||
Finally, UBports said the name change would improve verbal communications. Saying Unity8 repeatedly can be a mouthful. People would not have to worry about confusing “users of Ubuntu Unity and Unity (the game engine)”.
|
||||
|
||||
UBports went on to stress that the name change was not “triggered by any action from Canonical or the Ubuntu community, legal or otherwise”.
|
||||
|
||||
They noted that this name change was the perfect time for them to switch to [GitHub alternative GitLab][6] for their development.
|
||||
|
||||
Interestingly, the announcement did not explain how they picked Lomiri as the new name. All they said is that “We went through many different names before settling on Lomiri. All of them had problems with pronunciation, availability, or other related issues.”
|
||||
|
||||
UBports noted that most Ubuntu Touch users would be unaffected by the name change. Developers and power users might notice some changes, but UBports “will strive to maintain backwards compatibility within Ubuntu Touch for the foreseeable future”.
|
||||
|
||||
### What Exactly is Being Renamed?
|
||||
|
||||
![][7]
|
||||
|
||||
According to the announcement, packages that have either Ubuntu or Unity in the title will be affected. For example,
|
||||
|
||||
* **unity8**, containing the shell, will become **lomiri**
|
||||
* **ubuntu-ui-toolkit** will become **lomiri-ui-toolkit**
|
||||
* **ubuntu-download-manager** will become **lomiri-download-manager**
|
||||
|
||||
|
||||
|
||||
On top of this, interfaces call will change, as well. “For example, the **Ubuntu.Components** QML import will change to **Lomiri.Components**.” For the sake of backwards compatibility, Ubuntu Touch images will not change too much. “Developers will only need to update to the new API when they’d like to package their apps for other distributions.”
|
||||
|
||||
### What Will Stay the Same?
|
||||
|
||||
Since renaming packages can cause quite a few cascading problems, UBports wants to limit the number of packages they change. They don’t expect the following things to change.
|
||||
|
||||
* Packages that don’t use the “Ubuntu” or “Unity” names
|
||||
* Ubuntu Touch will remain the same
|
||||
* Any components which are already used by other projects and accepted into other distributions
|
||||
|
||||
|
||||
|
||||
### Final Thoughts
|
||||
|
||||
![][8]
|
||||
|
||||
Overall, I think this change will be good for Ubuntu Touch in the long run. I understand why [Canonical][9] picked the Unity name for their convergence desktop, but I think the desktop environment was overshadowed by the game engine from the beginning. This will give them room to breathe and also free up valuable coding time. The less time spent replying to questions about 3D models the more time that can be spent creating a convergent desktop.
|
||||
|
||||
If you have any further questions or concerns about the name change, you visit the [UBports forms][10]. They have set up a thread specifically for this topic.
|
||||
|
||||
Don’t hesitate to share our views on it in the comment section.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/unity8-lomiri/
|
||||
|
||||
作者:[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://ubports.com/
|
||||
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/unity8_ubports.png?ssl=1
|
||||
[3]: https://ubports.com/blog/ubports-blog-1/post/lomiri-new-name-same-great-unity8-265
|
||||
[4]: https://en.wikipedia.org/wiki/Unity_(game_engine)
|
||||
[5]: https://www.debian.org/
|
||||
[6]: https://itsfoss.com/github-alternatives/
|
||||
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/Unity8-lomiri.png?ssl=1
|
||||
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/ubports.jpeg?ssl=1
|
||||
[9]: https://canonical.com/
|
||||
[10]: https://forums.ubports.com/topic/3874/unity8-is-now-lomiri
|
@ -1,82 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Linux Foundation prepares for disaster, new anti-tracking data set, Mozilla goes back to mobile OSes, and more open source news)
|
||||
[#]: via: (https://opensource.com/article/20/3/news-march-14)
|
||||
[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt)
|
||||
|
||||
Linux Foundation prepares for disaster, new anti-tracking data set, Mozilla goes back to mobile OSes, 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 the Linux Foundation's disaster relief project, DuckDuckGo's anti-tracking tool, open textbooks, and more!
|
||||
|
||||
### Linux Foundation unveils Project OWL
|
||||
|
||||
When a disaster happens, it's vital to keep communications links up and running. One way to do that is with [mesh networks][2]. The Linux Foundation [has unveiled][3] Project OWL to "help build mesh network nodes for global emergency communications networks."
|
||||
|
||||
Short for _Organisation, Whereabouts, and Logistics_, OWL is firmware for Internet of Things (IoT) devices that "can quickly turn a cheap wireless device into a ‘DuckLink’, a mesh network node". Those devices can connect to other, similar devices around them. OWL also provides an analytics tool that responders can use for "coordinating resources, learning about weather patterns, and communicating with civilians who would otherwise be cut off."
|
||||
|
||||
### New open source tool to block web trackers
|
||||
|
||||
It's no secret that sites all over the web track their visitors. Often, it's shocking how much of that goes on and what a threat to your privacy that is. To help web browser developers better protect their users, the team behind search engine DuckDuckGo is "[sharing data it's collected about online trackers with other companies so they can also protect your privacy][4]."
|
||||
|
||||
That dataset is called Tracker Radar and it "details 5,326 internet domains used by 1,727 companies and organizations that track you online". Browser Radar is different from other tracker databases in that it "annotates data with other information, like whether blocking a tracker is likely to break a website, so anyone using it can pick the best balance of privacy and convenience."
|
||||
|
||||
Tracker Radar's dataset is [available on GitHub][5]. The repository also links to the code for the [crawler][6] and [detector][7] that work with the data.
|
||||
|
||||
### Oregon Tech embracing open textbooks
|
||||
|
||||
With the cost of textbooks taking an increasingly large bite out of the budgets of university students, more and more schools are turning to open textbooks to cut those costs. By embracing open textbooks, the Oregon Institute of Technology has [save students $400,000][8] over the last two years.
|
||||
|
||||
The school offers open textbooks for 26 courses, ranging "from chemistry and biology, to respiratory care, sociology and engineering." Although the textbooks are free, university librarian John Schoppert points out that the materials are of a high quality and that faculty members have been "developing lab manuals and open-licensed textbooks where they hadn’t existed before and improved on others’ materials."
|
||||
|
||||
### Mozilla to help update feature phone OS
|
||||
|
||||
A few years ago, Mozilla tried to break into the world of mobile operating systems with Firefox OS. While that effort didn't pan out, Firefox OS found new life powering low-cost feature phones under the name KaiOS. Mozilla's [jumping back into the game][9] by helping "modernize the browser engine that's core to the software."
|
||||
|
||||
KaiOS is built upon a four-year-old version of Mozilla's Gecko browser engine. Updating Gecko will "improve security, make apps run faster and more smoothly, and open [KaiOS to] more-sophisticated apps and WebGL 2.0 for better games graphics." Mozilla said its collaboration will include "Mozilla's help with test engineering and adding new low-level Gecko abilities."
|
||||
|
||||
#### In other news
|
||||
|
||||
* [CERN adopts Mattermost, an open source messaging app][10]
|
||||
* [Open-source software analyzes economics of biofuels, bioproducts][11]
|
||||
* [Netflix releases Dispatch for crisis management orchestration][12]
|
||||
* [FreeNAS and TrueNAS are merging][13]
|
||||
* [Smithsonian 3D Scans NASA Space Shuttle Discovery And Makes It Open Source][14]
|
||||
|
||||
|
||||
|
||||
Thanks, as always, to Opensource.com staff members and [Correspondents][15] for their help this week.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/3/news-march-14
|
||||
|
||||
作者:[Scott Nesbitt][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/scottnesbitt
|
||||
[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://en.wikipedia.org/wiki/Mesh_networking
|
||||
[3]: https://www.smartcitiesworld.net/news/news/linux-announces-open-source-project-to-aid-disaster-relief-5102
|
||||
[4]: https://www.cnet.com/news/privacy-focused-duckduckgo-launches-new-effort-to-block-online-tracking/
|
||||
[5]: https://github.com/duckduckgo/tracker-radar
|
||||
[6]: https://github.com/duckduckgo/tracker-radar-collector
|
||||
[7]: https://github.com/duckduckgo/tracker-radar-detector
|
||||
[8]: https://www.heraldandnews.com/news/local_news/oregon-tech-turns-to-open-source-materials-to-save-students/article_ba641e79-3034-5b9a-a8f7-b5872ddc998e.html
|
||||
[9]: https://www.cnet.com/news/mozilla-helps-modernize-feature-phones-powered-by-firefox-tech/
|
||||
[10]: https://joinup.ec.europa.eu/collection/open-source-observatory-osor/news/cern-uses-mattermost
|
||||
[11]: http://www.biomassmagazine.com/articles/16848/open-source-software-analyzes-economics-of-biofuels-bioproducts
|
||||
[12]: https://jaxenter.com/netflix-dispatch-crisis-management-orchestration-169381.html
|
||||
[13]: https://liliputing.com/2020/03/freenas-and-turenas-are-merging-open-source-operating-systems-for-network-attached-storage.html
|
||||
[14]: https://www.forbes.com/sites/tjmccue/2020/03/04/smithsonian-3d-scans-the-nasa-space-shuttle-discovery-and-makes-it-open-source/#39aa0f243ecd
|
||||
[15]: https://opensource.com/correspondent-program
|
@ -1,60 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Tools for monitoring, introvert inclusion, and more industry trends)
|
||||
[#]: via: (https://opensource.com/article/20/3/monitoring-introvert-industry-trends)
|
||||
[#]: author: (Tim Hildred https://opensource.com/users/thildred)
|
||||
|
||||
Tools for monitoring, introvert inclusion, 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.
|
||||
|
||||
## [Top six open source tools for monitoring][2]
|
||||
|
||||
> These tools are widely used in the tech industry, and they all have their benefits. Most of these solutions, however, require skilled implementation and ongoing manual maintenance that can be a burden for DevOps teams and a distraction from the business. There’s no one solution that can cater to all of your requirements, since each tool focuses on one or two specific aspects of observability and analysis. By mixing these tools together, you can derive a unique solution for your individual business needs.
|
||||
|
||||
**The impact**: If a container falls over in the cluster and there is no open source monitoring tool to see it, did it really happen?
|
||||
|
||||
## [Introvert environment: What can we do?][3]
|
||||
|
||||
> An example is its inclusive team dynamics programme, which consists of both information and guidance on everyday practices. Each team is required to appoint an inclusion champion, who ensures all members are given the space to contribute to discussions. Leaders are also encouraged not to speak first during meetings.
|
||||
|
||||
**The impact**: If it is hard for you not to speak for a while in a meeting, that probably indicates you should be doing it more often. Will new WFH policies make this harder, or easier? Only time will tell.
|
||||
|
||||
## [The difference between API Gateways and service mesh][4]
|
||||
|
||||
> The service connectivity capabilities that service mesh provides are conflicting with the API connectivity features that an API gateway provides. However, because the ones provided by service mesh are more inclusive (L4 + L7, all TCP traffic, not just HTTP and not just limited to APIs but to every service), they are in a way more complete. But as we can see from the diagram above, there are also use cases that service mesh does not provide, and that is the “API as a product” use case as well as the full API management lifecycle, which still belong to the API gateway pattern.
|
||||
|
||||
**The impact**: Another way of saying this is you can't make money from your service mesh directly, unlike your APIs.
|
||||
|
||||
## [Open Policy Agent’s mission to secure the cloud][5]
|
||||
|
||||
> While the cost of implementing OPA is a little high today, the technology pays for itself by providing more control and helping to secure systems. As OPA continues to be refined, we can expect implementation costs to fall, making an investment in OPA easier to justify.
|
||||
|
||||
**The impact**: Compliance is expensive; large investments in it only make sense if non-compliance is even more so.
|
||||
|
||||
_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/3/monitoring-introvert-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://devops.com/top-six-open-source-tools-for-monitoring-kubernetes-and-docker/
|
||||
[3]: https://www.raconteur.net/hr/introverts-workplace
|
||||
[4]: https://www.cncf.io/blog/2020/03/06/the-difference-between-api-gateways-and-service-mesh/
|
||||
[5]: https://thenewstack.io/open-policy-agents-mission-to-secure-the-cloud/
|
@ -1,78 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (With npm Acquisition, Microsoft is Set to Own the Largest Software Registry in the World)
|
||||
[#]: via: (https://itsfoss.com/microsoft-npm-acquisition/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
With npm Acquisition, Microsoft is Set to Own the Largest Software Registry in the World
|
||||
======
|
||||
|
||||
Microsoft has been betting big on open source for past few years. Apart from open sourcing a few things here and there, Microsoft is contributing a lot to Linux kernel (for its Azure cloud platform).
|
||||
|
||||
To further strengthen its position in the open source world, [Microsoft acquired the popular open source code hosting platform GitHub for $7.5 billion][1].
|
||||
|
||||
Now Microsoft owned GitHub [has acquired][2] [npm][3] ( short for Node Package Manager). npm is the [world’s largest software registry][4] with [more than 1.3 million packages that have 75 billion downloads a month][5].
|
||||
|
||||
![][6]
|
||||
|
||||
If you are not familiar, npm is a package manager for JavaScript programming language, primarily the hugely popular open source [Node.js][7].
|
||||
|
||||
Though npm has scope of private repository for enterprises, most of the 1.3 million packages are open source and/or used in various open source projects.
|
||||
|
||||
Both node.js and npm are used by big software and IT companies like IBM, Yahoo and big corporations like Netflix and PayPal.
|
||||
|
||||
In case you are wondering, the acquisition amount has not been disclosed by either party.
|
||||
|
||||
### Microsoft’s proposed plan for npm
|
||||
|
||||
![][8]
|
||||
|
||||
GitHub CEO Nat Friedman assured that Microsoft intends to keep the npm registry available as open-source and free to developers.
|
||||
|
||||
Once the acquisition is complete, Microsoft is going to invest in the registry infrastructure and platform. It plans to improve the core experience of npm by adding new features like Workspaces, as well as bringing improvements to publishing and multi-factor authentication.
|
||||
|
||||
Microsoft also intends to integrate GitHub and npm so that developers could trace a change from a GitHub pull request to the npm package version that fixed it.
|
||||
|
||||
### Part of a larger plan
|
||||
|
||||
First, [Microsoft bought GitHub][1], the platform that had the largest open source repositories and now npm, the largest software registry. Clearly, Microsoft is tightening its grip around open source projects. This could allow Microsoft to dictate the policies around these open source projects in future.
|
||||
|
||||
When Microsoft acquired GitHub, several open source developers moved to [alternate platforms like GitLab][9] but GitHub remained the first choice for the developers. Microsoft did introduce some innovative features like security advisories, [package registry][10], [sponsorship][11] etc. Microsoft is expanding GitHub by forming communities around it specially in developing countries. Recently, [GitHub announced its Indian subsidiary][12] to specially attract young developers to its platform.
|
||||
|
||||
So now Microsoft owns the professional social network [LinkedIn][13], developer oriented GitHub and npm. This indicates that Microsoft will continue its shopping spree and will acquire more open source related projects that have substantial developer population.
|
||||
|
||||
What could be next then? WordPress because it is the [most popular open source CMS][14] and [runs 33% of the websites][15] on the internet?
|
||||
|
||||
While we wait and watch for Microsoft’s next move, why not share your views on this development? Comment section is all yours.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/microsoft-npm-acquisition/
|
||||
|
||||
作者:[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/microsoft-github/
|
||||
[2]: https://github.blog/2020-03-16-npm-is-joining-github/
|
||||
[3]: https://www.npmjs.com/
|
||||
[4]: https://www.linux.com/news/state-union-npm/
|
||||
[5]: https://www.zdnet.com/article/microsoft-buys-javascript-developer-platform-npm-plans-to-integrate-it-with-github/
|
||||
[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/microsoft-github-npm.jpg?ssl=1
|
||||
[7]: https://nodejs.org/en/
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/github-npm.jpg?ssl=1
|
||||
[9]: https://itsfoss.com/github-alternatives/
|
||||
[10]: https://github.blog/2019-05-10-introducing-github-package-registry/
|
||||
[11]: https://itsfoss.com/github-sponsors-program/
|
||||
[12]: https://github.blog/2020-02-12-announcing-github-india/
|
||||
[13]: https://www.linkedin.com/
|
||||
[14]: https://itsfoss.com/open-source-cms/
|
||||
[15]: https://wordpress.org/news/2019/03/one-third-of-the-web/
|
@ -1,98 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (OBS Studio 25.0 is Here With Vulkan-based Games Capture Feature and More)
|
||||
[#]: via: (https://itsfoss.com/obs-studio-25-release/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
OBS Studio 25.0 is Here With Vulkan-based Games Capture Feature and More
|
||||
======
|
||||
|
||||
_**Brief: Open source screen recording and streaming software OBS Studio 25.0 has just been released and it brings the ability to capture Vulkan-based games with game capture among other new features.**_
|
||||
|
||||
![][1]
|
||||
|
||||
If you are into recording your desktop or streaming it, you might have heard of [OBS][2] (Open Broadcaster Software) Studio. It’s one of the [best screen recorder tools on Linux][3] and other operating systems.
|
||||
|
||||
But OBS is more than just a simple screen recorder. It also provides all the stuff you need for streaming your recordings.
|
||||
|
||||
### New features in OBS Studio 25.0
|
||||
|
||||
![OBS 25.0][4]
|
||||
|
||||
OBS Studio has released it’s latest version 25.0 with plenty of new features to make your recording and streaming experience better. Let’s take a look at some of the main new features:
|
||||
|
||||
* Capture Vulkan-based games with game capture
|
||||
* New capture method to window capture which allows capturing browsers, browser-based windows, and UWP programs
|
||||
* Advanced scene collection importing allows you to import from other common streaming programs
|
||||
* Media source hotkeys to allow control of playback
|
||||
* Ability to drag and drop URLs to create browser sources
|
||||
* Support for the [SRT protocol][5]
|
||||
* Ability to lock volume values of audio sources in the mixer
|
||||
* Support for certain devices that can automatically rotate their camera output such as the Logitech StreamCam
|
||||
* System tray icon to show when the recording is paused
|
||||
* Help icons when an property has a tooltip associated with it
|
||||
|
||||
|
||||
|
||||
Apart from there, there are plenty of bug features and minor changes that you may follow in the [release notes][6].
|
||||
|
||||
### Install OBS Studio 25.0 on Linux
|
||||
|
||||
OBS Studio is a cross-platform software and is also available for Windows and macOS in addition to Linux. You can download it from its official website.
|
||||
|
||||
[Download OBS Studio 25.0][7]
|
||||
|
||||
For Linux, you can grab the source code and build it your self. I know that’s not very convenient for everyone. The good news is that you can install the latest OBS version using Snap or Flatpak packages.
|
||||
|
||||
On Ubuntu or any other [Linux distribution with Snap support][8], you can use the following command:
|
||||
|
||||
```
|
||||
sudo snap install obs-studio
|
||||
```
|
||||
|
||||
If your distribution supports Fltapak packages, you can get it from Flathub website:
|
||||
|
||||
[OBS Studio on Flathub][9]
|
||||
|
||||
For Ubuntu users, there is also the official PPA for easily installing it. In a terminal, you can enter the following command one by one:
|
||||
|
||||
```
|
||||
sudo add-apt-repository ppa:obsproject/obs-studio
|
||||
sudo apt update
|
||||
sudo apt install obs-studio
|
||||
```
|
||||
|
||||
You can [learn about deleting PPA here][10].
|
||||
|
||||
Personally, I haven’t used OBS much though I have heard great stuff about it. I don’t live stream but I do record my desktop to create tutorial and information Linux videos on I[t’s FOSS YouTube channel][11] (you should subscribe to it if you haven’t already). For that, I [use Kazam][12] which I find simpler to use.
|
||||
|
||||
Do you use OBS Studio? Which features you like the most? Do share your views.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/obs-studio-25-release/
|
||||
|
||||
作者:[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://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/obs_logo_icon_small.png?resize=150%2C150&ssl=1
|
||||
[2]: https://obsproject.com/
|
||||
[3]: https://itsfoss.com/best-linux-screen-recorders/
|
||||
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/obs-25-ubuntu.png?ssl=1
|
||||
[5]: https://en.wikipedia.org/wiki/Secure_Reliable_Transport
|
||||
[6]: https://github.com/obsproject/obs-studio/releases/tag/25.0.0
|
||||
[7]: https://obsproject.com/download
|
||||
[8]: https://itsfoss.com/install-snap-linux/
|
||||
[9]: https://flathub.org/apps/details/com.obsproject.Studio
|
||||
[10]: https://itsfoss.com/how-to-remove-or-delete-ppas-quick-tip/
|
||||
[11]: https://www.youtube.com/channel/UCEU9D6KIShdLeTRyH3IdSvw
|
||||
[12]: https://itsfoss.com/kazam-screen-recorder/
|
@ -1,70 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (npm joins GitHub, building operators in Kubernetes, and more industry trends)
|
||||
[#]: via: (https://opensource.com/article/20/3/npm-github-operators-kubernetes-industry-trends)
|
||||
[#]: author: (Tim Hildred https://opensource.com/users/thildred)
|
||||
|
||||
npm joins GitHub, building operators in Kubernetes, 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.
|
||||
|
||||
## [npm is joining GitHub][2]
|
||||
|
||||
> Looking further ahead, we’ll integrate GitHub and npm to improve the security of the open source software supply chain, and enable you to trace a change from a GitHub pull request to the npm package version that fixed it. Open source security is an important global issue, and with the recent launch of the [GitHub Security Lab][3] and GitHub’s built-in [security advisories][4], we are well-positioned to make a difference. In addition, [GitHub Sponsors][5] has already paid out millions of dollars to open source contributors, and we’re excited to explore tasteful ways to extend it to the npm ecosystem.
|
||||
|
||||
**The impact**: Open source supply chain security is a big problem that probably needs a lot more resources thrown at it.
|
||||
|
||||
## [Why and how to build operators in Kubernetes][6]
|
||||
|
||||
> For cluster administrators managing large clusters, this proliferation of development methodologies and management interfaces can be problematic. The class of applications that Operators were developed to manage are almost always part of a larger application stack, with dependencies between them. If we have a lot of Operators written in different ways running on our clusters, how can we ensure they will interoperate with each other, and how do we validate and test them?
|
||||
|
||||
**The impact**: This illustrates two cool things about open source. First, the alternating waves of innovation and consolidation. Second, the empowering of affected parties to address their own challenges.
|
||||
|
||||
## [Automation for improved security frameworks][7]
|
||||
|
||||
> In recent years we’ve seen the posts of CIO and CTO elevated to boardroom level, with senior figures in IT now influencing corporate strategy. Due to a heightened awareness of cybersecurity, it won’t be long before the board looks to CSO and CISO executives for strategic direction.
|
||||
|
||||
**The impact**: This statement has gotten truer over the last several weeks. More activity is being pushed online than ever before; keeping that activity secure is integral to making it all profitable. Security people need to be able to say "no" at the highest possible level.
|
||||
|
||||
## [Interoperability of open source tools: The emergence of interfaces][8]
|
||||
|
||||
> Being non-opinionated about the adoption of specific technologies and the methodologies of distributing its primitive resources, were the main axes of Kubernetes evolution. Additionally, the proliferation of solutions from multiple vendors played an instrumental role in the emergence of interfaces and it served as the engine for further development and innovation.
|
||||
|
||||
**The impact**: Kubernetes may be the only large-scale open source project where competition is hot. Even still, competitors need to be able to work together and interfaces are the points that separate collaboration and competition.
|
||||
|
||||
## [Do you operate OpenStack? Take this survey.][9]
|
||||
|
||||
> Direct feedback from the individuals and organizations operating OpenStack helps the upstream development community know what features to prioritize and which bugs to fix first, among other important learnings on how the software is being used. Each of the official project teams has the opportunity to add a question to the survey as well as review anonymized data and trends to further influence their roadmaps.
|
||||
|
||||
**The impact**: Not every community participant can or will provide feedback on bug reports or feature requests. In that case, it is important to provide multiple ways to get feedback and meet users where they are.
|
||||
|
||||
_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/3/npm-github-operators-kubernetes-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://github.blog/2020-03-16-npm-is-joining-github/
|
||||
[3]: https://securitylab.github.com
|
||||
[4]: https://help.github.com/en/github/managing-security-vulnerabilities/creating-a-security-advisory
|
||||
[5]: https://github.com/sponsors
|
||||
[6]: https://devops.com/day-2-for-the-operator-ecosystem/
|
||||
[7]: https://www.infosecurity-magazine.com/opinions/automation-governance-culture/
|
||||
[8]: https://medium.com/@kgamanji/interoperability-of-open-source-tools-the-emergence-of-interfaces-f3b7a90891e4
|
||||
[9]: https://superuser.openstack.org/articles/operate-openstack-take-the-survey-heres-why-it-matters/
|
@ -1,93 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (IEEE Standards Association Launches an Open Source Collaboration Platform)
|
||||
[#]: via: (https://itsfoss.com/ieee-open-source-collaboration-platform/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
IEEE Standards Association Launches an Open Source Collaboration Platform
|
||||
======
|
||||
|
||||
_**Brief: IEEE Standards Association has announced a GitLab-based open source collaboration platform. Read how is it different and what advantages it has.**_
|
||||
|
||||
[IEEE][1] is the world’s largest technical professional organization dedicated to advancing technology. The IEEE Standards Association (IEEE SA) is an organization within IEEE that develops global standards in a broad range of industries.
|
||||
|
||||
The IEEE Standards Association (SA) has come up with an open-source collaboration platform i.e [IEEE SA Open][2].
|
||||
|
||||
It is technically a self-hosted GitLab instance combined with [Mattermost][3] (a [slack alternative][4]) and [GitLab Pages][5]. To describe it further, the [official blog post][6] mentioned:
|
||||
|
||||
> The platform enables independent software developers, startups, industry, academic institutions, and others to create, test, manage, and deploy innovative projects in a collaborative, safe, and responsible environment.
|
||||
|
||||
### How is it different or useful?
|
||||
|
||||
The main key attraction for this platform would be IEEE’s members’ network, technical expertise, and resources.
|
||||
|
||||
IEEE President, [Robert Fish][7], also mentions in brief (during an interview with Radio Kan) how it’s different and why IEEE wanted to go with it:
|
||||
|
||||
> Today, much of the world’s infrastructure is run by software, and that software needs to comply with standards in communications networking, electrical grids, agriculture, and the like.
|
||||
|
||||
It makes sense – if we want to improve standardizing technologies, it highly depends on the software. So, this definitely sounds like something to standardize innovative open-source projects to gear them up for potential capital opportunities as well.
|
||||
|
||||
IEEE also clarified that:
|
||||
|
||||
> As software becomes increasingly prevalent in the world today, ethical alignment, reliability, transparency, and democratic governance become must-haves. IEEE is uniquely positioned to endow open-source projects with these attributes.
|
||||
|
||||
While this sounds good, what exactly the open-source platform by the IEEE offer? Let’s take a look at that:
|
||||
|
||||
### IEEE SA Open: Quick overview
|
||||
|
||||
![][8]
|
||||
|
||||
To start with, it is open to all and completely free to use. You just need to create an [IEEE account][9] and then [sign in to the open-source platform][10] to get started.
|
||||
|
||||
Along with the benefits associated with IEEE’s extensive network of Members, you can also expect guidance support from their open-source community managers or community members.
|
||||
|
||||
![Ieee Gitlab][11]
|
||||
|
||||
The platform presents use cases for both standard and non-standard projects, so you can give it a try.
|
||||
|
||||
For its choice to go with GitLab combined with Mattermost and Pages, you get a couple of useful features, they are:
|
||||
|
||||
* Project planning and management features
|
||||
* Source code management
|
||||
* Testing, code quality, and continuous integration features
|
||||
* Docker container registry and Kubernetes integration
|
||||
* Application release and delivery features
|
||||
* Integrated Mattermost chat forum w/slash commands; (Android and iPhone apps are fully supported)
|
||||
* Capable of bridging the gap between Standards development and open source communities to allow for the advancement of nimble and creative technical solutions at a faster pace
|
||||
* A safe open space with an enforced code of conduct
|
||||
|
||||
|
||||
|
||||
### Wrapping Up
|
||||
|
||||
It’s obviously a good thing to have more platforms to potentially amplify the exposure of open-source projects – hence, IEEE’s initiative sounds promising to start with.
|
||||
|
||||
What do you think about it? Let me know your thoughts!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/ieee-open-source-collaboration-platform/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.ieee.org/about/index.html
|
||||
[2]: https://standards.ieee.org/content/ieee-standards/en/initiatives/opensource/
|
||||
[3]: https://mattermost.com/
|
||||
[4]: https://itsfoss.com/open-source-slack-alternative/
|
||||
[5]: https://docs.gitlab.com/ee/user/project/pages/
|
||||
[6]: https://spectrum.ieee.org/the-institute/ieee-products-services/ieee-standards-association-launches-a-platform-for-open-source-collaboration
|
||||
[7]: https://www.linkedin.com/in/robertsfish/
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/ieee-opensource.jpg?ssl=1
|
||||
[9]: https://www.ieee.org/profile/public/createwebaccount/showRegister.html
|
||||
[10]: https://opensource.ieee.org/
|
||||
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/ieee-gitlab.jpg?ssl=1
|
@ -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
|
@ -0,0 +1,53 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (State of software engineering, JavaScript is the future, and more industry trends)
|
||||
[#]: via: (https://opensource.com/article/20/4/state-software-engineering-javascript-and-more-industry-trends)
|
||||
[#]: author: (Tim Hildred https://opensource.com/users/thildred)
|
||||
|
||||
State of software engineering, JavaScript is the future, 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.
|
||||
|
||||
## [State of Software Engineering in 2020][2]
|
||||
|
||||
> Software is moving fast, and it is fusing into all other areas of industry. As it is a growing field, learning to program and improving your skills in software engineering can have get you great returns in the future. Moreover, identifying the fastest growing areas of software and investing your time into them can get you to even better places. Keep learning and try to find opportunities that you can capitalize on or products that can serve a niche in a growing field of software. When that niche becomes mainstream, you can end up with a successful product in your hands, which can become your future success. If it fails, it will be an immense experience on the path to becoming a product person.
|
||||
|
||||
**The impact**: Learn COBOL, see the world!
|
||||
|
||||
## [Why JavaScript is the programming language of the future][3]
|
||||
|
||||
> JavaScript has one of the most mature – if not THE most mature – ecosystems a programming language could ever have. The community for JavaScript is vast, and the entry barrier is extremely low.
|
||||
|
||||
**The impact**: The only knowledge I have of the veracity of this statement comes from the JavaScript people I follow on Twitter. If you can indeed extrapolate from them, then JavaScript has a pretty good shot.
|
||||
|
||||
## [Why Linux containers are a CIO's best friend][4]
|
||||
|
||||
> "A big take-away for CIOs is that fit enterprises increasingly view IT as a point of leverage for the business. Having a clear and consistent overall business strategy ranks as one of the most distinctive traits of fit enterprises," said Gartner VP and Distinguished Analyst Andy Roswell-Jones, in Gartner's report on the survey. "In such organizations, digital technology will drive that strategy."
|
||||
|
||||
**The impact**: Point of leverage meaning that if the IT an organization is selected in reference to and in support of that organization's overall strategy there will be an outsized lift on execution against that strategy. The corollary is that without a clear and consistent business strategy no technology can save your enterprise.
|
||||
|
||||
_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/state-software-engineering-javascript-and-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://quanticdev.com/articles/software-engineering-in-2020/
|
||||
[3]: https://www.freecodecamp.org/news/future-of-javascript/
|
||||
[4]: https://www.ciodive.com/news/linux-containers-kubernetes/575506/
|
@ -0,0 +1,78 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (The rebirth of Mapzen, new projects bolster PyTorch, faster AI object detection, and other open source news)
|
||||
[#]: via: (https://opensource.com/article/20/4/news-march-25)
|
||||
[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt)
|
||||
|
||||
The rebirth of Mapzen, new projects bolster PyTorch, faster AI object detection, and other 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 the rebirth of Mapzen, two new projects to bolster PyTorch, new open source object detection software, and more!
|
||||
|
||||
### Mapzen makes a comeback
|
||||
|
||||
While its technology is used by open source projects like OpenStreetMap and by firms like Foursquare, open source mapping company Mapzen couldn't sustain itself as a business. Mapzen initially closed its doors in 2018, but it has [a new lease on life][2] with the support of the Linux Foundation.
|
||||
|
||||
As a project under the Urban Computing Foundation (UCF), Mapzen "encompasses six independent projects and communities involved in developing a truly open platform for mapping, search, navigation and transit data." Being under the UCF's umbrella enables Mapzen's developers to "collaborate on and build a common set of open-source tools connecting cities, autonomous vehicles, and smart infrastructure." They can also tap such UCF members as Google, IBM, and the University of California San Diego for support. Mapzen projects are available under their [GitHub organization][3].
|
||||
|
||||
### New open source projects to bolster PyTorch
|
||||
|
||||
PyTorch, the open source machine learning framework originating out of Facebook, has been getting a lot of love lately from both its creator and from AWS. The two firms have [released open source projects to bolster PyTorch][4].
|
||||
|
||||
Facebook is sharing TorchServe, "a model-serving framework for PyTorch that will make it easier for developers to put their models into production." AWS's contribution is TorchElastic, "a library that makes it easier for developers to build fault-tolerant training jobs on Kubernetes clusters." PyTorch's product manager Joe Spisak [told VentureBeat][5] that by using the two projects developers can run "training over a number of nodes without the training job actually failing; it will just continue gracefully, and once those nodes come back online, it can basically restart the training."
|
||||
|
||||
You can find the code for [TorchServe][6] and [TorchElastic][7] on GitHub.
|
||||
|
||||
### Microsoft and Huazhong University release object detection AI
|
||||
|
||||
One of the more difficult tasks facing artificial intelligence systems is to accurately detect and identify objects in photos and videos. Researchers from Microsoft and China's Huazhong University have [released an open source tool][8] that does the job quickly and efficiently.
|
||||
|
||||
Called Fair Multi-Object Tracking (FairMOT for short), the tool "outperforms state-of-the-art models on public data sets at 30 frames per second" (almost normal video speed). It took researches about 30 hours to train the software using data from the MOT Challenge, which is "a framework for validating people-tracking algorithms." The team behind FairMOT believe that the tool can be used in "industries ranging from elder care to security, and perhaps be used to track the spread of illnesses like COVID-19."
|
||||
|
||||
You can view the source code and training models for FairMOT in [this GitHub repository][9].
|
||||
|
||||
#### In other news
|
||||
|
||||
* [Will a small open-source effort from Japan disrupt the autonomous space?][10]
|
||||
* [Google open-sources data set to train and benchmark AI sound separation models][11]
|
||||
* [Docker builds open source community around Compose Specification][12]
|
||||
* [Sophos Sandboxie is now available as an open-source tool][13]
|
||||
* [PyCon has moved to an online-only event and is available now][14]
|
||||
|
||||
|
||||
|
||||
Thanks, as always, to Opensource.com staff members and [Correspondents][15] for their help this week.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/4/news-march-25
|
||||
|
||||
作者:[Scott Nesbitt][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/scottnesbitt
|
||||
[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.zdnet.com/article/mapzen-open-source-mapping-project-revived-under-the-urban-computing-foundation/
|
||||
[3]: https://github.com/mapzen/
|
||||
[4]: https://techcrunch.com/2020/04/21/aws-and-facebook-launch-an-open-source-model-server-for-pytorch/
|
||||
[5]: https://venturebeat.com/2020/04/21/facebook-partners-with-aws-on-pytorch-1-5-upgrades-like-torchserve-for-model-serving/
|
||||
[6]: https://github.com/pytorch/serve
|
||||
[7]: https://github.com/pytorch/elastic
|
||||
[8]: https://venturebeat.com/2020/04/08/researchers-open-source-state-of-the-art-object-tracking-ai/
|
||||
[9]: https://github.com/ifzhang/FairMOT
|
||||
[10]: https://www.forbes.com/sites/rahulrazdan/2020/04/04/will-a-small-open-source-effort-from-japan-disrupt-the--autonomous-space-/#6e6819f01cc5
|
||||
[11]: https://venturebeat.com/2020/04/09/google-open-sources-data-set-to-train-and-benchmark-ai-sound-separation-models/
|
||||
[12]: https://sdtimes.com/softwaredev/docker-builds-open-source-community-around-compose-specification/
|
||||
[13]: https://securityaffairs.co/wordpress/101397/malware/sandboxie-sandbox-open-source.html
|
||||
[14]: https://us.pycon.org/2020/online/
|
||||
[15]: https://opensource.com/correspondent-program
|
@ -0,0 +1,71 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Java security, mainframes having a moment, and more industry trends)
|
||||
[#]: via: (https://opensource.com/article/20/4/java-mainframes-dev-skills-more-industry-trends)
|
||||
[#]: author: (Tim Hildred https://opensource.com/users/thildred)
|
||||
|
||||
Java security, mainframes having a moment, 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.
|
||||
|
||||
## [How secure is Java compared to other languages?][2]
|
||||
|
||||
> In this article, we'll look at how the most commonly used programming languages rank in terms of security. I'll explain some factors that make one language less secure than another, and why identified vulnerabilities have increased so much in the past few years. Finally, I'll suggest a few ways Java developers can reduce vulnerabilities in code.
|
||||
|
||||
**The impact**: If software is eating the world, then hackers are... I guess the thrush thriving in the gullet? Hyperbole aside, the more stuff made of software, the more incentive clever people have to try and figure out how to do things they probably shouldn't be able to. This applies to Java too.
|
||||
|
||||
## [Mainframes are having a moment][3]
|
||||
|
||||
> In addition to being abundant, mainframe jobs pay well, and so far, appear not to be as affected by the pandemic as other areas of tech employment. Salaries for entry-level enterprise computing jobs [average US $70,100 a year][4] [PDF], according to a 2019 report from tech analyst [Forrester Research][5] commissioned by IBM. As recently as this week, jobs boards such as [Indeed][6] and [Dice.com][7] listed hundreds or in some cases thousands of openings for mainframe positions at all levels. Advertised pay ranges from $30 to $35 an hour for a junior mainframe developer to well over $150,000 a year for a mainframe database administration manager.
|
||||
|
||||
**The impact**: That is much, much better than a poke in the eye.
|
||||
|
||||
## [The developer skills on the rise, and in decline][8]
|
||||
|
||||
> Indeed.com analysed job postings using a list of 500 key technology skill terms to see which ones employers are looking for more these days and which are falling out of favour. Such research has helped identify cutting-edge skills over the past five years, with some previous years’ risers now well establish, thanks to explosive growth.
|
||||
|
||||
**The impact**: The "on the rise" skills outnumber the "in decline" skills. Bad news for browser developers...
|
||||
|
||||
## [The IT Pro Podcast: Building cloud-native apps][9]
|
||||
|
||||
> The cloud is eating enterprise IT, and while on-premise applications are going to be around for a long time to come, the importance of being able to successfully take advantage of cloud technologies should not be understated. However, it’s one thing to simply port an existing application to the cloud, but developing software to be run in cloud environments is a different matter altogether.
|
||||
|
||||
**The impact**: What is technology if not manifested mindset?
|
||||
|
||||
## [Communication is key to culture change][10]
|
||||
|
||||
> The outcome is staggering. Business teams feel invested in the development of the solution, they feel a sense of excitement and ownership. So much so, they go out into the corridors of the organisation to evangelise and promote the solution. Conversely, this improves the status of the developers within the business. It allows them to integrate with other stakeholders, contribute to new processes and help to achieve common goals.
|
||||
|
||||
**The impact**: As a communications person, I couldn't agree more. Communication is the difference between an organization and a movement.
|
||||
|
||||
_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/java-mainframes-dev-skills-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.javaworld.com/article/3537561/how-secure-is-java-compared-to-other-languages.html
|
||||
[3]: https://spectrum.ieee.org/tech-talk/computing/software/mainframes-programming-language-cobol-news-coronavirus
|
||||
[4]: https://www.ibm.com/downloads/cas/1EPYAP5D
|
||||
[5]: https://go.forrester.com/
|
||||
[6]: https://www.indeed.com/q-Mainframe-jobs.html
|
||||
[7]: https://www.dice.com/jobs/q-Mainframe-jobs
|
||||
[8]: https://www.techcentral.ie/10-developer-skills-on-the-rise-and-five-on-the-decline/
|
||||
[9]: https://www.itpro.co.uk/cloud/355348/the-it-pro-podcast-building-cloud-native-apps
|
||||
[10]: https://www.verdict.co.uk/culture-service-digital-enterprise/
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (chuan-325)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -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&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 don’t 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
|
@ -1,104 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (messon007)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (The ins and outs of high-performance computing as a service)
|
||||
[#]: via: (https://www.networkworld.com/article/3534725/the-ins-and-outs-of-high-performance-computing-as-a-service.html)
|
||||
[#]: author: (Josh Fruhlinger https://www.networkworld.com/author/Josh-Fruhlinger/)
|
||||
|
||||
The ins and outs of high-performance computing as a service
|
||||
======
|
||||
HPC services can be a way to meet expanding supercomputing needs, but depending on the use case, they’re not necessarily better than on-premises supercomputers.
|
||||
Dell EMC
|
||||
|
||||
Electronics on missiles and military helicopters need to survive extreme conditions. Before any of that physical hardware can be deployed, defense contractor McCormick Stevenson Corp. simulates the real-world conditions it will endure, relying on finite element analysis software like Ansys, which requires significant computing power.
|
||||
|
||||
Then one day a few years ago, it unexpectedly ran up against its computing limits.
|
||||
|
||||
[10 of the world's fastest supercomputers][1]
|
||||
|
||||
"We had some jobs that would have overwhelmed the computers that we had in office," says Mike Krawczyk, principal engineer at McCormick Stevenson. "It did not make economic or schedule sense to buy a machine and install software." Instead, the company contracted with Rescale, which could sell them cycles on a supercomputer-class system for a tiny fraction of what they would've spent on new hardware.
|
||||
|
||||
McCormick Stevenson had become an early adopter in a market known as supercomputing as a service or high-performance computing (HPC) as a service – two terms that are closely related. HPC is the application of supercomputers to computationally complex problems, while supercomputers are those computers at the cutting edge of processing capacity, according to the National Institute for Computational Sciences.
|
||||
|
||||
Whatever it's called, these services are upending the traditional supercomputing market and bringing HPC power to customers who could never afford it before. But it's no panacea, and it's definitely not plug-and-play – at least not yet.
|
||||
|
||||
### HPC services in practice
|
||||
|
||||
From the end user's perspective, HPC as a service resembles the batch-processing model that dates back to the early mainframe era. "We create an Ansys batch file and send that up, and after it runs, we pull down the result files and import them locally here," Krawczyk says.
|
||||
|
||||
Behind the scenes, cloud providers are running the supercomputing infrastructure in their own data centers – though that doesn't necessarily imply the sort of cutting-edge hardware you might be visualizing when you hear "supercomputer." As Dave Turek, Vice President of Technical Computing at IBM OpenPOWER, explains it, HPC services at their core are "a collection of servers that are strung together with an interconnect. You have the ability to invoke this virtual computing infrastructure that allows you to bring a lot of different servers to work together in a parallel construct to solve the problem when you present it."
|
||||
|
||||
[][2]
|
||||
|
||||
Sounds simple in theory. But making it viable in practice required some chipping away at technical problems, according to Theo Lynn, Professor of Digital Business at Dublin City University. What differentiates ordinary computing from HPC is those interconnects – high-speed, low-latency, and expensive – so those needed to be brought to the world of cloud infrastructure. Storage performance and data transport also needed to be brought up to a level at least in the same ballpark as on-prem HPC before HPC services could be viable.
|
||||
|
||||
But Lynn says that some of the innovations that have helped HPC services take off have been more institutional than technological. In particular, "we are now seeing more and more traditional HPC applications adopting cloud-friendly licensing models – a barrier to adoption in the past."
|
||||
|
||||
And the economics have also shifted the potential customer base, he says. "Cloud service providers have opened up the market more by targeting low-end HPC buyers who couldn’t afford the capex associated with traditional HPC and opening up the market to new users. As the markets open up, the hyperscale economic model becomes more and more feasible, costs start coming down."
|
||||
|
||||
Avoid on-premises CAPEX**
|
||||
**
|
||||
|
||||
HPC services are attractive to private-sector customers in the same fields where traditional supercomputing has long held sway. These include sectors that rely heavily on complex mathematical modeling, including defense contractors like McCormick Stevenson, along with oil and gas companies, financial services firms, and biotech companies. Dublin City University's Lynn adds that loosely coupled workloads are a particularly good use case, which meant that many early adopters used it for 3D image rendering and related applications.
|
||||
|
||||
But when does it make sense to consider HPC services over on-premises HPC? For hhpberlin, a German company that simulates smoke propagation in and fire damage to structural components of buildings, the move came as it outgrew its current resources.
|
||||
|
||||
"For several years, we had run our own small cluster with up to 80 processor cores," says Susanne Kilian, hhpberlin's scientific head of numerical simulation. "With the rise in application complexity, however, this constellation has increasingly proven to be inadequate; the available capacity was not always sufficient to handle projects promptly."
|
||||
|
||||
But just spending money on a new cluster wasn't an ideal solution, she says: "In view of the size and administrative environment of our company, the necessity of constant maintenance of this cluster (regular software and hardware upgrades) turned out to be impractical. Plus, the number of required simulation projects is subject to significant fluctuations, such that the utilization of the cluster was not really predictable. Typically, phases with very intensive use alternate with phases with little to no use." By moving to an HPC service model, hhpberlin shed that excess capacity and the need to pay up front for upgrades.
|
||||
|
||||
IBM's Turek explains the calculus that different companies go through while assessing their needs. For a biosciences startup with 30 people, "you need computing, but you really can't afford to have 15% of your staff dedicated to it. It's just like you might also say you don't want to have on-staff legal representation, so you'll get that as a service as well." For a bigger company, though, it comes down to weighing the operational expense of an HPC service against the capacity expense of buying an in-house supercomputer or HPC cluster.
|
||||
|
||||
So far, those are the same sorts of arguments you'd have over adopting any cloud service. But the opex vs. capex dilemma can be weighted towards the former by some of the specifics of the HPC market. Supercomputers aren't commodity hardware like storage or x86 servers; they're very expensive, and technological advances can swiftly render them obsolete. As McCormick Stevenson's Krawczyk puts it, "It's like buying a car: as soon as you drive off the lot it starts to depreciate." And for many companies –especially larger and less nimble ones – the process of buying a supercomputer can get hopelessly bogged down. "You're caught up in planning issues, building issues, construction issues, training issues, and then you have to execute an RFP," says IBM's Turek. "You have to work through the CIO. You have to work with your internal customers to make sure there's continuity of service. It's a very, very complex process and not something that a lot of institutions are really excellent at executing."
|
||||
|
||||
Once you choose to go down the services route for HPC, you'll find you get many of the advantages you expect from cloud services, particularly the ability to pay only for HPC power when you need it, which results in an efficient use of resources. Chirag Dekate, Senior Director and Analyst at Gartner, says bursty workloads, when you have short-term needs for high-performance computing, are a key use case driving adoption of HPC services.
|
||||
|
||||
"In the manufacturing industry, you tend to have a high peak of HPC activity around the product design stage," he says. "But once the product is designed, HPC resources are less utilized during the rest of the product-development cycle." In contrast, he says, "when you have large, long-running jobs, the economics of the cloud wear down."
|
||||
|
||||
With clever system design, you can integrate those HPC-services bursts of activity with your own in-house conventional computing. Teresa Tung, managing director in Accenture Labs, gives an example: "Accessing HPC via APIs makes it seamless to mix with traditional computing. A traditional AI pipeline might have its training done on a high-end supercomputer at the stage when the model is being developed, but then the resulting trained model that runs predictions over and over would be deployed on other services in the cloud or even devices at the edge."
|
||||
|
||||
### It's not for all use cases**
|
||||
|
||||
**
|
||||
|
||||
Use of HPC services lends itself to batch-processing and loosely-coupled use cases. That ties into a common HPC downside: data transfer issues. High-performance computing by its very nature often involves huge data sets, and sending all that information over the internet to a cloud service provider is no simple thing. "We have clients I talk to in the biotech industry who spend $10 million a month on just the data charges," says IBM's Turek.
|
||||
|
||||
And money isn't the only potential problem. Building a workflow that makes use of your data can challenge you to work around the long times required for data transfer. "When we had our own HPC cluster, local access to the simulation results already produced – and thus an interactive interim evaluation — was of course possible at any time," says hhpberlin's Kilian. "We're currently working on being able to access and evaluate the data produced in the cloud even more efficiently and interactively at any desired time of the simulation without the need to download large amounts of simulation data."
|
||||
|
||||
Mike Krawczyk cites another stumbling block: compliance issues. Any service a defense contractor uses needs to be complaint with the International Traffic in Arms Regulations (ITAR), and McCormick Stevenson went with Rescale in part because it was the only vendor they found that checked that box. While more do today, any company looking to use cloud services should be aware of the legal and data-protection issues involved in living on someone else's infrastructure, and the sensitive nature of many of HPC's use cases makes this doubly true for HPC as a service.
|
||||
|
||||
In addition, the IT governance that HPC services require goes beyond regulatory needs. For instance, you'll need to keep track of whether your software licenses permit cloud use – especially with specialized software packages written to run on an on-premises HPC cluster. And in general, you need to keep track of how you use HPC services, which can be a tempting resource, especially if you've transitioned from in-house systems where staff was used to having idle HPC capabilities available. For instance, Ron Gilpin, senior director and Azure Platform Services global lead at Avanade, suggests dialing back how many processing cores you use for tasks that aren't time sensitive. "If a job only needs to be completed in an hour instead of ten minutes," he says, "that might use 165 processors instead of 1,000, a savings of thousands of dollars."
|
||||
|
||||
### A premium on HPC skills**
|
||||
|
||||
**
|
||||
|
||||
One of the biggest barriers to HPC adoption has always been the unique in-house skills it requires, and HPC services don't magically make that barrier vanish. "Many CIOs have migrated a lot of their workloads into the cloud and they have seen cost savings and increased agility and efficiency, and believe that they can achieve similar results in HPC ecosystems," says Gartner's Dekate. "And a common misperception is that they can somehow optimize human resource cost by essentially moving away from system admins and hiring new cloud experts who can solve their HPC workloads."
|
||||
|
||||
"But HPC is not one of the main enterprise environments," he says. "You're dealing with high-end compute nodes interconnected with high-bandwidth, low-latency networking stacks, along with incredibly complicated application and middleware stacks. Even the filesystem layers in many cases are unique to HPC environments. Not having the right skills can be destabilizing."
|
||||
|
||||
But supercomputing skills are in shortening supply, something Dekate refers to as the workforce "greying," in the wake of a generation of developers going to splashy startups rather than academia or the more staid firms where HPC is in use. As a result, vendors of HPC services are doing what they can to bridge the gap. IBM's Turek says that many HPC vets will always want to roll their own exquisitely fine-tuned code and will need specialized debuggers and other tools to help them do that for the cloud. But even HPC newbies can make calls to code libraries built by vendors to exploit supercomputing's parallel processing. And third-party software providers sell turnkey software packages that abstract away much of HPC's complication.
|
||||
|
||||
Accenture's Tung says the sector needs to lean further into this in order to truly prosper. "HPCaaS has created dramatically impactful new capability, but what needs to happen is making this easy to apply for the data scientist, the enterprise architect, or the software developer," she says. "This includes easy to use APIs, documentation, and sample code. It includes user support to answer questions. It’s not enough to provide an API; that API needs to be fit-for-purpose. For a data scientist this should likely be in Python and easily change out for the frameworks she is already using. The value comes from enabling these users who ultimately will have their jobs improved through new efficiencies and performance, if only they can access the new capabilities." If vendors can pull that off, HPC services might truly bring supercomputing to the masses.
|
||||
|
||||
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/3534725/the-ins-and-outs-of-high-performance-computing-as-a-service.html
|
||||
|
||||
作者:[Josh Fruhlinger][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/Josh-Fruhlinger/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.networkworld.com/article/3236875/embargo-10-of-the-worlds-fastest-supercomputers.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
|
@ -1,74 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (15 years of Git: How to get started or learn something new)
|
||||
[#]: via: (https://opensource.com/article/20/4/get-started-git)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
15 years of Git: How to get started or learn something new
|
||||
======
|
||||
On Git's 15th anniversary, learn why it is a major component in keeping
|
||||
the software industry running.
|
||||
![Scissors cutting open access to files][1]
|
||||
|
||||
If there's anything that's changed software in the past two decades, [Git][2] is at the top of the list.
|
||||
|
||||
If you don't use Git personally, you might think it's just a tech fad, an incidental darling among developers just because it was created by the same person who started the [Linux][3] project itself. There may be some truth to that, but Git does manage to achieve some feats that no other industry has managed. With Git, developers spread all over the world are able to work on the same code, literally at the same time, with a history of every change made, and then merge all the work together to result in a finished product. The complexity is enormous, and so the tool itself can get complex, but in the end, it's a major component in keeping the software industry running.
|
||||
|
||||
Whether you know Git or not, you'll very likely encounter it should you dig deep enough into open source software or enter into computer science. Whether you use Git to just download an installer package or whether you interface with it daily to manage code, learning more about it is elucidating and empowering.
|
||||
|
||||
### Git terminology
|
||||
|
||||
As with any specialized tool, there's a lot of jargon in Git. Terms like "clone" and "merge" and "rebase" are mysterious at best, and at worst can feel almost exclusionary. Trying to understand what all of these terms mean can be overwhelming, but not if you take a little guidance from Matthew Broberg's excellent [Git Terminology 101][4] article. In just one quick read, you'll be able to listen in on conversations about Git with real comprehension.
|
||||
|
||||
### Getting started with Git
|
||||
|
||||
If you need to know how to use Git, then my own [introductory article series about using Git][5] is a great place to start. The articles are several years old now, but as with so many Linux and UNIX technologies, the interface hasn't changed significantly, so the articles are as relevant today as they were when I wrote them. The series introduces you to the most basic concepts of Git, and steps you through the process of creating a repository, committing files, restoring files, merging branches, and much more.
|
||||
|
||||
### Common Git services
|
||||
|
||||
One of the most common uses of Git is a public Git hosting service, such as GitLab and GitHub. In his [How to clone, modify, add, and delete files in Git][6] article, Kedar Vijay Kulkarni demonstrates the everyday tasks most developers perform with Git. This isn't required reading for non-developers, but it's a must for anyone who wants to contribute to a project on a public Git hosting service. This article addresses Github specifically because it's one of the most common platforms today, but the principles apply to any web front-end for Git, including popular open source frameworks like [GitLab][7], [Gogs][8], and [Gitea][9].
|
||||
|
||||
### Try this Git walkthrough
|
||||
|
||||
Do you prefer a guided tour to aimless exploration? Sometimes the easiest way to learn something is to mimic someone else's exact steps. You know the end result is a guaranteed success, so you have confidence while performing the exercise, and your brain and fingers get the benefit of repetition, which builds memory. If that's your learning style, then follow along with Alan Formy-Duvall's [practical learning exercise for Git][10] and find out what a successful Git session feels like.
|
||||
|
||||
### Git apps
|
||||
|
||||
Believe it or not, Git has more interfaces than text you type into a terminal. Obviously there are the web interfaces of Git hosts online, but you can use Git clients on your computer, too. For just a light layer of assistance, read Jesse Duffield's article about [Lazygit][11] or Olaf Anders' article about [Tig][12]. For the full graphical application experience, read my article about [Git-cola][13], [Sparkleshare][14], and [still others][15]. And yes, there are even [interfaces for your mobile devices][16]!
|
||||
|
||||
### Learn more about Git
|
||||
|
||||
Knowledge is power, so don't let Git be a mystery to you. Whether you use it directly or you only know it by name or you'd never heard of it before, now's a great time to learn about Git. There are great resources out there to help you understand how it works, why it works, and why people love it so much. Dive in, take it at your own pace, and learn to love Git!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/4/get-started-git
|
||||
|
||||
作者:[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/document_free_access_cut_security.png?itok=ocvCv8G2 (Scissors cutting open access to files)
|
||||
[2]: https://en.wikipedia.org/wiki/Git
|
||||
[3]: https://opensource.com/resources/linux
|
||||
[4]: https://opensource.com/article/19/2/git-terminology
|
||||
[5]: https://opensource.com/life/16/7/stumbling-git
|
||||
[6]: https://opensource.com/article/18/2/how-clone-modify-add-delete-git-files
|
||||
[7]: https://about.gitlab.com/install/
|
||||
[8]: https://gogs.io/
|
||||
[9]: https://gitea.io/en-us/
|
||||
[10]: https://opensource.com/article/19/5/practical-learning-exercise-git
|
||||
[11]: https://opensource.com/article/20/3/lazygit
|
||||
[12]: https://opensource.com/article/19/6/what-tig
|
||||
[13]: https://opensource.com/article/20/3/git-cola
|
||||
[14]: https://opensource.com/article/19/4/file-sharing-git
|
||||
[15]: https://opensource.com/life/16/8/graphical-tools-git
|
||||
[16]: https://opensource.com/article/19/4/calendar-git#mobile
|
@ -0,0 +1,99 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (5 open source activities while you work from home)
|
||||
[#]: via: (https://opensource.com/article/20/4/open-source-activities)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
5 open source activities while you work from home
|
||||
======
|
||||
Work-life balance is important whether you're working from home
|
||||
temporarily or it's your usual mode of earning a living.
|
||||
![Person in a field of dandelions][1]
|
||||
|
||||
The mythos of the remote home office or the exciting archetype of the digital nomad are as appealing as they are dangerous. It's great to be able to avoid a commute, to be able to stay comfortable at home while getting lots of work done, and to be master of your own schedule. But along with those liberties, you inherit the responsibility of remembering to be a normal, functioning human being. Believe it or not, the two aren't mutually exclusive. You can do both, but you have to work at it. Here are some ideas on how.
|
||||
|
||||
### Plant something
|
||||
|
||||
![Seeeduino in the garden][2]
|
||||
|
||||
You may have an abundance of little ones to care for during the day, and if you do, you should read our [article][3] about fun open source projects for kids and parents. If you don't, or if you're just keen to try caring for something that's quiet, then you might find it satisfying to plant something.
|
||||
|
||||
I used to think gardening was something you did as a way to establish a routine: each morning, you wake up and tend to your plants before you start your day, each evening you might pull weeds, and so on. Now that I have a garden, I realize that it's more like a low-stress puzzle. Learning to tend to plants is a little like learning to program. You learn the basics first, you learn to debug (literally, in the case of aphids), and then you learn how to optimize growth and maybe even [how to automate plant care][4].
|
||||
|
||||
If you're not attracted to gardening, there are plenty of other [outdoor projects][5] that are useful in getting you outdoors with a purpose and encouraging you to go back out for more.
|
||||
|
||||
### Go for a walk
|
||||
|
||||
![Walking][6]
|
||||
|
||||
The phrases "go for a walk" or "get some fresh air" are so common that they seem trite, but that doesn't make the result any less valid. Getting outside your usual workspace is vital for clarity and drive, but sometimes going outside feels a little pointless. You can only walk around the block so many times before the journey loses excitement.
|
||||
|
||||
If you need a goal for ambling around your neighborhood, you can download a handy app called [StreetComplete][7]. It's a quest-based app that presents you with points of interest in your area with incomplete [Open Street Map][8] data. You can help crowdsource better open source maps by verifying and providing information through the app. Suddenly, that aimless meandering you don't really want to do is a fun quest for you and your family.
|
||||
|
||||
### Diversify
|
||||
|
||||
![Mini stapler][9]
|
||||
|
||||
Being in an office can present exciting challenges, whether it's because you're in a dynamic industry or in a petty fight with a colleague over ownership of a stapler. When you work from home, your daily routine can get pretty, well, routine. If that's the case, it might be time to diversify.
|
||||
|
||||
If you've been meaning to [get involved with open source][10], now's a great time for it.
|
||||
|
||||
If you suspect you might be artistic (or even if you're convinced you're not, but you have something you want to express), then maybe it's time to finally learn how to create some [digital imagery][11].
|
||||
|
||||
Or maybe you're curious about programming. It might be easier than you think and given enough free time, you might even end up with [your own game written in Python][12].
|
||||
|
||||
### Make some music
|
||||
|
||||
![Music keyboardas][13]
|
||||
|
||||
Artistic expression is important, whether you're working from home or living with someone who's bored at home. The great thing about music is that you don't need to be _musical_ to [make some really cool noise][14]. In fact, you can make some [wild sounds on a Raspberry Pi][15], if you have one lying around.
|
||||
|
||||
If you happen to be musical, though, you can have a go at a digital audio workstation like [Qtractor][16] or [Rosegarden][17]. For inspiration, read about a [professional composer][18] and the music festival he created.
|
||||
|
||||
### Refurbish
|
||||
|
||||
![Old computers][19]
|
||||
|
||||
I don't like it when good things go to waste, especially computers. Read about [refurbishing old computers][20] and [really old computers][21], and then rummage around in your attic to find one for your own experiments.
|
||||
|
||||
### Meet the challenge
|
||||
|
||||
Being stuck at home for long periods of time, whether it's for a few weeks or the better part of your career, can be challenging. However, open source is a vast landscape of opportunity. Explore and find the parts of it that appeal to you. You can build a hobby, and maybe even a career, out of all the fun things you can do with other people's toys.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/4/open-source-activities
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_dandelion_520x292.png?itok=-xhFQvUj (Person in a field of dandelions)
|
||||
[2]: https://opensource.com/sites/default/files/uploads/diversions_seeeduino.jpg (Seeeduino in the garden)
|
||||
[3]: https://opensource.com/article/19/12/kids-students-education
|
||||
[4]: https://opensource.com/article/17/3/arduino-garden-projects
|
||||
[5]: https://opensource.com/article/19/5/hardware-outdoors
|
||||
[6]: https://opensource.com/sites/default/files/uploads/diversions_walk.jpg (Walking)
|
||||
[7]: https://opensource.com/article/20/1/streetcomplete-crowdsource-maps
|
||||
[8]: https://opensource.com/article/17/8/openstreetmap
|
||||
[9]: https://opensource.com/sites/default/files/uploads/diversions_stapler.jpg (Mini stapler)
|
||||
[10]: https://opensource.com/article/17/10/open-source-cats
|
||||
[11]: https://opensource.com/life/12/6/design-without-debt-five-tools-for-designers
|
||||
[12]: https://opensource.com/article/17/10/python-101
|
||||
[13]: https://opensource.com/sites/default/files/uploads/diversions_keyboards.jpg (Music keyboards)
|
||||
[14]: https://opensource.com/life/16/2/linux-multimedia-studio
|
||||
[15]: https://opensource.com/article/20/3/sonic-pi
|
||||
[16]: https://opensource.com/article/17/6/qtractor-audio
|
||||
[17]: https://opensource.com/article/18/3/make-sweet-music-digital-audio-workstation-rosegarden
|
||||
[18]: https://opensource.com/article/20/2/linux-open-source-music
|
||||
[19]: https://opensource.com/sites/default/files/uploads/diversions_old-computers.jpg (Old computers)
|
||||
[20]: https://opensource.com/article/19/7/how-make-old-computer-useful-again
|
||||
[21]: https://opensource.com/article/20/2/restore-old-computer-linux
|
@ -0,0 +1,82 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How World of Warcraft introduced me to Linux)
|
||||
[#]: via: (https://opensource.com/article/20/4/wow-linux)
|
||||
[#]: author: (Luke Rawlins, RHCE https://opensource.com/users/sudoluke)
|
||||
|
||||
How World of Warcraft introduced me to Linux
|
||||
======
|
||||
One Linux sysadmin traces his journey from video-gaming car mechanic to
|
||||
a new career in IT.
|
||||
![Gaming with penguin pawns][1]
|
||||
|
||||
The story behind my career with [Linux][2] is a bit unusual. It starts back in 2005; I was working as an auto mechanic at a Nissan dealership in Toledo, Ohio. I had never used a computer for anything other than checking email, browsing the web, and playing World of Warcraft.
|
||||
|
||||
I had never heard of Linux, I didn't know the term "open source," I probably couldn't even have walked you through how to copy a file from one place to another, and I certainly never thought that I would eventually find myself working in IT or running a website.
|
||||
|
||||
### The "Blue Screen of Death" that changed my life
|
||||
|
||||
I mentioned that I liked to play World of Warcraft (I still do, you can find me on my Mage "Elodinn—Twisting Nether" most of the time). This game was a huge hit in the early 2000s, and it consumed an enormous amount of my time (truth be told, probably a little too much of my time).
|
||||
|
||||
You can imagine my horror one evening when I boot up my PC to be greeted by a blue screen with lots of cryptic messages, including "A problem has been detected…" Hmm weird, maybe I'll just unplug it and plug it back in—that works around the shop sometimes. No such luck, the same message comes up. Over and over, to no avail.
|
||||
|
||||
### How do you fix this?
|
||||
|
||||
So I called a friend and explained the problem. [Big blue screen][3]. Lots of little white letters. I'm going to miss the raid!
|
||||
|
||||
He wasn't sure but said something about drivers, or maybe a hardware problem. I ended up calling around to a few computer repair shops to see if they could fix it. They all said the same thing after I read the message on the screen, and explained the problem to them. "I really can't be sure over the phone, but it sounds like the motherboard is bad. It's going to be $95 for diagnostics and I should be able to get it back to you in about a week."
|
||||
|
||||
There was no way I was going to pay $95 for a diagnostic on an old crappy computer just to be told that either I needed a new one, or that the repair was going to be even more money on top of the diagnostic fee. So I thought to myself, if I can fix a car, then I can definitely fix this little computer. It was broken anyway; what was the worst that could happen? I end up breaking it more and need a new one? I was already in that situation.
|
||||
|
||||
So I spent the next couple of days at work doing some research on computer parts, in between cars. I found out that replacing the motherboard meant that I was probably going to need a new processor. I found a motherboard/processor combo on Newegg for a decent price that I was fairly confident would work on my computer. Great!
|
||||
|
||||
I ordered the parts, and a few days later, after printing out a few instructions, I had swapped out the motherboard and replaced it with my new hardware from Newegg. I was incredibly proud of my new found skills and naturally assumed that I was some kind of elite hacker. That is, until I started the computer up.
|
||||
|
||||
I don't know if you know this, but Windows XP didn't like it when you replaced a lot of parts in your computer. I didn't know it at the time either, but now I had spent probably $150 because I didn't want to pay $95 for a diagnostic, and my computer was still broken.
|
||||
|
||||
### The deep dark web has all the answers
|
||||
|
||||
The next day, once again, I'm using all my breaks to research what went wrong. Pretty quickly I realized that my problem was tied to the fact that I needed a new Windows license. I also realized that there was no way I was going to purchase the software. I'd get a new computer before I purchased a new Windows license. But I wasn't quite ready to give up yet.
|
||||
|
||||
One click leads to another, and I end up on a computer repair forum with someone complaining about a similar problem. All the replies are basically the same—buy a Windows license or buy a new PC—but one. Near the bottom of the forum, some unknown hero of the internet says, "You can always give Ubuntu a try." and leaves it at that.
|
||||
|
||||
"What's Ubuntu?" I said to myself, "and how on earth do you even pronounce that word?"
|
||||
|
||||
Anyway, after some more intensive searching, I found out that Ubuntu is a free operating system that is widely considered to be one of the most user-friendly Linux distributions (whatever that is) that you can get. What's more, I found a book that included an installation CD available at the Barnes and Noble bookstore that I passed on my way home from work. Why not give Ubuntu a try? After all, the computer was already broken, and the book was only $18.99.
|
||||
|
||||
### This story is already too long
|
||||
|
||||
I wish I still had that book. I think I sold it with a box full of old books at a garage sale when we moved a few years ago. I wanted to share my Linux story because it's different than many of the other stories I read about. I was not a college graduate at the time, I didn't learn to code as a child, and I am not an exceptionally intelligent person. I was, at best, an average student, a recently separated Marine, and I assumed that fixing computers couldn't be much different from fixing cars. At the end of the day, you're still just swapping out different parts, right? Different tools, different parts, same job—no problem.
|
||||
|
||||
Along the way I ran into a lot of problems, the first one was the discovery that after all that work, I still couldn't play World of Warcraft. Eventually, I discovered WineHQ and Open Office, and all the incredible things that have come out of the open-source world. That mysterious blue screen and my World of Warcraft obsession redirected the course of my entire working life, for the better. That's an odd thing to admit, but it's probably true.
|
||||
|
||||
### How does the story end?
|
||||
|
||||
Well, it's not over, and I still have a lot to learn. After some frustrating trial and error, I did eventually learn how to install World of Warcraft using Wine. I missed a few weeks in the game, but I didn't lose my raid spot in the guild, and all things considered, I was no worse for the wear. At the time, I was playing a Druid, and everyone always had room for a healer when it came time to battle Ragnaros, the Fire Lord!
|
||||
|
||||
Up to this point, however, my little computer repair project has turned into a wonderful career as a Linux systems administrator, a bachelor's degree, a whole bunch of IT certifications, including the Red Hat Certified Engineer certification, and a [blog][4] that I use as my way of giving back to the community that has given me so much.
|
||||
|
||||
So, if you are like me, a person who is at best moderately intelligent, persistent, incredibly cheap, and not afraid to break a few things, go ahead and try out Linux the next time your computer breaks.
|
||||
|
||||
I'm excited. I mean really excited. Excited to the point that I can hardly think. I'm talking six-...
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/4/wow-linux
|
||||
|
||||
作者:[Luke Rawlins, RHCE][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/sudoluke
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gaming_grid_penguin.png?itok=7Fv83mHR (Gaming with penguin pawns)
|
||||
[2]: https://opensource.com/resources/linux
|
||||
[3]: https://en.wikipedia.org/wiki/Blue_screen_of_death
|
||||
[4]: https://sudoedit.com
|
126
sources/talk/20200415 Fedora Origins - Part 01.md
Normal file
126
sources/talk/20200415 Fedora Origins - Part 01.md
Normal file
@ -0,0 +1,126 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Fedora Origins – Part 01)
|
||||
[#]: via: (https://fedoramagazine.org/fedora-origins-part-01/)
|
||||
[#]: author: (Sylvia Sánchez https://fedoramagazine.org/author/lailah/)
|
||||
|
||||
Fedora Origins – Part 01
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
_Editor’s comment:_ The format of this article is different from the usual article that Fedora Magazine has published: a Fedora origins story told from the point of view of a Fedora user. The author has chosen to tell a story, since to simply present the bare facts is akin to just reading the wiki page about it.
|
||||
|
||||
### Hello World!
|
||||
|
||||
Hello, I am… no, I’m not going to give my real name. Let’s say I’m female, probably shorter and older than you. I used to go by the nick of Isadora, more on that later.
|
||||
|
||||
![Here you have one of the old RH boxes][2]
|
||||
|
||||
Now some context. Back in the late ’90s, internet became popular and PCs started to be a thing. However, most people didn’t have either because it was very expensive and often you could do better with the traditional methods. Yes, computers were very basic back then. I used to play with these pocket games that were fascinating at the time, but totally lame now. Monochrome screens with pixelated flat animations. Not going to dive there, just giving an idea how it was.
|
||||
|
||||
In the mid-90s a company named Red Hat emerged and slowly started to make a profit of its own by selling its own business-oriented distribution and software utilities. The name comes from one of its founders, Marc Ewing, who used to wear a red lacrosse in university so other students could spot him easily and ask him questions.
|
||||
Of course, as it was a business-oriented distribution, and I was busy with multiple other things, I didn’t pay much attention to it. It lacked the software I needed and since I wasn’t a customer, I was nobody to ask for additions. However, it was Linux and as such Open Source. People started to package stuff for RHL and put it in repositories. I was invited to join the community project, Fedora.us. I promptly declined, misunderstanding the name. It was the second time I got invited that I asked ‘what is with the “US” there (in the name)?` Another user explained it was ‘us’ as in ‘we’ not as in the ‘United States.’ They explained a bit about how the community worked and I decided to give it a go.
|
||||
|
||||
Then my studies got in the way, and I had to shelve it.
|
||||
|
||||
![Login Screen in Fedora Core][3]
|
||||
|
||||
### Press Return
|
||||
|
||||
By the time I came back to Fedora.us it had changed its name to Fedora Project and was actively being worked on from within Red Hat. Now, I wasn’t there so my direct knowledge of how this happened is a bit foggy. Some say that Fedora existed separately and Red Hat added/invited them, some say that Fedora was completely RH’s idea, some say they existed independently and at some point met or joined. Choose the version you like, I’ll put some links down there so you can know more details and decide for yourself. As far as I’m concerned, they worked together.
|
||||
|
||||
Well, as usual someone dropped some CDs with ISOs for me. If I had an euro for every ISO I’ve been offered, or had tossed at my desk, for me to try it, I would be rich. As a matter of fact, I’m not rich but I do have a big rack full of old distros.
|
||||
|
||||
_Anyways_…
|
||||
|
||||
Now it’s the early 2000s and things have changed dramatically. Computers’ prices have dropped and internet speed is increasing, plus a set of new technologies make it cheaper and more reliable. Computers now can do so much more than just a decade ago, and they’re smaller too. Screens are bigger, with better colors and resolution. Laptops are starting to become popular though still expensive and less powerful than desktop PCs.
|
||||
|
||||
During this time, I tried both Fedora and Red Hat. Now, as has been said before, Red Hat focuses on businesses and companies. Their main concern is having exactly the software their customers need, with the features their customers need, delivered as rock solid stability and a reliable update & support cycle. A lot of customization, variety of options and many cool new features are not their main core. More software means more testing and development work and bigger chances of things failing. Yet the technology industry is constantly changing and innovating. Sticking too much to older versions or proven formulas can be fatal for a company.
|
||||
|
||||
So what to do? Well, they solved it with Fedora. Fedora Project would be the innovative, looking ahead test bed, and Red Hat Enterprise Linux was the more conservative, rock solid operating system for businesses. Yes, they changed the name from Red Hat Linux to Red Hat _Enterprise_ Linux. Sounds better, doesn’t it?
|
||||
|
||||
Unsurprisingly, Fedora had a fame of being difficult, unstable and for “hackers only”. Whenever I said I was using Fedora, they would give me odd looks or say something like “I want something stable” or “I’m not into _that_” (meaning they didn’t fancy programming/hacking activities). Countless individuals suggested I might want to use one of the other, beginner-friendly distributions, without themselves even giving Fedora a try! Many would disregard Linux as a whole as an amateur thing, only valid for playing but not good for serious work and companies. To each their own, I suppose.
|
||||
|
||||
![Note the F and the bubble already there][4]
|
||||
|
||||
### Yes, but why?
|
||||
|
||||
Those early versions were called Fedora Core and had a very uncertain release pattern. The six months cycle came much later. Fedora Core got its name because there were two repositories, Core and Extras. Core had the essentials, so to speak, and was maintained by Red Hat. Extras was, well, everything else. Any software that most users would want or need was included there, and it was maintained by a wide range of contributors.
|
||||
|
||||
From the beginning, one of the most powerful reasons for me to use it was the community and its core values. The _Four Foundations_ of Fedora, _Freedom, Features, First & Friends_ were lived and breathed and not just a catchy line on a website or a leaflet. Fedora Project strove (and still does) to deliver the newest features first, caring for freedom (of choice and software) and keeping a good open community, making friends as we contribute to the project.
|
||||
|
||||
I also liked the fact that Fedora, as its purpose was testing for Red Hat, delivered a lot of new software and technologies; it was like opening the window to see the future today.
|
||||
|
||||
The downside was its unreliable upgrade cycle. You could get a new version in a few months or next year… nobody knew, there was no agreed schedule.
|
||||
|
||||
![Note how, despite being Fedora, RH’s logo and signature is omnipresent][5]
|
||||
|
||||
### What was in the box
|
||||
|
||||
Fedora Core kept this name up to the sixth version. From the start, it was meant to be a distribution you could use right after installing it, so it came with Gnome 2, KDE 3, OpenOffice and some browser I forgot, possibly Firefox.
|
||||
|
||||
I remember it being the first to introduce SELinux and SystemD by default, and to replace LILO with GRUB. I also remember the hardware requirements were something at the time, although they now sound laughable: Pentium II 400MHz, 256MB RAM (yes, you read it right) and 2GB of space in disk. It even had an option for terminal only! This would require only 64MB RAM and Pentium II 200MHz. Amazing, isn’t it?
|
||||
|
||||
It had codenames. Not publicly, but it had, and they were quite peculiar. Fedora Core 1 was code named «Yarrow» which is a medium size plant with yellow or white crown-like flowers. Core 2 was Tettnang which is a small town in Baden-Württemberg, Germany. Not sure about Core 3, I think it was Heidelberg, but maybe I’m mixing with later releases. Core 4 was Stentz, if I recall correctly (no idea what it means), Core 5 was a colour, I think Bordeaux, and Core 6 was Zod that _I think_ it was a comic character but I could be wrong. If there was a method in their madness I have no idea. I thought the names amusing but didn’t give a second thought to it as they didn’t affect anything, not even the design of each release.
|
||||
|
||||
![Ah… good ol` genetic helix][6]
|
||||
|
||||
### So what now?
|
||||
|
||||
Well, of course, Fedora Project has evolved from where we have stopped. But that’s for later articles or this one will be too long. For now, I leave you with an extract of an interview with Matthew Miller, current Project Leader and some links in case you want to know more.
|
||||
|
||||
_**Extracts to interview with Matthew Miller, Project Leader.**_
|
||||
|
||||
Matthew Miller tells about the beginnings in Eduard Lucena’s podcast (transcription [here][7]): _“Fedora started about 15 years ago, really. It actually started as a thing called Fedora.us.” Back in those days, there was Red Hat Linux.” “Meanwhile, there was this thing called Fedora.us which was basically a project to make additional software available to users of Red Hat Linux. Find things that weren’t part of Red Hat Linux, and package them up, and make them available to everybody. That was started as a community project.”_
|
||||
|
||||
_“Red Hat_ (then) _merged with this [Fedora.us][8] project to form Fedora Project that produces an upstream operating system that Red Hat Enterprise Linux is derived from but then moves on a slower pace.”_
|
||||
|
||||
_“We were then two parts, Fedora Core, which was basically inherited from the old Red Hat Linux and only Red Hat employees could do anything with and then Fedora Extras, where community could come together to add things on top of that Fedora Core. It took a little while to get off the ground but it was fairly successful”_
|
||||
|
||||
“_Around the time of Fedora Core 6, those were actually merged together into one big Fedora where all of the packages were all part of the same thing. There was no more distinction of Core and Extras, and everything was all together and, more importantly, all the community was all together._
|
||||
|
||||
_They invited the community to take ownership of the whole thing and for Red Hat to become part of the community rather than separate. That was a huge success.”_
|
||||
|
||||
_**Links of interest**_
|
||||
|
||||
**Fedora, a visual history**
|
||||
[https://www.phoronix.com/scan.php?page=article&item=678&num=1][9]
|
||||
|
||||
**Red Hat Videos – Fedora’s anniversary**
|
||||
<https://youtu.be/DOFXBGh6DZ0>
|
||||
|
||||
**Red Hat Videos – Default to open**
|
||||
<https://youtu.be/vhYMRtqvMg8>
|
||||
|
||||
**Fedora’s Mission & Foundations**
|
||||
<https://docs.fedoraproject.org/en-US/project/>
|
||||
|
||||
**A short history of Fedora**
|
||||
<https://youtu.be/NlNlcLD2zRM>
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/fedora-origins-part-01/
|
||||
|
||||
作者:[Sylvia Sánchez][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/lailah/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2020/04/fedora-origins-816x352.png
|
||||
[2]: https://fedoramagazine.org/wp-content/uploads/2020/03/IMG_0554-768x1024.jpeg
|
||||
[3]: https://fedoramagazine.org/wp-content/uploads/2020/04/15112-1.png
|
||||
[4]: https://fedoramagazine.org/wp-content/uploads/2020/04/Fedora_Core_5.png
|
||||
[5]: https://fedoramagazine.org/wp-content/uploads/2020/04/Fedora_Core_3.png
|
||||
[6]: https://fedoramagazine.org/wp-content/uploads/2020/04/Artwork_FC7Themes_Fc7ThemeProposalFlyingHigh_Fc7ThemeProposalFlyingHighRhgl_rhgb-core6-1.png
|
||||
[7]: https://x3mboy.fedorapeople.org/podcast/transcripts/transcriptFedoraPodcastEpisode01.html
|
||||
[8]: http://fedora.us/
|
||||
[9]: https://www.phoronix.com/scan.php?page=article&item=678&num=1
|
@ -0,0 +1,102 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to dispose of IT hardware without hurting the environment)
|
||||
[#]: via: (https://www.networkworld.com/article/3537928/how-to-dispose-of-it-hardware-without-hurting-the-environment.html)
|
||||
[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/)
|
||||
|
||||
How to dispose of IT hardware without hurting the environment
|
||||
======
|
||||
Find certified recyclers and disposal firms in order to know that the retirement of your old electronics gear is handled safely.
|
||||
[Angelo Tsirekas][1] [(CC BY 3.0)][2]
|
||||
|
||||
Many enterprises don’t think much about where their obsolete IT gear winds up, but it’s possible to be green-minded, not bust the budget, and even benefit a little from proper disposal. Here is how.
|
||||
|
||||
### Go back to where you bought
|
||||
|
||||
The first option to consider is returning the equipment the vendor or reseller you bought it from, says Susan Middleton, research director, financing strategies at IDC. “Every year we ask customers, ‘How do you handle end-of-lease?’ Overwhelmingly, they return to vendor or partner who are better equipped to handle recycling,” she says.
|
||||
|
||||
[[Get regularly scheduled insights by signing up for Network World newsletters.]][3]
|
||||
|
||||
Vendors often give a fair-market buyout for the devices that can go toward new products, Middleton says. “The big players like IBM and HPE do a great job because they can clean them up and resell them, and the facilities to do that are pretty big,” she says.
|
||||
|
||||
### Vet disposal firms
|
||||
|
||||
If that’s not an option, and you have to find a disposal company – an IT Asset Disposition (ITAD) service – on your own, the first thing to check is whether it is properly certified, says Mike Satter, CEO of IT asset disposal and [data-center][4]-decommissioning provider OceanTech. Proper certification starts with a [Responsible Recycling (R2) certification][5].
|
||||
|
||||
R2s are administered by [Sustainable Electronics Recycling International][6] (SERI), a non-profit organization dedicated to the responsible reuse, repair, and recycling of electronic products. It sets the R2 standard and audits ITAD providers that carry the standard to make sure they are in compliance with the standard. Being responsible means creating a paper trail that shows the electronic waste – which contains heavy metals including arsenic, beryllium, cadmium, chromium, cobalt, indium, lead, mercury, nickel, and thallium, and are toxic in high enough doses – is reused, recovered or recycled.
|
||||
|
||||
Some disposal firms dump old gear in general landfills or export them to other countries where regulations aren’t as strong.
|
||||
|
||||
“Any ITAD service provider that does not carry an R2 certification cannot fully guarantee zero landfill or zero export of materials,” says Satter. “Many recyclers will say they are compliant, but without verified certifications you’re taking a chance.”
|
||||
|
||||
[][7]
|
||||
|
||||
Mark Dobson, IT asset disposal security specialist with NextUse, a firm that removes and the resells second-hand IT assets, cites six disposal certifications that companies should look for: [R2][5], [e-Stewards][8], [NAID][9], [NAID AAA][10] (which has greater certification of regulatory compliance), [ISO 14001][11], and ISO 18001. “R2 would be the floor,” he says.
|
||||
|
||||
Briefly, here’s what these certifications do.
|
||||
|
||||
* **e-Stewards** is a standard set by the Basel Action Network in Sweden, which recognizes electronics recyclers that adhere to the most stringent environmentally and socially responsible practices when recovering hazardous electronic materials. In particular it is focused on making sure it was not shipped off to poor countries, where underage workers were exposed to toxic materials in careless work conditions.
|
||||
* **NAID and NAID** AAA certification are set by The National Association of Information Destruction, a standards body that sets rules for the proper disposal of information devices, like hard drives.
|
||||
* **ISO 14001** is a management framework for organizations to “achieve the intended outcomes of its environmental management system, which provide value for the environment, the organization itself and interested parties.” Outcomes of the framework should enhance environmental performance, fulfill compliance obligations and achieve environmental objectives. ISO is the International Organization of Standards, a global standards body.
|
||||
* **ISO 18001** is the international standard for health and safety management systems.
|
||||
|
||||
|
||||
|
||||
Dobson says ITAD companies that do it right are using one or more of the certification standards for data security and responsible recycling, and getting and maintaining those standard takes substantial initial and on-going investment in facilities, equipment, hardware, software, personnel, policies and procedures.
|
||||
|
||||
“When those vendors charge more for their services, it is to cover those expenses, not to be excessively profitable,” he says. “Companies that do it the cheap way are skipping many if not all of those investments.”
|
||||
|
||||
If an e-waste company says they will take retired equipment for free, consider that a red flag, says Satter. “Compliant e-waste companies have to hire vetted/credentialed employees, which must pass background checks to ensure compliance is delivered,” Satter says. “All of that costs money.”
|
||||
|
||||
But the additional cost of using a certified company is minor. “We’re not talking hundreds of thousands of dollars,” says Dobson. “Even on the biggest job, it’s a few thousand dollars difference between the right way and the cheap way. For your average client, you’re talking thousands of dollars between the best vendors possible and totally half-assing it with the cheapest vendor that’s not operating in anyone’s best interest but their own.”
|
||||
|
||||
### Penalties
|
||||
|
||||
State environmental laws about illegal disposal are mainly enforced by state attorneys general. In addition, various federal agencies enforce violations of their agency's laws and regulations.
|
||||
|
||||
Satter thinks enforcement needs to be tougher. “It will take the federal government to create extreme enforcement measures to ensure our e-waste is handled properly. The CEO or owner of companies should be arrested if they violate illegal e-waste dumping laws or knowingly exports e-waste to developing countries,” he says.
|
||||
|
||||
In one case, two executives of a Seattle e-waste recycling company got [28 months in jail][12] for improper disposal of e-waste. In that case, it was e-Stewards that got wise to their illegal activities and turned them in to the Washington state AG.
|
||||
|
||||
But that’s an exception, not the rule. Dobson says he sees very little enforcement. “The regulations are in place but spotily enforced, and penalties are not incentivizing. A lot of this is viewed as the cost of doing business. They build the fines for if they get caught into the cost of disposal,” he says.
|
||||
|
||||
Fines for illegal dumping of old IT assets, are determined by the size of the violation, the clean-up cost, and the guidelines in the state or federal law. AT&T got one of the largest fines on record in 2014 for illegal disposal of e-waste, socked with a [$52 million fine][13]. Two years later, Apple got a spanking of $450,000 for its own [illegal dumping][14].
|
||||
|
||||
Middleton says first and foremost companies should ask for a paper trail to verify proper handling and disposal of assets from the moment they are picked up. “Ask about who certifies that your [disposal] partners are doing it correctly. When you don’t get a good answer, you walk away,” she says.
|
||||
|
||||
But she says she thinks most firms are legit. “Anyone that’s lasted in this business isn’t shady. The majority that have been around a while are responsible,” says Middleton.
|
||||
|
||||
Join the Network World communities on [Facebook][15] and [LinkedIn][16] to comment on topics that are top of mind.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3537928/how-to-dispose-of-it-hardware-without-hurting-the-environment.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://en.wikipedia.org/wiki/Kerbside_collection#/media/File:ACT_recycling_truck.jpg
|
||||
[2]: https://creativecommons.org/licenses/by/3.0/legalcode
|
||||
[3]: https://www.networkworld.com/newsletters/signup.html
|
||||
[4]: https://www.networkworld.com/article/3223692/what-is-a-data-centerhow-its-changed-and-what-you-need-to-know.html
|
||||
[5]: https://sustainableelectronics.org/r2-standard
|
||||
[6]: https://sustainableelectronics.org/
|
||||
[7]: 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)
|
||||
[8]: http://e-stewards.org/
|
||||
[9]: https://naidonline.org/
|
||||
[10]: https://naidonline.org/certifications/why-become-certified/
|
||||
[11]: https://www.iso.org/iso-14001-environmental-management.html
|
||||
[12]: https://www.theverge.com/2019/12/4/20992240/e-waste-recycling-electronic-basel-convention-crime-total-reclaim-fraud
|
||||
[13]: https://www.reuters.com/article/us-usa-at-t-california/att-to-pay-california-52-million-in-hazardous-waste-disposal-settlement-idUSKCN0J50AG20141121
|
||||
[14]: https://www.mercurynews.com/2016/12/06/apple-to-pay-450000-after-allegations-of-hazardous-waste-violations/
|
||||
[15]: https://www.facebook.com/NetworkWorld/
|
||||
[16]: https://www.linkedin.com/company/network-world
|
@ -0,0 +1,75 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (IBM extends z15 mainframe family, intensifies Linux security)
|
||||
[#]: via: (https://www.networkworld.com/article/3537678/ibm-extends-z15-mainframe-family-intensifies-linux-security.html)
|
||||
[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/)
|
||||
|
||||
IBM extends z15 mainframe family, intensifies Linux security
|
||||
======
|
||||
IBM continued to reshape the mainframe with an eye toward further integrating it within hybrid clouds and further securing Linux-based workloads.
|
||||
Kali Linux / nevarpp / Getty Images
|
||||
|
||||
IBM continued to reshape the [mainframe][1] with an eye toward further integrating it within hybrid clouds and securing [Linux][2]-based workloads.
|
||||
|
||||
On the hardware side, IBM rolled out two entry-level, 19” single-frame, air-cooled platforms, the [z15 Model T02][3] and [LinuxONE III Model LT2][4]. The new machines are extensions of the IBM z15 family that [Big Blue rolled out in September][5] of last year.
|
||||
|
||||
Both can fit in cloud [data-center][6] racks and can be outfitted with a second drawer, should customers need to grow capacity. Both feature 65 cores using commercial processors running at 4.5GHz and can be configured to support all manner of workloads.
|
||||
|
||||
[[Get regularly scheduled insights by signing up for Network World newsletters.]][7]
|
||||
|
||||
IBM said new machines support z/OS Container Extensions that enable access to an ecosystem of open-source and Linux-on-IBM Z applications that may be deployed within the native z/OS environment without requiring a separate Linux server, using Docker container skills and patterns. In addition customers can use the latest open-source tools, popular NoSQL databases, analytics frameworks and application servers, IBM said.
|
||||
|
||||
The LinuxONE Model LT2 can run a number of Linux systems including [Red Hat Enterprise Linux][8], SUSE and Ubuntu, alone or side by side with IBM z/VM environments on a single physical server. The IBM LinuxONE server can run Linux workloads independently on a single server.
|
||||
|
||||
Both systems support IBM’s prepackaged Cloud Paks, which include a secured Kubernetes container and containerized IBM middleware designed to let customers quickly spin-up enterprise-ready containers, the company said. IBM has standard Cloud Paks for data, application, integration, automation and multicloud management and security. The idea is to help customers develop, deploy, and manage cloud-native applications for the z15 family, IBM stated.
|
||||
|
||||
Security and privacy features are key for the z15 and those have been extended with the introduction of IBM Secure Execution for Linux for the all z15 models. In a [blog post][9] about the security extensions, IBM stated that at its core, a Secure Execution provides a KVM-based virtual machine that is fully isolated and protected from the hypervisor with encryption keys that only the IBM Z hardware and firmware have access to.
|
||||
|
||||
[][10]
|
||||
|
||||
“In practice, an encrypted Linux image is created using the host public key and a customer-specific key. Since the encryption keys are stored on the IBM Z hardware and firmware, the encrypted image can only be executed in a virtual machine on the host(s) it has been prepared for, and the image can’t be decrypted or tampered with outside of the designated host(s). In addition, your unencrypted virtual machine memory cannot be accessed by the host operating system either,” IBM stated. “Applications are then run inside of that virtual machine, allowing the owner of the application to focus on just disk and network data encryption, both of which can be easily handled in userland.”
|
||||
|
||||
In an environment where [customers are running Kubernetes][11] across servers running on x86 and Linux on Z systems, you can deploy the Secure Execution containers specifically for the applications you want to have protected, like sensitive databases and blockchain services. In this model, Kubernetes still manages the orchestration of containers, both on x86 and IBM Z, but it has no access to the data inside the Secure Execution environment container, IBM stated.
|
||||
|
||||
With Secure Execution IBM is trying to mitigate insider threats to enterprise data.
|
||||
|
||||
From 2016 to 2019, the average number of incidents involving employee or contractor negligence has increased from 10.5 to 14.5–and the average number of credential theft incidents per company has tripled over the past three years, from 1.0 to 3.2, According to the [Ponemon Institute’s 2020 Cost of an Insider Breach Report][12], IBM stated. “IBM Secure Execution for Linux helps to mitigate these concerns by enabling clients to isolate large numbers of workloads with granularity and at scale, within a trusted execution environment.”
|
||||
|
||||
The z15 family already supports what IBM calls [Data Privacy Passports][13] that promise to let customers control privacy and security by defining how all data is accessed, stored and shared. The idea is to let customers protect and provision data and revoke access to that data at any time, not only within the z15 environment but across an enterprise's hybrid [multicloud][14] environment, IBM stated.
|
||||
|
||||
The new systems and software are expected to be available by mid-May. z15 T02 pricing starts at $160,000 but each machine is built to order so prices vary.
|
||||
|
||||
Join the Network World communities on [Facebook][15] and [LinkedIn][16] to comment on topics that are top of mind.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3537678/ibm-extends-z15-mainframe-family-intensifies-linux-security.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/3446140/enterprises-find-a-new-use-for-mainframes-blockchain-and-containerized-apps.html
|
||||
[2]: https://www.networkworld.com/article/3215226/what-is-linux-uses-featres-products-operating-systems.html
|
||||
[3]: https://www-01.ibm.com/common/ssi/cgi-bin/ssialias?infotype=AN&subtype=CA&htmlfid=897/ENUS120-006&appname=USN
|
||||
[4]: https://www-01.ibm.com/common/ssi/cgi-bin/ssialias?infotype=AN&subtype=CA&htmlfid=897/ENUS120-014&appname=USN
|
||||
[5]: https://www.networkworld.com/article/3438542/ibm-z15-mainframe-amps-up-cloud-security-features.html
|
||||
[6]: https://www.networkworld.com/article/3223692/what-is-a-data-centerhow-its-changed-and-what-you-need-to-know.html
|
||||
[7]: https://www.networkworld.com/newsletters/signup.html
|
||||
[8]: https://www.redhat.com/en/blog/enterprise-linux-all-architectures-bringing-red-hat-enterprise-linux-ibm-z15-and-linuxone-iii-single-frame-systems?sc_cid=701f2000000txokAAA&utm_source=bambu&utm_medium=social&utm_campaign=Partner
|
||||
[9]: https://developer.ibm.com/blogs/inside-the-new-ibm-z15-t02-and-linuxone-iii-lt2/
|
||||
[10]: 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)
|
||||
[11]: https://www.networkworld.com/article/3536654/ibm-taps-new-leaders-for-hybrid-cloud-battles-ahead.html
|
||||
[12]: https://www.ibm.com/downloads/cas/LQZ4RONE
|
||||
[13]: https://developer.ibm.com/blogs/data-privacy-passports-for-developers/
|
||||
[14]: https://www.networkworld.com/article/3429258/real-world-tools-for-multi-cloud-management.html
|
||||
[15]: https://www.facebook.com/NetworkWorld/
|
||||
[16]: https://www.linkedin.com/company/network-world
|
@ -0,0 +1,96 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Network World 2020 State of the Network: SD-WAN, edge networking and security are hot)
|
||||
[#]: via: (https://www.networkworld.com/article/3537559/state-of-the-network-sd-wan-edge-networking-and-security-issues-heat-things-up.html)
|
||||
[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/)
|
||||
|
||||
Network World 2020 State of the Network: SD-WAN, edge networking and security are hot
|
||||
======
|
||||
Network World survey finds 5G, IoT, server consolidation and WAN optimization top priorities.
|
||||
[orna wachman / Pixabay][1] [(CC0)][2]
|
||||
|
||||
Networking trends including [SD-WAN][3], edge and [5G][4] technology dominate the plans of IT executives and management as they look to develop efficient, bulletproof enterprise communications strategies for the future.
|
||||
|
||||
Those trends and others such as network security, server consolidation and WAN optimization were cited as primary IT drivers of future investment, according to Network World's 2020 State of the Network report.
|
||||
|
||||
[[Get regularly scheduled insights by signing up for Network World newsletters.]][5]
|
||||
|
||||
The survey tapped 268 IT executives and management personnel with primary networking responsibilities for their organization to find out what initiatives are motivating the move to a more digital business environment.
|
||||
|
||||
### SD-WAN and WAN optimization
|
||||
|
||||
The survey found that 58% of respondents said SD-WAN can improve bandwidth efficiency, and 55% said it will expand connectivity options. 48% said it will encourage [hybrid cloud][6] and 41% said it would encourage multi-cloud adoption. The Network World survey found that the increased use of containers and cloud-based applications that need access from the edge is also driving the use of SD-WAN technologies.
|
||||
|
||||
There are a few differences by company size: 63% of enterprises say SD-WAN will improve the bandwidth efficiency for its cloud resources compared to 55% of SMBs. Close to half (46%) of enterprises expect SD-WAN to encourage multi-cloud, while only 26% of SMBs agree, perhaps because multicloud is less prevalent in smaller organizations, the survey stated.
|
||||
|
||||
The State of the Network survey found that 44% of organizations are currently piloting or using SD-WAN, and another 28% have it on their radar. Organizations expect SD-WAN to improve management and monitoring (52%), increase resiliency (51%), improve network security (50%) and prioritize business-critical traffic (46%), the survey stated.
|
||||
|
||||
It will probably come as little surprise that the technologies around SD-WAN are hot. In separate recent survey reports, analyst firm IDC says that 95% of enterprises will be using [SD-WAN][7] technology within two years, and that 42% have already deployed it. IDC also says the SD-WAN infrastructure market will hit $4.5 billion by 2022, growing at a more than 40% yearly clip between now and then.
|
||||
|
||||
[][8]
|
||||
|
||||
“The growth of SD-WAN is a broad-based trend that is driven largely by the enterprise desire to optimize cloud connectivity for remote sites,” Rohit Mehra, vice president, network infrastructure at IDC [said recently][9]. Going forward, the addition of features such as cloud-based application insights and performance monitoring will be a key part of SD-WAN rollouts, Mehra said.
|
||||
|
||||
Cisco has talked about the growth of multicloud networking motivating many businesses to re-tool their networks in favor of SD-WAN technology, Cisco wrote recently. SD-WAN is critical for businesses adopting cloud services, acting as a connective fabric between the campus, branch, [IoT][10], [data center][11] and cloud.
|
||||
|
||||
While SD-WAN is popular, its predecessor, WAN optimiization, is still in heavy use. The IDG survey found that more than half of organizations (53%) are currently piloting or using WAN optimization, which was traditionally centered around a single centralized hub or data center where an organization’s applications and data are hosted. With widely disparate user communities, many enterprises are now viewing new application-centric or regionally distributed architecture as a way to replace MPLS sprawl with purpose-built regional hubs, the survey stated.
|
||||
|
||||
### Edge is big
|
||||
|
||||
Often associated with SD-WAN, edge computing is also a high priority for customers in the Network World study, which found that more than one-third of organizations surveyed (36%) already have edge computing tools in production or are piloting initiatives, and another 25% are actively researching the technology.
|
||||
|
||||
Edge computing is driven by a number of factors. Gartner research says that by 2023, more than 50% of enterprise-generated data will be created and processed outside the [data center][11] or cloud, up from less than 10% in 2019.
|
||||
|
||||
Hand-in-hand with that change is a shift in what technologies are supported at the edge of the network, and that means information processing, content collection and delivery are placed closer to the sources, repositories and consumers of this information. Edge networking tries to keep the traffic and processing local to reduce latency, exploit the capabilities of the edge and enable greater autonomy at the edge, Gartner says.
|
||||
|
||||
The Network World survey stated that [edge-computing][12] adopters expect the technologies to reduce network latency and operational expenses, allow real-time data processing and save bandwidth. It is also expected to preserve uptime and resilience by reducing the number of network failures, providing an [IoT][10] security framework and reducing the impact of data-center outages.
|
||||
|
||||
Despite all of the virtues of edge computing, security concerns are still on the minds of the vast majority of respondents (77%). More than half of those surveyed believe that edge devices were not built with security in mind (55%), that the need for middleware creates an additional attack surface (51%) and that there are many other potential attack vectors due to the heterogeneous computing environment (51%).
|
||||
|
||||
The survey stated that 69% of respondents implementing edge computing said network security has already been or will be affected, and 55% said their network management will be affected. Additionally, 49% said their cloud will be affected, perhaps because edge computing has the ability to reduce the amount of data that needs to be processed in theh cloud.
|
||||
|
||||
### Security is a hot spot
|
||||
|
||||
The "State of the Network" survey found there are a variety of data-center security concerns. Topping the list are DDoS attacks, which are aimed at disrupting and disabling internet services, and web application attacks where attackers target vulnerable web servers and install malicious code.
|
||||
|
||||
Organizations are taking a variety of actions when it comes to mitigating these security risks, according to the study. For example the survey found that for 88% of respondents, [firewalls][10] are still the front-line defense. Access-control technologies are being used by about 81% of respondents and anti-malware is being used by 70% of enterprise customers with intrusion prevention being used by 66%.
|
||||
|
||||
With the increasing number and complexity of cyber threats, it’s not surprising that almost three-quarters of respondents (71%) are either piloting, currently using or upgrading network security-monitoring technology. Network security monitoring helps to identify slowdowns and problem areas as well as allows administrators to attack problems as they happen and help prevent future attacks, the survey stated.
|
||||
|
||||
### 5G is on the radar
|
||||
|
||||
51% of respondents say their organization is actively researching 5G, but just 11% are piloting or using it in any capacity. Uses interested organizations are considering include broadband mobile (51%), IoT connectivity (43%), [branch or remote site connectivity][13] (41%) and low-latency communications and fixed wireless access (40% each), the survey stated.
|
||||
|
||||
Join the Network World communities on [Facebook][14] and [LinkedIn][15] to comment on topics that are top of mind.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3537559/state-of-the-network-sd-wan-edge-networking-and-security-issues-heat-things-up.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://pixabay.com/photos/young-man-student-studying-learning-4053324/
|
||||
[2]: https://creativecommons.org/publicdomain/zero/1.0/
|
||||
[3]: https://www.networkworld.com/article/3031279/sd-wan-what-it-is-and-why-you-ll-use-it-one-day.html
|
||||
[4]: https://www.networkworld.com/article/3203489/what-is-5g-how-is-it-better-than-4g.html
|
||||
[5]: https://www.networkworld.com/newsletters/signup.html
|
||||
[6]: https://www.networkworld.com/article/3429258/real-world-tools-for-multi-cloud-management.html
|
||||
[7]: https://www.networkworld.com/article/3489938/what-s-hot-at-the-edge-for-2020-everything.html
|
||||
[8]: 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)
|
||||
[9]: https://www.networkworld.com/article/3527194/multicloud-security-integration-drive-massive-sd-wan-adoption.html
|
||||
[10]: https://www.networkworld.com/article/3207535/what-is-iot-the-internet-of-things-explained.html
|
||||
[11]: https://www.networkworld.com/article/3223692/what-is-a-data-centerhow-its-changed-and-what-you-need-to-know.html
|
||||
[12]: https://www.networkworld.com/article/3224893/what-is-edge-computing-and-how-it-s-changing-the-network.html
|
||||
[13]: https://www.networkworld.com/article/3250664/sd-branch-what-it-is-and-why-youll-need-it.html
|
||||
[14]: https://www.facebook.com/NetworkWorld/
|
||||
[15]: https://www.linkedin.com/company/network-world
|
@ -0,0 +1,55 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Contact tracing via Bluetooth could help track COVID-19 transmission)
|
||||
[#]: via: (https://www.networkworld.com/article/3538333/contact-tracing-via-bluetooth-could-help-track-covid-19-transmission.html)
|
||||
[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/)
|
||||
|
||||
Contact tracing via Bluetooth could help track COVID-19 transmission
|
||||
======
|
||||
|
||||
Thinkstock
|
||||
|
||||
[[Get regularly scheduled insights by signing up for Network World newsletters.]][1]
|
||||
|
||||
A team of researchers from MIT has developed a novel method of tracking COVID-19 transmission among the population, using Bluetooth “chirps” that could automatically trace COVID-positive contacts and warn those who have potentially become infected, without violating their privacy.
|
||||
|
||||
The system is called PACT, or Private Automated Contact Tracing. It works by sending random strings of numbers via low-power Bluetooth from a user’s smartphone to other nearby devices using the system, creating a coded list of smartphones that a given user has been close to in the past 14 days.
|
||||
|
||||
If the user subsequently tests positive for COVID, he or she can upload that list of “chirps” to the database, so that other users can run a check to determine whether they might have exposed.
|
||||
|
||||
MIT said that the system uses advanced privacy protection methods to ensure the privacy of both COVID sufferers and those checking to see whether they’ve been exposed. People would need to opt in, and researchers specifically highlighted that PACT does not use any GPS, wireless location or phone ID information.
|
||||
|
||||
“For these broadcasts, we’re using cryptographic techniques to generate random, rotating numbers that are not just anonymous, but pseudonymous, constantly changing their ‘ID,’ and that can’t be traced back to an individual,” said MIT institute professor Ron Rivest, who led the project. (Rivest knows a thing or two about cryptography: he’s the R in RSA, the first publicly available public-key cryptosystem.)
|
||||
|
||||
The idea behind PACT is to make sure that the system isn’t tracking any individuals specifically. Rather, it’s meant to be a yes/no resource for those wondering whether they may have been in proximity to someone with COVID. It’s currently at the proof-of-concept stage – the team recently overcame the hurdle of getting Androids and iPhones to speak to each other – and overtures have been made to smartphone makers, Apple, Google and Microsoft to try and get the system into the public’s hands as quickly as possible.
|
||||
|
||||
“The aim of the prototype is to prove to these developers that this is feasible for them to implement,” said Rivest.
|
||||
|
||||
**[ [Take this mobile device management course from PluralSight and learn how to secure devices in your company without degrading the user experience.][2] ]**
|
||||
|
||||
The team hopes that if PACT comes into widespread use it would enable a much more selective approach to quarantine and give communities the ability to return to normalcy more quickly. Tracking the spread of a disease like COVID with more speed and precision could let public health authorities suggest testing to specific groups of people if they notice a pattern emerging.
|
||||
|
||||
MIT also said that the team has demonstrated PACT to various government agencies, and coordinating similar efforts elsewhere in the U.S., as well as in Europe.
|
||||
|
||||
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/3538333/contact-tracing-via-bluetooth-could-help-track-covid-19-transmission.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://www.networkworld.com/newsletters/signup.html
|
||||
[2]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fmobile-device-management-big-picture
|
||||
[3]: https://www.facebook.com/NetworkWorld/
|
||||
[4]: https://www.linkedin.com/company/network-world
|
@ -0,0 +1,66 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Harvesting ambient energy will power IoT, scientists say)
|
||||
[#]: via: (https://www.networkworld.com/article/3536697/harvesting-ambient-energy-will-power-iot-scientists-say.html)
|
||||
[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/)
|
||||
|
||||
Harvesting ambient energy will power IoT, scientists say
|
||||
======
|
||||
Magnetic fields found naturally around electrical devices could be diverted and converted into electricity to power the IoT.
|
||||
Thinkstock
|
||||
|
||||
Stray, ambient magnetic fields that are naturally created from electricity usage should be captured, diverted, and converted into power for Internet of Things sensors, researchers say.
|
||||
|
||||
"Just like sunlight is a free source of energy we try to harvest, so are magnetic fields," said Shashank Priya, professor of materials science and engineering and associate vice president for research at Penn State, in a statement published [on the university's web site][1]. "We have this ubiquitous energy present in our homes, office spaces, work spaces and cars. It's everywhere, and we have an opportunity to harvest this background noise and convert it to useable electricity."
|
||||
|
||||
Electricity produces tiny magnetic fields around common power cables, computers and lighting found in factories, homes and offices. That energy, if harnessed, could power sensors and small data-sending radios, the academics think. Penn State is attempting to design ambient power receptors for IoT.
|
||||
|
||||
### Materials science
|
||||
|
||||
The group at Penn State has been having some success getting it to work. Experimental devices that are thin and about 1.5 inches long are being tested. Placing the capture-device around or on common appliances does produce electricity, the researchers claim. The key is to put the device where the magnetic field is the strongest. In one experiment, the researchers were able to generate enough power to run 180 LED lighting arrays with a device placed about 4 inches from a space heater. At 8 inches, the device produced enough electricity to operate a clock.
|
||||
|
||||
"These results provide significant advancements toward sustainable power for integrated sensors and wireless communication systems," said Min Gyu Kang, an assistant research professor at Penn State and joint lead author of the study.
|
||||
|
||||
Electricity and magnetism have always gone hand in hand. Magnetism is created by a moving electric charge. It's that movement which creates the magnetic field. That's why low-level magnetism is manifested in electrical wires generally, for example—the electricity is moving along the cable.
|
||||
|
||||
In this case, the scientists are converting the magnetic field, which is caused by the moving electricity, into a separate electrical current. They're doing it with materials science by combining two materials. One of the materials is a magnetostrictor – it converts the magnetic field into stress-generating vibrations. The another material is piezoelectric, which grabs the vibrations and translates that energy into electricity.
|
||||
|
||||
[][2]
|
||||
|
||||
### How to power sensors
|
||||
|
||||
Producing usable power from stray magnetic fields is just one stab at powering the IoT. Just how one goes about producing power for the millions, and possibly billions, of environmental, factory process and other sensors that are expected to come on stream as IoT takes off is up for grabs.
|
||||
|
||||
Batteries have limitations—they need to be changed or charged, for example. Ambient humidity is one possibility I [wrote about recently][3]. In that case, bio-electronics have been proven to capture half-a-volt from ambient air, scientists claim. That's enough to operate rudimentary sensors. Waste heat, too, is another possible source: Researchers are [exploring ways to convert excess heat][4], such as is found in data centers, into light, and then turn that light into electricity.
|
||||
|
||||
Other angles include simply reducing energy consumption through more efficient chips or streamlined wireless communications hardware. Other parasitic techniques are being tried. They include [turning existing wireless noise into a data carrier][5]. It's efficient because one doesn't have to make so much power for radio transceivers—the carrier already exists.
|
||||
|
||||
In the case of the Penn State work, less obvious benefits might exist, too.
|
||||
|
||||
"In buildings, it's known that if you automate a lot of functions, you could actually improve the energy efficiency very significantly," Priya said. “Buildings are one of the largest consumers of electricity in the United States. So even a few percent drop in energy consumption could represent or translate into megawatts of savings. Sensors are what will make it possible to automate these controls, and this technology is a realistic way to power those sensors."
|
||||
|
||||
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/3536697/harvesting-ambient-energy-will-power-iot-scientists-say.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://news.psu.edu/story/613154/2020/03/31/research/scientists-tap-unused-energy-source-power-smart-sensor-networks
|
||||
[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/3529893/seawater-humidity-inspire-new-ways-to-generate-power.html
|
||||
[4]: https://www.networkworld.com/article/3410578/data-centers-may-soon-recycle-heat-into-electricity.html
|
||||
[5]: https://www.networkworld.com/article/3449819/wireless-noise-protocol-can-extend-iot-range.html
|
||||
[6]: https://www.facebook.com/NetworkWorld/
|
||||
[7]: https://www.linkedin.com/company/network-world
|
@ -0,0 +1,86 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How I've adjusted my work-from-home habits)
|
||||
[#]: via: (https://opensource.com/article/20/4/healthy-remote-work-habits)
|
||||
[#]: author: (Will Kelly https://opensource.com/users/willkelly)
|
||||
|
||||
How I've adjusted my work-from-home habits
|
||||
======
|
||||
WFH newbs and veterans alike have to adjust to self-quarantine; here's
|
||||
how to maintain some balance.
|
||||
![Oatmeal and a laptop.][1]
|
||||
|
||||
I've been a remote worker during various chapters in my career, and have tried to carry those lessons into each new remote work experience. At the end of last year, I switched to a job that lets me work from home. Fast forward to the COVID-19 outbreak; even though I was no WFH novice, I found myself having to adapt just like the many other workers who've been suddenly thrust into remote work.
|
||||
|
||||
In hopes of easing that transition, here are some healthy remote work habits to adapt during a pandemic.
|
||||
|
||||
### Keep exercising even if your gym is closed
|
||||
|
||||
I watched the crowd in my gym dwindle the week before my state government issued its stay at home orders. Whether I've been working in an office or at home, going to the gym helps me vent stress, plus it acts as a logical break in my daily routine because I put down my phone and keyboard to clear my head.
|
||||
|
||||
Fortunately, my gym put some training activities online that I plan to use. I already have a stability ball and Bosu ball in my home office that I began using on day three after the pandemic closed all the offices, schools, and later gyms in my local area. As I write this article, I'm entering week 4 of COVID-19-mandated remote work, and I'm still trying to get back to the exercise dedication and momentum I had before this all happened.
|
||||
|
||||
### Dress (and groom) yourself for work
|
||||
|
||||
I've worked from home on and off during my career. When I started my new job, I decided not to repeat some mistakes I made during the last time I worked from home. One mistake I made was not shaving every day. I also stopped getting dressed for work.
|
||||
|
||||
When you dress and groom yourself for work every day, it can help put you in focus for work. You don't have to be too strict; it is a pandemic after all. I'm still debating on sweatpants Fridays during this crisis.
|
||||
|
||||
### Eat meals away from your desk
|
||||
|
||||
It's too easy to just eat meals at your desk when you work at home. Many even do it at the office. I recommend as you get through your COVID-19-enforced remote working that you use eating as a natural break in the ebbs and flows of your day. For example, unless a deadline was calling, I would go out to lunch to break up my remote working days. These days I get up from my desk, walk outside to get a breath of fresh air and have lunch in my living room.
|
||||
|
||||
### Keep a schedule and track your progress
|
||||
|
||||
It's easy to sleep in when you don't have to go to the office. I recommend trying to keep to your regular schedule as much as possible. It's admittedly easy for me to say that because I live alone. If you're home with children, work with your employer to time-shift your schedule to accommodate the added responsibilities and other challenges you're facing right now. It may take a few iterations to get the right schedule, but you'll appreciate the consistency.
|
||||
|
||||
Another word about keeping a schedule—you might add important work meetings to your personal calendar or as reminders on your mobile device, so you have another reminder as you adjust to the new normal of COVID-19.
|
||||
|
||||
The open source community has a lot of great scheduling and project management tools that you can use to track your own time and progress. There are [project management tools][2] for agile development teams. You can also find open source alternatives to [Googl][3][e Calendar][3] available on Android.
|
||||
|
||||
### Put backup communications channels in place
|
||||
|
||||
Even companies with robust telework programs may see some communications outages. It may not even be their CIO's fault, such as the Microsoft Teams outage that happened in Europe early on during the COVID-19 pandemic.
|
||||
|
||||
Having problems dialing into a conference bridge or your employer's group chat having sporadic issues will surprise nobody right now; most understand that workers are in a period of transition, and not everything will run smoothly. However, you still need to have backup channels in place to make that communication happen, even if it's just coworkers exchanging cell numbers so they can text or call each other as needed.
|
||||
|
||||
There are some fully-featured open source [Slack alternatives][4] available that are worth exploring if your organization is lacking in chat applications or if you want to give your team a backup channel to your official corporate application. (Whether you do it with the approval of your corporate IT department is up to you).
|
||||
|
||||
You should also consider installing implementing [MediaWiki][5] or [Twiki][6] to improve collaboration or to give your team an accessible document repository.
|
||||
|
||||
### Pivot on communications when needed
|
||||
|
||||
Every company where I've been an employee or contractor has had its own communications style. Remote working at scale during the COVID-19 epidemic will challenge those communication styles.
|
||||
|
||||
Be prepared to shake up your communication style, whether you're a newb or long term remote worker. That could mean writing more detailed emails instead of the terse ones you normally send to becoming more of a power user with your company's group chat tool. There are also the open source wikis I mentioned earlier that can provide you a centralized platform for any long-form writing you need to do to help communicate project requirements and changes.
|
||||
|
||||
I also extend this advice to your personal communications during the workday. For example, a friend and I video conference during the day. We never did that pre-COVID-19.
|
||||
|
||||
### Final thoughts
|
||||
|
||||
Lots of people will evolve and rethink their remote work habits. It's only healthy that you prepare yourself for adjusting your own remote working habits. What worked for me pre-COVID-19 doesn't necessarily work right now, so I'm adjusting my remote work habits weekly as I see fit so I can maximize my productivity during the current crisis.
|
||||
|
||||
How are you adjusting your remote work habits during self-quarantine?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/4/healthy-remote-work-habits
|
||||
|
||||
作者:[Will 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/willkelly
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/oatmeal-and-fedora.jpg?itok=NBFUH9eF (Oatmeal and a laptop.)
|
||||
[2]: https://opensource.com/article/18/2/agile-project-management-tools
|
||||
[3]: https://www.androidpolice.com/2019/12/30/the-best-free-and-open-source-alternatives-to-google-calendar-on-android/
|
||||
[4]: https://opensource.com/alternatives/slack
|
||||
[5]: http://www.mediawiki.org/
|
||||
[6]: http://www.twiki.org/
|
@ -0,0 +1,58 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Face-to-face collaboration for community to become more impactful – Chip Childers)
|
||||
[#]: via: (https://www.linux.com/articles/face-to-face-collaboration-for-community-to-become-more-impactful-chip-childers/)
|
||||
[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/)
|
||||
|
||||
Face-to-face collaboration for community to become more impactful – Chip Childers
|
||||
======
|
||||
|
||||
“Anytime there’s a crisis, there’s also an opportunity for open source communities to find ways to be helpful,” affirms Chip Childers, the Executive Director of Cloud Foundry Foundation. He believes the remarkable work the Cloud Foundry community has done over the years to enhance enterprise developer productivity will now help those who have adopted the platform to combat COVID-19.;
|
||||
|
||||
“It (the platform) allows them to move quickly to respond to changing conditions, whether those are market conditions, or in this case, a global pandemic. We’re actually pretty proud of a lot of the end-users and how they’re able to use the software more efficiently now,” he says.
|
||||
|
||||
Prior to becoming the Executive Director, Childers served as the CTO for a little over five years. He feels “it’s a very exciting time to be stepping into the role,” and has already chalked out a robust strategy to take the Foundation to the next level.
|
||||
|
||||
For starters, Google has upped its membership of Cloud Foundry and is now at the technical tier. “We were quite happy to have them decide to upgrade and we appreciate their support on that,” says Childers.
|
||||
|
||||
He is also happy with how Kubernetes and Cloud Foundry are coming together.
|
||||
|
||||
“Cloud Foundry and Kubernetes are now becoming complementary. The Cloud Foundry developer platform should run on the Kube infrastructure platform. Both communities have reached the point where they’re ready to see this get blended,” says Childers.
|
||||
|
||||
**Unswerving Support**
|
||||
VMware ranks among the largest contributors to communities. Last year, it acquired Pivotal, which is one of the biggest stakeholders in the Cloud Foundry project. So, what are the implications on Cloud Foundry of a player that has stakes in both Kubernetes and Cloud Foundry?
|
||||
|
||||
“It’s a clear indication the teams that used to work for Pivotal are being intermixed with the teams that were at VMware, and through some of their other acquisitions like Heptio, they’re all working together on the shared vision of creating the Tanzu platform. This happens to align well with the vision that other Cloud Foundry distributions have — like the way SUSE builds Kubernetes-based infrastructure layers Cloud Foundry on top for developer productivity,” explains Childers.
|
||||
|
||||
Childers believes Paul Fazzone’s promotion to Chairman of the Board will provide an additional boost to Cloud Foundry.
|
||||
|
||||
“Paul heads R&D for VMware’s modern applications business unit. He’s been on our board for a long time. So it’s great that we’re going to continue to see the investment in the open source community not just at the business level from VMware, but also in terms of supporting the contributors, be it developers, product managers, project management support, or marketing support. They’re not wavering in their commitment to open source across the board and Cloud Foundry is one of those communities that will benefit from that,” he states.
|
||||
|
||||
**A Three-Pronged Strategy**
|
||||
The core mission of the Foundation is to bring a world-class enterprise developer experience to as many enterprise developers as possible. Childers, therefore, considers “enterprise developer productivity for Kubernetes infrastructure our new north star” and has devised a three-pronged strategy to align with it.
|
||||
|
||||
“The first thing is that we will focus on working with the contributing community — the Foundation staff, key member contacts and participants — to improve their experience.
|
||||
|
||||
Next is to build upon the inclusivity and diversity work that the Foundation has done over the years. “We’ve always had a number of different audiences to whom we’ve tried to describe the work of the project: line of business leaders, CIOs, IT operations, and enterprise developers. It is important to make a little bit of a dent in the broader technology industry,” avers Childers.
|
||||
|
||||
The third and final prong of Childers strategy is to encourage developers or companies participating in Cloud Foundry efforts to also participate in Istio (an open platform that connects, manages, and secures microservices), Kubernetes, and the various scenes within the community.
|
||||
|
||||
“There’s a massive overlap, which I think will be very beneficial to everyone. The learnings that developers helping to code Kubernetes or Istio learn during that process should flow in such a way that the CF community builds the developer experience on top of those systems. From this perspective, cross-pollination is really, really important,” says Childers.
|
||||
|
||||
Childers is also planning a tectonic shift in the way Foundation contributors work. “While now it’s going to become a little bit harder as we deal with some of the challenges around the pandemic, I’m very excited about spending a lot of our effort focused on increasing the impact of the face-to-face collaboration time that we’re able to create for the community,” adds Childers.
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linux.com/articles/face-to-face-collaboration-for-community-to-become-more-impactful-chip-childers/
|
||||
|
||||
作者:[Swapnil Bhartiya][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.linux.com/author/swapnil/
|
||||
[b]: https://github.com/lujun9972
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user