mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
commit
525e1f099e
@ -3,21 +3,20 @@
|
|||||||
[#]: author: "David Wang https://opensource.com/users/davidwang"
|
[#]: author: "David Wang https://opensource.com/users/davidwang"
|
||||||
[#]: collector: "lkxed"
|
[#]: collector: "lkxed"
|
||||||
[#]: translator: "unigeorge"
|
[#]: translator: "unigeorge"
|
||||||
[#]: reviewer: " "
|
[#]: reviewer: "wxy"
|
||||||
[#]: publisher: " "
|
[#]: publisher: "wxy"
|
||||||
[#]: url: " "
|
[#]: url: "https://linux.cn/article-14608-1.html"
|
||||||
|
|
||||||
开源分析数据库 Apache Druid 的推荐理由
|
为什么推荐开源分析数据库 Apache Druid
|
||||||
======
|
======
|
||||||
对用户而言,优秀的对外数据分析工具不可多得,因此选择合适的数据架构就显得尤为重要。
|
|
||||||
|
|
||||||
![metrics and data shown on a computer screen][1]
|
> 对用户而言,优秀的对外数据分析工具非常关键,因此选择合适的数据架构就显得尤为重要。
|
||||||
|
|
||||||
(Image by: Opensource.com)
|
![](https://img.linux.net.cn/data/attachment/album/202205/18/154417bvakcquzn2ahv4ua.jpg)
|
||||||
|
|
||||||
现如今,数据分析不再是仅面向内部开发人员。当为业务方构建数据分析系统时,你需要确认哪种数据库后端是最合适的。
|
现如今,数据分析不再是仅面向内部开发人员。当为业务方构建数据分析系统时,你需要确认哪种数据库后端是最合适的。
|
||||||
|
|
||||||
程序员的本能可能是“选用自己了解的数据库(例如 PostgreSQL 或 [MySQL][2])”。诚然,数据仓库可能会扩展到其核心 BI 仪表板和报告之外的功能,不过对业务方的数据分析支持仍是其重要功能之一,因此要选择合适的工具来保证此功能的性能。
|
程序员的本能可能是“选用自己了解的数据库(例如 PostgreSQL 或 [MySQL][2])”。数据仓库也可能会扩展核心的 BI 仪表板和报告之外的功能,不过对业务方的数据分析支持仍是其重要功能之一,因此要选择合适的工具来保证此功能的性能。
|
||||||
|
|
||||||
问题的关键点在于用户体验,以下是对外支持数据分析工作的一些关键技术讨论点(以 Apache Druid 为例)。
|
问题的关键点在于用户体验,以下是对外支持数据分析工作的一些关键技术讨论点(以 Apache Druid 为例)。
|
||||||
|
|
||||||
@ -25,12 +24,11 @@
|
|||||||
|
|
||||||
一直在队列中等待查询会让人很恼火。与延迟有关的因素包括数据量、数据库的处理能力、用户和 API 调用的数量,以及数据库支持查询应用的能力。
|
一直在队列中等待查询会让人很恼火。与延迟有关的因素包括数据量、数据库的处理能力、用户和 API 调用的数量,以及数据库支持查询应用的能力。
|
||||||
|
|
||||||
当数据量比较大时,有一些方法可以基于任意在线分析处理 (OLAP) 数据库构建交互式数据体验,但或多或少都有一些其他方面的牺牲。预计算查询会对性能要求较高,还会使架构变得僵化。预聚合处理会使数据粒度变大。将数据时间限制在近期的处理方式,会使得数据完整性得不到保证。
|
当数据量比较大时,有一些方法可以基于任意在线分析处理(OLAP)数据库构建交互式数据体验,但或多或少都有一些其他方面的牺牲。预计算查询会对性能要求较高,还会使架构变得僵化。预聚合处理会使数据粒度变大。将数据时间限制在近期的处理方式,会使得数据完整性得不到保证。
|
||||||
|
|
||||||
“不妥协”的解决方案是选择专为大规模交互而构建的优化架构和数据格式,[Apache Druid][3] 正是这样一个旨在支持现代分析程序的实时数据库。
|
一个“不妥协”的解决方案是选择专为大规模交互而构建的优化架构和数据格式,[Apache Druid][3] 正是这样一个旨在支持现代分析程序的实时数据库。
|
||||||
|
|
||||||
* 首先,Druid 具备特有的分布式弹性架构,可将数据从共享数据层预取到近乎无限容量的数据服务器集群中。这种架构与诸如云数据仓库这样的解耦查询引擎相比,具有更快的性能,因为它不需要移动数据,并且比像 PostgreSQL 和 MySQL 这样的纵向扩展数据库具有更高的可扩展性。
|
* 首先,Druid 具备特有的分布式弹性架构,可将数据从共享数据层预取到近乎无限容量的数据服务器集群中。这种架构与诸如云数据仓库这样的解耦查询引擎相比,具有更快的性能,因为它不需要移动数据,并且比像 PostgreSQL 和 MySQL 这样的纵向扩展数据库具有更高的可扩展性。
|
||||||
|
|
||||||
* 其次,Druid 采用内置于数据格式中的自动多级索引来驱动每个内核去支持更多查询操作。在常规 OLAP 列格式基础之上,还增加了全局索引、数据字典和位图索引,这可以最大化利用 CPU 周期,加快处理速度。
|
* 其次,Druid 采用内置于数据格式中的自动多级索引来驱动每个内核去支持更多查询操作。在常规 OLAP 列格式基础之上,还增加了全局索引、数据字典和位图索引,这可以最大化利用 CPU 周期,加快处理速度。
|
||||||
|
|
||||||
### 高可用性
|
### 高可用性
|
||||||
@ -41,11 +39,11 @@
|
|||||||
|
|
||||||
考虑弹性就需要考虑设计标准。节点或集群范围的故障能完全避免吗?丢失数据的后果有多严重?保障应用程序和数据需要涉及哪些工作?
|
考虑弹性就需要考虑设计标准。节点或集群范围的故障能完全避免吗?丢失数据的后果有多严重?保障应用程序和数据需要涉及哪些工作?
|
||||||
|
|
||||||
关于服务器故障,保证弹性的常规方法是多节点服务以及[备份机制][4]。但如果你是为客户构建应用程序,则对数据丢失的敏感性要高得多。*间断性*备份并不能完全解决这一问题。
|
关于服务器故障,保证弹性的常规方法是多节点服务以及 [备份机制][4]。但如果你是为客户构建应用程序,则对数据丢失的敏感性要高得多。*偶尔的*备份并不能完全解决这一问题。
|
||||||
|
|
||||||
Apache Druid 的核心架构内置了该问题的解决方案,本质是一种强大而简单的弹性方法,旨在保证承受任何变故都不会丢失数据(即使是刚刚发生的事件)。
|
Apache Druid 的核心架构内置了该问题的解决方案,本质是一种强大而简单的弹性方法,旨在保证承受任何变故都不会丢失数据(即使是刚刚发生的事件)。
|
||||||
|
|
||||||
Druid 基于对象存储中共享数据的自动、多级复制实现高可用性 (HA) 和持久性。它实现了用户期望的 HA 特性以及持续备份机制,即使整个集群出现问题,也可以自动保护和恢复数据库的最新状态。
|
Druid 基于对象存储中共享数据的自动、多级复制实现高可用性(HA)和持久性。它实现了用户期望的 HA 特性以及持续备份机制,即使整个集群出现问题,也可以自动保护和恢复数据库的最新状态。
|
||||||
|
|
||||||
### 多用户
|
### 多用户
|
||||||
|
|
||||||
@ -63,7 +61,7 @@ Druid 基于对象存储中共享数据的自动、多级复制实现高可用
|
|||||||
|
|
||||||
分析应用程序对于用户而言至关重要,所以要构建正确的数据架构。
|
分析应用程序对于用户而言至关重要,所以要构建正确的数据架构。
|
||||||
|
|
||||||
你肯定不想一开始就选择了一个错误的数据库,然后在后续扩展时面对诸多令人头疼的问题。幸运的是,Apache Druid 可以从小规模开始,并在之后轻松扩展以支持任何可以想象的应用程序。Apache Druid 有[优秀的官方文档][5],当然它是开源的,所以不妨尝试一下并,快速上手吧。
|
你肯定不想一开始就选择了一个错误的数据库,然后在后续扩展时面对诸多令人头疼的问题。幸运的是,Apache Druid 可以从小规模开始,并在之后轻松扩展以支持任何可以想象的应用程序。Apache Druid 有 [优秀的官方文档][5],当然它是开源的,所以不妨尝试一下并,快速上手吧。
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -72,7 +70,7 @@ via: https://opensource.com/article/22/4/apache-druid-open-source-analytics
|
|||||||
作者:[David Wang][a]
|
作者:[David Wang][a]
|
||||||
选题:[lkxed][b]
|
选题:[lkxed][b]
|
||||||
译者:[unigeorge](https://github.com/unigeorge)
|
译者:[unigeorge](https://github.com/unigeorge)
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
@ -3,17 +3,18 @@
|
|||||||
[#]: author: "S Ratan Kumar https://www.opensourceforu.com/author/s-ratan/"
|
[#]: author: "S Ratan Kumar https://www.opensourceforu.com/author/s-ratan/"
|
||||||
[#]: collector: "lkxed"
|
[#]: collector: "lkxed"
|
||||||
[#]: translator: "geekpi"
|
[#]: translator: "geekpi"
|
||||||
[#]: reviewer: " "
|
[#]: reviewer: "wxy"
|
||||||
[#]: publisher: " "
|
[#]: publisher: "wxy"
|
||||||
[#]: url: " "
|
[#]: url: "https://linux.cn/article-14607-1.html"
|
||||||
|
|
||||||
PyCaret:机器学习模型开发变得简单
|
PyCaret:机器学习模型开发变得简单
|
||||||
======
|
======
|
||||||
在当今快节奏的数字世界中,组织使用低代码/无代码 (LC/NC) 应用来快速构建新的信息系统。本文介绍 PyCaret,一个用 Python 编写的低代码机器学习库。
|
|
||||||
|
> 在当今快节奏的数字世界中,机构们使用低代码/无代码(LC/NC)应用来快速构建新的信息系统。本文将介绍 PyCaret,这是一个用 Python 编写的低代码机器学习库。
|
||||||
|
|
||||||
![Featured-image-of-pycaret][1]
|
![Featured-image-of-pycaret][1]
|
||||||
|
|
||||||
PyCaret 是 R 编程语言中 Caret(分类和回归训练的缩写)包的 Python 版本,具有许多优点。
|
PyCaret 是 R 编程语言中 Caret(<ruby>分类和回归训练<rt>Classification And REgression Training</rt></ruby>的缩写)包的 Python 版本,具有许多优点。
|
||||||
|
|
||||||
- **提高工作效率:** PyCaret 是一个低代码库,可让你提高工作效率。由于花费更少的时间进行编码,你和你的团队现在可以专注于业务问题。
|
- **提高工作效率:** PyCaret 是一个低代码库,可让你提高工作效率。由于花费更少的时间进行编码,你和你的团队现在可以专注于业务问题。
|
||||||
- **易于使用:** 这个简单易用的机器学习库将帮助你以更少的代码行执行端到端的机器学习实验。
|
- **易于使用:** 这个简单易用的机器学习库将帮助你以更少的代码行执行端到端的机器学习实验。
|
||||||
@ -35,7 +36,7 @@ pip install pycaret [full]
|
|||||||
|
|
||||||
#### 步骤 1
|
#### 步骤 1
|
||||||
|
|
||||||
首先,通过给出以下命令安装 PyCaret:
|
首先,通过给出以下命令安装 PyCaret:
|
||||||
|
|
||||||
```
|
```
|
||||||
pip install pycaret
|
pip install pycaret
|
||||||
@ -49,10 +50,10 @@ pip install pycaret
|
|||||||
|
|
||||||
```
|
```
|
||||||
from pycaret.datasets import get_data
|
from pycaret.datasets import get_data
|
||||||
dataset = get_data(‘iris’)
|
dataset = get_data('iris')
|
||||||
(or)
|
(或者)
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
dataset = pd.read_csv(/path_to_data/file.csv’)
|
dataset = pd.read_csv('/path_to_data/file.csv')
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 步骤 3
|
#### 步骤 3
|
||||||
@ -63,12 +64,12 @@ dataset = pd.read_csv(/path_to_data/file.csv’)
|
|||||||
|
|
||||||
```
|
```
|
||||||
from pycaret.classification import *
|
from pycaret.classification import *
|
||||||
clf1 = setup (data=dataset, target = ‘species’)
|
clf1 = setup(data=dataset, target = ‘species’)
|
||||||
```
|
```
|
||||||
|
|
||||||
![PyCaret environment setup result][4]
|
![PyCaret environment setup result][4]
|
||||||
|
|
||||||
对于使用 PyCaret 构建任何类型的模型,环境设置是最重要的一步。默认情况下,*setup()* 函数采用 *data*: Pandas DataFrame 和 target,它指向数据集中的类标签变量。 setup 函数的结果如图 3 所示。 setup 函数默认将 70% 的数据拆分为训练集,30% 作为测试集,并进行数据预处理,如图 3 所示。
|
使用 PyCaret 构建任何类型的模型,环境设置是最重要的一步。默认情况下,`setup()` 函数接受参数 `data`(Pandas 数据帧)和 `target`(指向数据集中的类标签变量)。`setup()` 函数的结果如图 3 所示。 `setup()` 函数默认将 70% 的数据拆分为训练集,30% 作为测试集,并进行数据预处理,如图 3 所示。
|
||||||
|
|
||||||
#### 步骤 4
|
#### 步骤 4
|
||||||
|
|
||||||
@ -80,7 +81,7 @@ clf1 = setup (data=dataset, target = ‘species’)
|
|||||||
best = compare_models()
|
best = compare_models()
|
||||||
```
|
```
|
||||||
|
|
||||||
默认情况下,*compare_models()* 应用十倍交叉验证,并针对具有较少训练时间的不同分类器计算不同的性能指标,如准确度、AUC、召回率、精度、F1 分数、Kappa 和 MCC,如图 4 所示。通过将 tubro=True 传递给 *compare_models()* 函数,我们可以尝试所有分类器。
|
默认情况下,`compare_models()` 应用十倍交叉验证,并针对具有较少训练时间的不同分类器计算不同的性能指标,如准确度、AUC、召回率、精度、F1 分数、Kappa 和 MCC,如图 4 所示。通过将 `tubro=True` 传递给 `compare_models()` 函数,我们可以尝试所有分类器。
|
||||||
|
|
||||||
#### 步骤 5
|
#### 步骤 5
|
||||||
|
|
||||||
@ -92,7 +93,7 @@ best = compare_models()
|
|||||||
lda_model=create_model (‘lda’)
|
lda_model=create_model (‘lda’)
|
||||||
```
|
```
|
||||||
|
|
||||||
线性判别分析分类器表现良好,如图 4 所示。因此,通过将 “lda” 传递给 *create_model()* 函数,我们可以拟合模型。
|
线性判别分析分类器表现良好,如图 4 所示。因此,通过将 `lda` 传递给 `create_model()` 函数,我们可以拟合模型。
|
||||||
|
|
||||||
#### 步骤 6
|
#### 步骤 6
|
||||||
|
|
||||||
@ -104,7 +105,7 @@ lda_model=create_model (‘lda’)
|
|||||||
tuned_lda=tune_model(lda_model)
|
tuned_lda=tune_model(lda_model)
|
||||||
```
|
```
|
||||||
|
|
||||||
超参数的调整可以提高模型的准确性。 *tune_model()* 函数将线性判别分析模型的精度从 0.9818 提高到 0.9909,如图 7 所示。
|
超参数的调整可以提高模型的准确性。`tune_model()` 函数将线性判别分析模型的精度从 0.9818 提高到 0.9909,如图 7 所示。
|
||||||
|
|
||||||
![Tuned model details][8]
|
![Tuned model details][8]
|
||||||
|
|
||||||
@ -118,7 +119,7 @@ tuned_lda=tune_model(lda_model)
|
|||||||
predictions=predict_model(tuned_lda)
|
predictions=predict_model(tuned_lda)
|
||||||
```
|
```
|
||||||
|
|
||||||
*predict_model()* 函数用于对测试数据中存在的样本进行预测。
|
`predict_model()` 函数用于对测试数据中存在的样本进行预测。
|
||||||
|
|
||||||
#### 步骤 8
|
#### 步骤 8
|
||||||
|
|
||||||
@ -130,7 +131,7 @@ predictions=predict_model(tuned_lda)
|
|||||||
evaluate_model(tuned_lda)
|
evaluate_model(tuned_lda)
|
||||||
```
|
```
|
||||||
|
|
||||||
*evaluate_model ()* 函数用于以最小的努力开发不同的性能指标。你可以尝试它们并查看输出。
|
`evaluate_model()` 函数用于以最小的努力开发不同的性能指标。你可以尝试它们并查看输出。
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -139,7 +140,7 @@ via: https://www.opensourceforu.com/2022/05/pycaret-machine-learning-model-devel
|
|||||||
作者:[S Ratan Kumar][a]
|
作者:[S Ratan Kumar][a]
|
||||||
选题:[lkxed][b]
|
选题:[lkxed][b]
|
||||||
译者:[geekpi](https://github.com/geekpi)
|
译者:[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/) 荣誉推出
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
@ -0,0 +1,69 @@
|
|||||||
|
[#]: subject: "Fudgie? The Awesome Budgie Desktop is Coming to Fedora Linux Soon"
|
||||||
|
[#]: via: "https://news.itsfoss.com/fudgie-fedora-budgie-announcement/"
|
||||||
|
[#]: author: "Abhishek https://news.itsfoss.com/author/root/"
|
||||||
|
[#]: collector: "lkxed"
|
||||||
|
[#]: translator: "lkxed"
|
||||||
|
[#]: reviewer: "wxy"
|
||||||
|
[#]: publisher: "wxy"
|
||||||
|
[#]: url: "https://linux.cn/article-14610-1.html"
|
||||||
|
|
||||||
|
Fudgie?令人惊叹的 Budgie 桌面即将登陆 Fedora Linux
|
||||||
|
======
|
||||||
|
|
||||||
|
> Fedora 用户也将能够享受 Budgie 桌面环境的现代体验。
|
||||||
|
|
||||||
|
![Fedora Budgie][1]
|
||||||
|
|
||||||
|
近来,红帽的社区项目 Fedora 已经获得了相当不错的用户群。除了默认桌面 GNOME 外,Fedora 也以 <ruby>[Fedora 定制版][2]<rt>Fedora Spins</rt></ruby> 的形式提供了多种其他桌面环境。
|
||||||
|
|
||||||
|
这意味着你可以在 Fedora 上享受 KDE、MATE、Xfce 和其他一些桌面环境的开箱即用的体验,而无需额外的努力。喜欢 KDE 而不是 GNOME 吗?下载 Fedora 的 KDE 定制版,安装它,就像安装常规的 Fedora 一样。
|
||||||
|
|
||||||
|
Fedora 定制版中缺少的一个桌面环境是 Budgie 桌面。
|
||||||
|
|
||||||
|
### Budgie 走向独立
|
||||||
|
|
||||||
|
在 2014 年左右,Budgie 桌面随同 Solus Linux 项目一起推出。最近,Solus 和 Budgie 项目出现了一些 [倒退式的发展][3]。Budgie 项目现在已经 [从 Solus Linux 中独立出来了][4]。
|
||||||
|
|
||||||
|
自从首次发布以来,Budgie 就获得了一定的追随者。它的现代布局方式受到了许多 Linux 用户的喜爱。这也是许多其他主要 Linux 发行版(如 Ubuntu、Manjaro、openSUSE)开始提供 Budgie 版本的原因。
|
||||||
|
|
||||||
|
![Budgie 10.6][5]
|
||||||
|
|
||||||
|
到目前为止,Fedora 的产品中还没有 Budgie,但这可能会在 Fedora 的下一个版本中发生变化。
|
||||||
|
|
||||||
|
### Budgie 提交加入 Fedora 的申请
|
||||||
|
|
||||||
|
Budgie 项目的首席开发人员 Joshua Strobl 在 [Reddit 帖子][6] 中宣布了这一消息。
|
||||||
|
|
||||||
|
> 我现在已提交 Budgie 桌面及其它的附属软件(Budgie 控制中心、Budgie 屏幕保护程序、Budgie 桌面视图)加入到 Fedora 中的申请。从 Fedora rawhide(37)开始并向后移植到 36。它会得到“官方的”维护/支持,因为我自己在工作笔记本电脑上使用 Fedora Silverblue + rawhide,并且我以后会切换桌面到 Fedora Silverblue。
|
||||||
|
|
||||||
|
这意味着,如果该软件包得到了 Fedora 团队的批准,你应该就能在 Fedora 37 中(甚至有希望在 Fedora 36 中)安装 Budgie 和它的附属软件。
|
||||||
|
|
||||||
|
但这还不是故事的结束。Joshua 提到,他也在考虑引入并支持包含 Budgie 桌面的 Fedora 官方定制版。这意味着人们将能够下载一个预装了 Budgie(而不是 GNOME)桌面的 Fedora ISO。
|
||||||
|
|
||||||
|
目前还不清楚他的意思,有可能是一个 Budge 的 Fedora 官方定制版,也有可能是一个新的非官方的 Fedora 衍生版,名为 “Fudgie”,完全由他来维护。
|
||||||
|
|
||||||
|
### Fedora + Budgie 是一个好消息
|
||||||
|
|
||||||
|
无论如何,Fedora 的 Budgie 桌面都是个好消息。它为 Fedora 用户提供了更多选择,而 Budgie 是一个漂亮的桌面。同时喜欢 Fedora 和 Budgie 的人应该能够享受两全其美的体验。
|
||||||
|
|
||||||
|
我希望你同意我的看法。请在评论区也分享一下你的看法吧!
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://news.itsfoss.com/fudgie-fedora-budgie-announcement/
|
||||||
|
|
||||||
|
作者:[Abhishek][a]
|
||||||
|
选题:[lkxed][b]
|
||||||
|
译者:[lkxed](https://github.com/lkxed)
|
||||||
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://news.itsfoss.com/author/root/
|
||||||
|
[b]: https://github.com/lkxed
|
||||||
|
[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/fedora-budgie.png
|
||||||
|
[2]: https://spins.fedoraproject.org
|
||||||
|
[3]: https://news.itsfoss.com/solus-co-lead-resign-budgie-serpent/
|
||||||
|
[4]: https://news.itsfoss.com/budgie-10-6-release/
|
||||||
|
[5]: https://news.itsfoss.com/wp-content/uploads/2022/04/budgie-10.61-1024x576.jpg
|
||||||
|
[6]: https://www.reddit.com/r/Fedora/comments/uq3gah/budgie_desktop_has_now_been_submitted_for/
|
@ -0,0 +1,115 @@
|
|||||||
|
[#]: subject: "Kali Linux 2022.2 Release Adds an Amusing New Feature for the Hackers to Scare People"
|
||||||
|
[#]: via: "https://news.itsfoss.com/kali-linux-2022-2-release/"
|
||||||
|
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||||
|
[#]: collector: "lkxed"
|
||||||
|
[#]: translator: "wxy"
|
||||||
|
[#]: reviewer: "wxy"
|
||||||
|
[#]: publisher: "wxy"
|
||||||
|
[#]: url: "https://linux.cn/article-14606-1.html"
|
||||||
|
|
||||||
|
Kali Linux 2022.2 发布:增加了一个吓唬人的有趣新功能
|
||||||
|
======
|
||||||
|
|
||||||
|
> Kali Linux 2022.2 是今年的第二次更新,增加了一些有趣的内容。
|
||||||
|
|
||||||
|
![kali linux][1]
|
||||||
|
|
||||||
|
Kali Linux 不是你寻常使用的 Linux 发行版。它是专门为渗透测试和道德黑客学习及实验而量身打造的。
|
||||||
|
|
||||||
|
在新的 Kali Linux 版本中,增加了一些有趣的工具和功能。让我们来看看 Kali Linux 2022.2 的亮点。
|
||||||
|
|
||||||
|
### Kali Linux 2022.2 有什么新功能?
|
||||||
|
|
||||||
|
Kali Linux 2022.2 是一个有趣的版本,它引入了更新的桌面环境,升级了 Linux 内核,增加了新的工具,以及更多的改进。
|
||||||
|
|
||||||
|
不仅仅限于通常的完善,你还可以看到一个新的屏幕保护程序,其中有许多令人惊讶的元素。
|
||||||
|
|
||||||
|
#### 带有好莱坞怀旧色彩的新屏保
|
||||||
|
|
||||||
|
Kali Linux 已经出现在许多黑客相关的电视节目/电影(如《<ruby>黑客军团<rt>Mr. Robot</rt></ruby>》)中,看起来酷极了。
|
||||||
|
|
||||||
|
更进一步,Kali Linux 增加了一个新的屏幕保护程序(你可以单独安装),其中有来自好莱坞的令人惊讶的元素和一些吓唬人的黑客场景。
|
||||||
|
|
||||||
|
他们在屏保中调侃了《黑客帝国》的尼奥,还添加了一个漂亮的 Kali Linux 标志。
|
||||||
|
|
||||||
|
![][2]
|
||||||
|
|
||||||
|
整个屏幕保护程序包括几个非常棒的元素。要安装并立即启动它,你可以输入以下命令:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt -y install kali-screensaver
|
||||||
|
sudo apt -y install hollywood-activate
|
||||||
|
hollywood-activate
|
||||||
|
```
|
||||||
|
|
||||||
|
![VIDEO](https://player.vimeo.com/video/710680907)
|
||||||
|
|
||||||
|
#### GNOME 42
|
||||||
|
|
||||||
|
![][3]
|
||||||
|
|
||||||
|
Kali Linux 终于包含了新的 [GNOME 42][4] 桌面环境。所以,在 Kali Linux 自然带有 GNOME 42 的所有优点,包括新的屏幕截图用户界面。
|
||||||
|
|
||||||
|
另外,现在你将会在 GNOME 桌面环境中获得一致的深浅主题体验。
|
||||||
|
|
||||||
|
![][5]
|
||||||
|
|
||||||
|
#### KDE Plasma 5.24
|
||||||
|
|
||||||
|
对于 KDE 粉丝,Kali Linux 2022.2 也带来了新的 [KDE Plasma 5.24][6] LTS 桌面环境。
|
||||||
|
|
||||||
|
![][7]
|
||||||
|
|
||||||
|
#### 新的 Kali Linux 工具
|
||||||
|
|
||||||
|
新的工具总是每个新版本的重点。一些新增加的工具包括:
|
||||||
|
|
||||||
|
* BruteShark - 网络取证分析工具(NFAT)
|
||||||
|
* Evil-WinRM - Ultimate WinRM shell
|
||||||
|
* Hakrawler - 网络爬虫,设计用于轻松、快速发现端点和资产
|
||||||
|
* Httpx - 快速和多用途的 HTTP 工具箱
|
||||||
|
* Sparrow-wifi - 用于 Linux 的图形化 Wi-Fi 分析器
|
||||||
|
|
||||||
|
#### 其他改进
|
||||||
|
|
||||||
|
该版本还有许多其他实质性的改进。主要的亮点包括。
|
||||||
|
|
||||||
|
* 对终端进行了调整,以加强语法高亮、自动补完和输出
|
||||||
|
* 自动复制丢失的配置
|
||||||
|
* 支持 VirtualBox 共享文件夹
|
||||||
|
* 增加了新的应用程序图标
|
||||||
|
* 为多显示器设置调整了默认墙纸
|
||||||
|
* 针对 ARM 设备的更新
|
||||||
|
* Linux 内核 5.16
|
||||||
|
|
||||||
|
要探索更多关于该版本的信息,你可以查看 [官方发布公告][8]。
|
||||||
|
|
||||||
|
### 下载 Kali Linux 2022.2
|
||||||
|
|
||||||
|
你应该能够在 [官方下载页面][9] 中找到该镜像。根据你的要求选择合适的版本,然后安装它。
|
||||||
|
|
||||||
|
> **[Kali Linux 2022.2][10]**
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://news.itsfoss.com/kali-linux-2022-2-release/
|
||||||
|
|
||||||
|
作者:[Ankush Das][a]
|
||||||
|
选题:[lkxed][b]
|
||||||
|
译者:[wxy](https://github.com/wxy)
|
||||||
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://news.itsfoss.com/author/ankush/
|
||||||
|
[b]: https://github.com/lkxed
|
||||||
|
[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/kali-2022-2-release-new.jpg
|
||||||
|
[2]: https://news.itsfoss.com/wp-content/uploads/2022/05/kali-linux-screensaver.jpg
|
||||||
|
[3]: https://news.itsfoss.com/wp-content/uploads/2022/05/kali-linux-gnome-42.jpg
|
||||||
|
[4]: https://news.itsfoss.com/gnome-42-features/
|
||||||
|
[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/kali-linux-gnome-42-screenshot.jpg
|
||||||
|
[6]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/
|
||||||
|
[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/kali-linux-kde-5-24-1024x640.jpg
|
||||||
|
[8]: https://www.kali.org/blog/kali-linux-2022-2-release/
|
||||||
|
[9]: https://www.kali.org/get-kali/
|
||||||
|
[10]: https://www.kali.org/get-kali/
|
@ -1,68 +0,0 @@
|
|||||||
[#]: subject: "Fudgie? The Awesome Budgie Desktop is Coming to Fedora Linux Soon"
|
|
||||||
[#]: via: "https://news.itsfoss.com/fudgie-fedora-budgie-announcement/"
|
|
||||||
[#]: author: "Abhishek https://news.itsfoss.com/author/root/"
|
|
||||||
[#]: collector: "lkxed"
|
|
||||||
[#]: translator: " "
|
|
||||||
[#]: reviewer: " "
|
|
||||||
[#]: publisher: " "
|
|
||||||
[#]: url: " "
|
|
||||||
|
|
||||||
Fudgie? The Awesome Budgie Desktop is Coming to Fedora Linux Soon
|
|
||||||
======
|
|
||||||
Fedora users will also be able enjoy the modern experience of the Budgie desktop environment.
|
|
||||||
|
|
||||||
![Fedora Budgie][1]
|
|
||||||
|
|
||||||
In recent times, Red Hat’s community project, Fedora, has gained quite a decent userbase. While GNOME is the default choice of desktop here, Fedora also offers a variety of other desktop environments in the form of [Fedora Spins][2].
|
|
||||||
|
|
||||||
This means that you can enjoy an out of box experience of KDE, MATE, Xfce and a few other desktop environments with Fedora without additional effort. Do you prefer KDE instead of GNOME? Download the KDE spin of Fedora and install it like your regular Fedora installation.
|
|
||||||
|
|
||||||
The one desktop offering missing from Fedora Spins is Budgie desktop.
|
|
||||||
|
|
||||||
### Budgie going independent
|
|
||||||
|
|
||||||
The Budgie desktop was introduced with the Solus Linux project circa 2014. There has been some [regressional development with the Solus and Budgie project lately][3]. The [Budgie project is now independent of the Solus Linux][4].
|
|
||||||
|
|
||||||
Ever since its first release, Budgie garnered a niche following. Its modern layout approach is liked by many Linux users. This is the reason why many other major Linux distributions like Ubuntu, Manjaro, openSUSE started offering Budgie variants.
|
|
||||||
|
|
||||||
![Budgie 10.6][5]
|
|
||||||
|
|
||||||
Fedora hasn’t had Budgie in its offering so far but that could be changing in the next release of Fedora.
|
|
||||||
|
|
||||||
### Budgie submitted for inclusion in Fedora
|
|
||||||
|
|
||||||
Joshua Strobl, the lead developer of the Budgie project, announced the news in a [Reddit post][6].
|
|
||||||
|
|
||||||
> I have now submitted Budgie Desktop and its microcosm of software (Budgie Control Center, Budgie Screensaver, Budgie Desktop View) for inclusion in Fedora, starting with rawhide (37) and backporting to 36. This will be maintained / supported “officially”, as I am using Fedora Silverblue + rawhide on my work laptop and will be switching my desktop over to Fedora Silverblue as well.
|
|
||||||
|
|
||||||
This means that if the package is approved by the Fedora’s team, you should be able to install Budgie and some Budgie elements in Fedora 37 and hopefully in Fedora 36.
|
|
||||||
|
|
||||||
But that’s not the end of the story. Joshua mentions that he is also considering to introduce and support an official Fedora Spin of Budgie desktop. Meaning people will be able to download an ISO of Fedora preloaded with Budgie desktop instead of GNOME.
|
|
||||||
|
|
||||||
It’s not clear if he speaks of official Fedora Spin or a new unofficial Fedora variant named ‘Fudgie’, which is completely maintained by him.
|
|
||||||
|
|
||||||
### Fedora + Budgie is a good news
|
|
||||||
|
|
||||||
In any case, the Budgie desktop coming to Fedora is good news. It gives more options to the Fedora user and Budgie is a pretty sleet desktop. People who like both Fedora and Budgie should be able to enjoy the best of the both worlds.
|
|
||||||
|
|
||||||
I hope you agree with me. I let you share your view in the comment section.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://news.itsfoss.com/fudgie-fedora-budgie-announcement/
|
|
||||||
|
|
||||||
作者:[Abhishek][a]
|
|
||||||
选题:[lkxed][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://news.itsfoss.com/author/root/
|
|
||||||
[b]: https://github.com/lkxed
|
|
||||||
[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/fedora-budgie.png
|
|
||||||
[2]: https://spins.fedoraproject.org
|
|
||||||
[3]: https://news.itsfoss.com/solus-co-lead-resign-budgie-serpent/
|
|
||||||
[4]: https://news.itsfoss.com/budgie-10-6-release/
|
|
||||||
[5]: https://news.itsfoss.com/wp-content/uploads/2022/04/budgie-10.61-1024x576.jpg
|
|
||||||
[6]: https://www.reddit.com/r/Fedora/comments/uq3gah/budgie_desktop_has_now_been_submitted_for/
|
|
@ -1,112 +0,0 @@
|
|||||||
[#]: subject: "Adobe Illustrator Alternative Inkscape Releases Version 1.2"
|
|
||||||
[#]: via: "https://news.itsfoss.com/inkscape-1-2-release/"
|
|
||||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
|
||||||
[#]: collector: "lkxed"
|
|
||||||
[#]: translator: " "
|
|
||||||
[#]: reviewer: " "
|
|
||||||
[#]: publisher: " "
|
|
||||||
[#]: url: " "
|
|
||||||
|
|
||||||
Adobe Illustrator Alternative Inkscape Releases Version 1.2
|
|
||||||
======
|
|
||||||
Inkscape 1.2 is an exciting update with many useful improvements and feature additions. Take it for a spin!
|
|
||||||
|
|
||||||
![inkscape][1]
|
|
||||||
|
|
||||||
Inkscape is a popular open-source vector graphics program available for Linux, Windows, and macOS.
|
|
||||||
|
|
||||||
The latest release focuses on refinements to existing tools and more customization options.
|
|
||||||
|
|
||||||
There are also a couple of new additions to the application. Let’s take a look.
|
|
||||||
|
|
||||||
### Inkscape 1.2: What’s New?
|
|
||||||
|
|
||||||
[<img src="https://i.ytimg.com/vi/1U4hVbvRr_g/hqdefault.jpg" alt="Inkscape 1.2 is here!">][2]
|
|
||||||
|
|
||||||
![][3]
|
|
||||||
|
|
||||||
Inkscape 1.2 is an exciting update with many useful enhancements. Some of the key changes include:
|
|
||||||
|
|
||||||
* Improved gradient editor
|
|
||||||
* New snapping modes
|
|
||||||
* Support for Multi-page documents
|
|
||||||
* Improved export dialog
|
|
||||||
* Customizable toolbar
|
|
||||||
|
|
||||||
Here, I shall highlight the important feature improvements:
|
|
||||||
|
|
||||||
#### Multi-Page Document Support
|
|
||||||
|
|
||||||
![][4]
|
|
||||||
|
|
||||||
You can now create standard/custom-size pages in the same document, and finalize them by saving them as a multi-page PDF.
|
|
||||||
|
|
||||||
Not the ability to export, but you can also import a multi-page PDF to make things easy.
|
|
||||||
|
|
||||||
### Customize Color Palette
|
|
||||||
|
|
||||||
Easily change the size, reconfigure the colors to explore the available color palettes, and select the one you really like.
|
|
||||||
|
|
||||||
It should make things quicker when you require working with several color palettes in the user interface.
|
|
||||||
|
|
||||||
### New ‘Tiling’ Live Path Effect
|
|
||||||
|
|
||||||
If you are working with a large number of objects and want to explore path effects, the new tiling live path effect should be interesting.
|
|
||||||
|
|
||||||
You can easily tweak the mirroring mode, adjust the gap, add rows and columns, and get numerous opportunities to get creative.
|
|
||||||
|
|
||||||
### Layers and Object Dialog
|
|
||||||
|
|
||||||
![][5]
|
|
||||||
|
|
||||||
Most of the improvements make the experience more straightforward than it already was. With the new merged layers and object dialog, you can quickly organize/find objects per the layer you’re looking for.
|
|
||||||
|
|
||||||
You can even customize the layer and object colors to differentiate them.
|
|
||||||
|
|
||||||
### Export Dialog
|
|
||||||
|
|
||||||
![][6]
|
|
||||||
|
|
||||||
The export dialog now provides you options to choose a simple/batch export along with the ability to pick a file format and DPI settings.
|
|
||||||
|
|
||||||
### Other Improvements
|
|
||||||
|
|
||||||
In addition to the key highlights, some of the significant changes include:
|
|
||||||
|
|
||||||
* Two new modes of on-canvas snapping help align objects.
|
|
||||||
* You can choose the gradients right within the Fill and Stroke dialog box.
|
|
||||||
* The ability to edit a marker.
|
|
||||||
* Improved compatibility with extensions.
|
|
||||||
* Updated SVG font editor.
|
|
||||||
* Performance improvements.
|
|
||||||
* Configurable toolbar.
|
|
||||||
|
|
||||||
You can refer to the [Inkscape 1.2 release notes][7] to explore all the technical changes.
|
|
||||||
|
|
||||||
### Download Inkscape 1.2
|
|
||||||
|
|
||||||
You can download Inkscape 1.2 as an AppImage from its official website or check other available packages for Windows/macOS platforms.
|
|
||||||
|
|
||||||
[Inkscape 1.2][8]
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://news.itsfoss.com/inkscape-1-2-release/
|
|
||||||
|
|
||||||
作者:[Ankush Das][a]
|
|
||||||
选题:[lkxed][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://news.itsfoss.com/author/ankush/
|
|
||||||
[b]: https://github.com/lkxed
|
|
||||||
[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/inkscape-1-2.jpg
|
|
||||||
[2]: https://youtu.be/1U4hVbvRr_g
|
|
||||||
[3]: https://youtu.be/1U4hVbvRr_g
|
|
||||||
[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/inkscape-1-2-multi-document.jpg
|
|
||||||
[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/inkscape-1-2layers-objects-1024x593.jpg
|
|
||||||
[6]: https://news.itsfoss.com/wp-content/uploads/2022/05/inkscape1-2-export-1024x688.jpg
|
|
||||||
[7]: https://media.inkscape.org/media/doc/release_notes/1.2/Inkscape_1.2.html
|
|
||||||
[8]: https://inkscape.org/release/inkscape-1.2/
|
|
@ -1,114 +0,0 @@
|
|||||||
[#]: subject: "Kali Linux 2022.2 Release Adds an Amusing New Feature for the Hackers to Scare People"
|
|
||||||
[#]: via: "https://news.itsfoss.com/kali-linux-2022-2-release/"
|
|
||||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
|
||||||
[#]: collector: "lkxed"
|
|
||||||
[#]: translator: " "
|
|
||||||
[#]: reviewer: " "
|
|
||||||
[#]: publisher: " "
|
|
||||||
[#]: url: " "
|
|
||||||
|
|
||||||
Kali Linux 2022.2 Release Adds an Amusing New Feature for the Hackers to Scare People
|
|
||||||
======
|
|
||||||
Kali Linux 2022.2 is the second update for this year with some fascinating additions.
|
|
||||||
|
|
||||||
![kali linux][1]
|
|
||||||
|
|
||||||
Kali Linux is not your usual Linux distribution. It is specially tailored for penetration testing and ethical hackers to learn/experiment.
|
|
||||||
|
|
||||||
We get interesting tools and feature additions with a new Kali Linux release. Let us take a look at the highlights for Kali Linux 2022.2.
|
|
||||||
|
|
||||||
### Kali Linux 2022.2: What’s New?
|
|
||||||
|
|
||||||
Kali Linux 2022.2 is an intriguing release introducing updated desktop environments, upgrading the Linux Kernel, adding new tools, and more improvements.
|
|
||||||
|
|
||||||
Not just limited to the usual refinements, you also get to see a new screensaver with many surprising elements.
|
|
||||||
|
|
||||||
#### The New Screensaver with Hollywood Nostalgia
|
|
||||||
|
|
||||||
Kali Linux has been featured in numerous TV Shows/Movies (like Mr. Robot) where they focus on hacking, considering it looks cool.
|
|
||||||
|
|
||||||
To take it up a notch, Kali Linux has added a new screensaver (that you can separately install), with surprising elements from Hollywood and some hacking scenes to scare away people.
|
|
||||||
|
|
||||||
They tease Matrix’s Neo, and also add a beautiful Kali Linux logo in the screensaver.
|
|
||||||
|
|
||||||
![][2]
|
|
||||||
|
|
||||||
The entire screensaver includes several elements, which is awesome. To install and launch it immediately, you can type in the following commands:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo apt -y install kali-screensaver
|
|
||||||
sudo apt -y install hollywood-activate
|
|
||||||
hollywood-activate
|
|
||||||
```
|
|
||||||
|
|
||||||
In case, you just want the video for other platforms, you can download the video above (re-hosted from Kali Linux’s blog).
|
|
||||||
|
|
||||||
#### GNOME 42
|
|
||||||
|
|
||||||
![][3]
|
|
||||||
|
|
||||||
Kali Linux finally includes the new [GNOME 42][4] desktop environment. So, you should expect all the goodness of GNOME 42 with Kali Linux, including the new screenshot user interface.
|
|
||||||
|
|
||||||
Also, you will be getting a consistent dark/light theme experience now with the GNOME desktop environment.
|
|
||||||
|
|
||||||
![][5]
|
|
||||||
|
|
||||||
#### KDE Plasma 5.24
|
|
||||||
|
|
||||||
For KDE fans, Kali Linux 2022.2 brings in the new [KDE Plasma 5.24][6] LTS desktop environment.
|
|
||||||
|
|
||||||
![][7]
|
|
||||||
|
|
||||||
#### New Kali Linux Tools
|
|
||||||
|
|
||||||
The new tools are always the focus of every new release. Some of the new additions include:
|
|
||||||
|
|
||||||
* BruteShark – Network Forensic Analysis Tool (NFAT)
|
|
||||||
* Evil-WinRM – Ultimate WinRM shell
|
|
||||||
* Hakrawler – Web crawler designed for easy, quick discovery of endpoints and assets
|
|
||||||
* Httpx – Fast and multi-purpose HTTP toolkit
|
|
||||||
* Sparrow-wifi – Graphical Wi-Fi Analyzer for Linux
|
|
||||||
|
|
||||||
#### Other Improvements
|
|
||||||
|
|
||||||
There are many other substantial improvements with the release. The key highlights include:
|
|
||||||
|
|
||||||
* Tweaks for terminal to enhance syntax highlighting, autocompletion, and the output.
|
|
||||||
* Auomated copy of missing configurations
|
|
||||||
* VirtualBox shared folder support.
|
|
||||||
* Addition of new app icons.
|
|
||||||
* Default wallpaper tweaked for multi-monitor setups.
|
|
||||||
* Updates for ARM devices.
|
|
||||||
* Linux Kernel 5.16
|
|
||||||
|
|
||||||
To explore more about the release, you can check out the [official release announcement][8].
|
|
||||||
|
|
||||||
### Download Kali Linux 2022.2
|
|
||||||
|
|
||||||
You should be able to find the the image in the [official download page][9]. Choose the appropriate version as per your requirements and get it installed.
|
|
||||||
|
|
||||||
[Kali Linux 2022.2][10]
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://news.itsfoss.com/kali-linux-2022-2-release/
|
|
||||||
|
|
||||||
作者:[Ankush Das][a]
|
|
||||||
选题:[lkxed][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://news.itsfoss.com/author/ankush/
|
|
||||||
[b]: https://github.com/lkxed
|
|
||||||
[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/kali-2022-2-release-new.jpg
|
|
||||||
[2]: https://news.itsfoss.com/wp-content/uploads/2022/05/kali-linux-screensaver.jpg
|
|
||||||
[3]: https://news.itsfoss.com/wp-content/uploads/2022/05/kali-linux-gnome-42.jpg
|
|
||||||
[4]: https://news.itsfoss.com/gnome-42-features/
|
|
||||||
[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/kali-linux-gnome-42-screenshot.jpg
|
|
||||||
[6]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/
|
|
||||||
[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/kali-linux-kde-5-24-1024x640.jpg
|
|
||||||
[8]: https://www.kali.org/blog/kali-linux-2022-2-release/
|
|
||||||
[9]: https://www.kali.org/get-kali/
|
|
||||||
[10]: https://www.kali.org/get-kali/
|
|
@ -0,0 +1,41 @@
|
|||||||
|
[#]: subject: "Google To Start Distributing A Collection Of Open Source Software libraries"
|
||||||
|
[#]: via: "https://www.opensourceforu.com/2022/05/google-to-start-distributing-a-collection-of-open-source-software-libraries/"
|
||||||
|
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||||
|
[#]: collector: "lkxed"
|
||||||
|
[#]: translator: " "
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
Google To Start Distributing A Collection Of Open Source Software libraries
|
||||||
|
======
|
||||||
|
![][1]
|
||||||
|
|
||||||
|
On Tuesday, Google unveiled a new program aimed at safeguarding the open-source software supply chain by curating and delivering a security-vetted selection of open source packages to Google Cloud users. The business announced the new service, dubbed Assured Open Source Software, in a blog [post][2]. Andy Chang, Google Cloud’s group product manager for security and privacy, highlighted some of the problems of safeguarding open source software and emphasised Google’s commitment to open source in his blog post.
|
||||||
|
|
||||||
|
“There has been an increasing awareness in the developer community, enterprises, and governments of software supply chain risks,” Chang wrote, citing last year’s major log4j vulnerability as an example. “Google continues to be one of the largest maintainers, contributors, and users of open source and is deeply involved in helping make the open source software ecosystem more secure.”
|
||||||
|
|
||||||
|
According to Google, the Assured Open Source Software service will give Cloud clients access to Google’s substantial software auditing knowledge. According to Google, all open source packages made available through the service are also used internally by the corporation and are inspected and analysed for vulnerabilities on a regular basis.
|
||||||
|
|
||||||
|
A list of the 550 important open source libraries that Google is currently reviewing is available on [GitHub][3]. While these libraries may all be downloaded independently of Google, the Assured OSS program will see audited versions provided through Google Cloud, preventing developers from corrupting widely used open source libraries. This service is now in early access phase and will be ready for wider consumer testing in Q3 2022.
|
||||||
|
|
||||||
|
The Google statement is part of a broader industry effort to strengthen the security of the open source software supply chain, which has the support of the Biden administration. In January, representatives from the Department of Homeland Security and the Cybersecurity and Infrastructure Security Agency met with executives from some of the country’s major IT companies to examine open-source software security in the wake of the log4j bug. Since then, the corporations involved have pledged more than $30 million in financing to improve open source software security during a recent summit.
|
||||||
|
|
||||||
|
In addition to cash, Google is devoting engineering time to ensuring the supply chain’s security. The corporation has announced the development of a “Open Source Maintenance Crew” that will collaborate with library maintainers to improve security.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://www.opensourceforu.com/2022/05/google-to-start-distributing-a-collection-of-open-source-software-libraries/
|
||||||
|
|
||||||
|
作者:[Laveesh Kocher][a]
|
||||||
|
选题:[lkxed][b]
|
||||||
|
译者:[译者ID](https://github.com/译者ID)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://www.opensourceforu.com/author/laveesh-kocher/
|
||||||
|
[b]: https://github.com/lkxed
|
||||||
|
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/google3-1-e1652863988525.jpg
|
||||||
|
[2]: https://cloud.google.com/blog/products/identity-security/introducing-assured-open-source-software-service
|
||||||
|
[3]: https://github.com/google/oss-fuzz/tree/master/projects
|
@ -0,0 +1,144 @@
|
|||||||
|
[#]: subject: "ONLYOFFICE 7.1 Release Adds ARM Compatibility, a New PDF Viewer, and More Features"
|
||||||
|
[#]: via: "https://news.itsfoss.com/onlyoffice-7-1-release/"
|
||||||
|
[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/"
|
||||||
|
[#]: collector: "lkxed"
|
||||||
|
[#]: translator: " "
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
ONLYOFFICE 7.1 Release Adds ARM Compatibility, a New PDF Viewer, and More Features
|
||||||
|
======
|
||||||
|
ONLYOFFICE Docs 7.1 brings in much-awaited feature additions to its document, spreadsheet, and presentation programs. Supporting ARM devices is an icing on the cake!
|
||||||
|
|
||||||
|
![onlyoffice 7.1][1]
|
||||||
|
|
||||||
|
ONLYOFFICE, one of the [best open-source Microsoft Office alternatives][2], has just released its new upgrade, i.e., version 7.1.
|
||||||
|
|
||||||
|
If you didn’t know, you can use ONLYOFFICE with online integration on your self-hosted server (like Nextcloud) or the desktop.
|
||||||
|
|
||||||
|
This release brings exciting new changes, notably initial support for ARM-based devices like the Raspberry Pi.
|
||||||
|
|
||||||
|
Let’s take a look at what’s new!
|
||||||
|
|
||||||
|
### ONLYOFFICE 7.1: What’s New?
|
||||||
|
|
||||||
|
[<img src="https://i.ytimg.com/vi/5-ervHAemZc/hqdefault.jpg" alt="ONLYOFFICE Docs 7.1: PDF viewer, animations, print preview in spreadsheets">][3]
|
||||||
|
|
||||||
|
![][4]
|
||||||
|
|
||||||
|
Alongside the headline feature of ARM support, ONLYOFFICE 7.1 has new feature additions on offer. These include:
|
||||||
|
|
||||||
|
* A brand-new PDF, XPS, and DjVu file viewer
|
||||||
|
* More convenient and customizable shape options
|
||||||
|
* Spreadsheets Print Preview
|
||||||
|
* Animations in Presentations
|
||||||
|
* SmartArt Object Support
|
||||||
|
|
||||||
|
#### ARM Compatibility
|
||||||
|
|
||||||
|
As ARM-based devices like the Raspberry Pi become more popular each year, many expected the support for ARM architecture by ONLYOFFICE for a while.
|
||||||
|
|
||||||
|
With the 7.1 release, ONLYOFFICE Docs 7.1 now runs on all ARM64 devices. Thanks to the increased efficiency and security of ARM devices, I suspect this will have a massive impact on the future of ONLYOFFICE.
|
||||||
|
|
||||||
|
#### Brand-new PDF, XPS, and DjVu file viewer
|
||||||
|
|
||||||
|
![onlyoffice][5]
|
||||||
|
|
||||||
|
This is a key feature that many other office programs have had for years. Starting with ONLYOFFICE 7.1, users can now use the document editor to view PDF, XPS, and DjVu files much more conveniently.
|
||||||
|
|
||||||
|
With the capability to open files on the client-side, the new view mode offers users a page thumbnails view and a navigation bar in a much more compact and simplified view.
|
||||||
|
|
||||||
|
Additionally, users can now also convert these PDF files to DOCX files so that you can edit them. As a result, people shouldn’t need to go open multiple different apps to be able to work with the same file, which should help alleviate some major bottlenecks in workflows.
|
||||||
|
|
||||||
|
#### More convenient and customizable shape options
|
||||||
|
|
||||||
|
![onlyoffice][6]
|
||||||
|
|
||||||
|
Often under-used (I think), shapes are a great feature of modern office applications. Although ONLYOFFICE has had them for quite some time now, they have always been rather clunky to work with.
|
||||||
|
|
||||||
|
However, with ONLYOFFICE 7.1, this changes thanks to a redesigned shape selection menu. This new menu closely resembles its Microsoft Office equivalent, with each icon being visible from within the menu.
|
||||||
|
|
||||||
|
Additionally, it now shows the recently used shapes to make repetitive shape insertion easier.
|
||||||
|
|
||||||
|
The final improvement to shapes is the ability to edit them using your mouse. This should be quite familiar for those of you familiar with graphic design software like Inkscape. By simply dragging the points around, you can create a unique shape in almost no time!
|
||||||
|
|
||||||
|
#### Spreadsheets Print Preview
|
||||||
|
|
||||||
|
![][7]
|
||||||
|
|
||||||
|
I’m sure everyone can relate to the frustration when a print fails due to a simple mistake. While other programs solved this problem a while ago, it has remained noticeably absent in the ONLYOFFICE spreadsheet editor.
|
||||||
|
|
||||||
|
Fortunately, this release looks to rectify this, thanks to the introduction of “Print Preview.”
|
||||||
|
|
||||||
|
To be honest, there’s not a lot to say about this, just that it should save a lot of paper and printer frustrations.
|
||||||
|
|
||||||
|
#### New Animation Tab, Move Slides, and Duplicate Slide
|
||||||
|
|
||||||
|
![][8]
|
||||||
|
|
||||||
|
For those of you who make countless presentations with animations, a separate animation tab has been added with this release, making things easier.
|
||||||
|
|
||||||
|
ONLYOFFICE 7.1 presentation editor now supports a variety of animations along with the ability to move slides to the beginning/end of a presentation and duplicate a slide.
|
||||||
|
|
||||||
|
#### SmartArt Object Support
|
||||||
|
|
||||||
|
SmartArt is an easy way to make custom graphics in documents, presentations, and spreadsheets. However, it has always been a Microsoft Office-focused feature. Although various other applications have had varying levels of support for the format, they have never really been comparable to Microsoft Office.
|
||||||
|
|
||||||
|
Fortunately, ONLYOFFICE 7.1 now fully supports this format without any “hacks”, like what used to be required. Unlike the old process of converting the objects to a group of figures, Smart Art is now handled seamlessly and without problems.
|
||||||
|
|
||||||
|
### Other Changes
|
||||||
|
|
||||||
|
Other significant refinements in ONLYOFFICE 7.1 include:
|
||||||
|
|
||||||
|
* New interface languages – Galician and Azerbaijani
|
||||||
|
* Ability to view a password while entering it in password-protected files
|
||||||
|
* Zoom options in OFORM files
|
||||||
|
* Ability to filter comments by groups of users
|
||||||
|
* Pyramid chart support
|
||||||
|
* Pyramid bar chart support
|
||||||
|
* Vertical and horizontal cylinder chart support
|
||||||
|
* Vertical and horizontal cone chart support
|
||||||
|
* Move and duplicate slide options in the context menu
|
||||||
|
* Formula tooltips
|
||||||
|
* New currency support
|
||||||
|
|
||||||
|
For a complete list of changes, I highly suggest you look at the [release notes][9].
|
||||||
|
|
||||||
|
### Download ONLYOFFICE 7.1
|
||||||
|
|
||||||
|
Overall, ONLYOFFICE 7.1 looks to be a great release with ARM compatibility and new features.
|
||||||
|
|
||||||
|
You should find the latest version available for all editions (Enterprise, Developer, Community).
|
||||||
|
|
||||||
|
Plenty of different packages are available, including Docker images for ARM editions, a Snap package, and 1-click app options for cloud providers. You can head to its download page and look for the appropriate installer.
|
||||||
|
|
||||||
|
The download page also mentions the official instructions to get it installed.
|
||||||
|
|
||||||
|
[Get ONLYOFFICE 7.1][10]
|
||||||
|
|
||||||
|
*Have you tried the new update yet?*
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://news.itsfoss.com/onlyoffice-7-1-release/
|
||||||
|
|
||||||
|
作者:[Jacob Crume][a]
|
||||||
|
选题:[lkxed][b]
|
||||||
|
译者:[译者ID](https://github.com/译者ID)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://news.itsfoss.com/author/jacob/
|
||||||
|
[b]: https://github.com/lkxed
|
||||||
|
[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/onlyoffice-7-1.jpg
|
||||||
|
[2]: https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/
|
||||||
|
[3]: https://youtu.be/5-ervHAemZc
|
||||||
|
[4]: https://youtu.be/5-ervHAemZc
|
||||||
|
[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/ONLYOFFICE-viewer.png
|
||||||
|
[6]: https://news.itsfoss.com/wp-content/uploads/2022/05/ONLYOFFICE-shapes.png
|
||||||
|
[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/ONLYOFFICE-Print-Preview.png
|
||||||
|
[8]: https://news.itsfoss.com/wp-content/uploads/2022/05/ONLYOFFICE-Animations.png
|
||||||
|
[9]: https://www.onlyoffice.com/blog/2022/05/discover-onlyoffice-docs-v7-1/
|
||||||
|
[10]: https://www.onlyoffice.com/download-docs.aspx
|
@ -1,84 +0,0 @@
|
|||||||
[#]: subject: "How open source leads the way for sustainable technology"
|
|
||||||
[#]: via: "https://opensource.com/article/22/5/open-source-sustainable-technology"
|
|
||||||
[#]: author: "Hannah Smith https://opensource.com/users/hanopcan"
|
|
||||||
[#]: collector: "lkxed"
|
|
||||||
[#]: translator: "PeterPan0106"
|
|
||||||
[#]: reviewer: " "
|
|
||||||
[#]: publisher: " "
|
|
||||||
[#]: url: " "
|
|
||||||
|
|
||||||
How open source leads the way for sustainable technology
|
|
||||||
======
|
|
||||||
There are huge parallels between the open source way and what our wider society needs to do to achieve a more sustainable future.
|
|
||||||
|
|
||||||
![][1]
|
|
||||||
(Image by: opensource.com)
|
|
||||||
|
|
||||||
There's a palpable change in the air regarding sustainability and environmental issues. Concern for the condition of the planet and efforts to do something about it have gone mainstream. To take one example, look at climate-based venture capitalism. The Climate Tech Venture Capital (CTVC) Climate Capital List has [more than doubled][2] in the past two years. The amount of capital pouring in demonstrates a desire and a willingness to solve hard climate challenges.
|
|
||||||
|
|
||||||
It's great that people want to take action, and I'm here for it! But I also see a real risk: As people rush to take action or jump on the bandwagon, they may unwittingly participate in greenwashing.
|
|
||||||
|
|
||||||
The Wikipedia definition of greenwashing calls it "a form of marketing spin in which green PR and green marketing are deceptively used to persuade the public that an organization's products, aims, and policies are environmentally friendly." In my view, greenwashing happens both intentionally and accidentally. There are a lot of good people out there who want to make a difference but don't yet know much about complex environmental systems or the depth of issues around sustainability.
|
|
||||||
|
|
||||||
It's easy to fall into the trap of thinking a simple purchase like offsetting travel or datacenter emissions by planting trees will make something greener. While these efforts are welcome, and planting trees is a viable solution to improving sustainability, they are only a good first step—a scratch on the surface of what needs to happen to make a real difference.
|
|
||||||
|
|
||||||
So what can a person, or a community, do to make digital technology genuinely more sustainable?
|
|
||||||
|
|
||||||
Sustainability has different meanings to different people. The shortest definition that I like is from the 1987 Bruntland Report, which summarizes it as "meeting the needs of the present without compromising the ability of future generations to meet their needs." Sustainability at its core is prioritizing long-term thinking.
|
|
||||||
|
|
||||||
### Sustainability is more than environmental preservation
|
|
||||||
|
|
||||||
There are three key interconnected pillars in the definition of sustainability:
|
|
||||||
|
|
||||||
1. Environmental
|
|
||||||
2. Economic / governance
|
|
||||||
3. Social
|
|
||||||
|
|
||||||
Conversations about sustainability are increasingly dominated by the climate crisis—for good reason. The need to reduce the amount of carbon emissions emitted by the richer countries in the world becomes increasingly urgent as we continue to pass irreversible ecological tipping points. But true sustainability is a much more comprehensive set of considerations, as demonstrated by the three pillars.
|
|
||||||
|
|
||||||
Carbon emissions are most certainly a part of sustainability. Many people consider emissions only an environmental issue: Just take more carbon out of the air, and everything will be ok. But social issues are just as much a part of sustainability. Who is affected by these carbon emissions? Who stands to bear the greatest impact from changes to our climate? Who has lost their land due to rising sea levels or a reliable water source due to changing weather patterns? That's why you might have heard the phrase "climate justice is social justice."
|
|
||||||
|
|
||||||
Thinking only about decarbonization as sustainability can give you carbon tunnel vision. I often think that climate change is a symptom of society getting sustainability wrong on a wider scale. Instead, it is critical to address the root causes that brought about climate change in the first place. Tackling these will make it possible to fix the problems in the long term, while a short-term fix may only push the issue onto another vulnerable community.
|
|
||||||
|
|
||||||
The root causes are complex. But if I follow them back to their source, I see that the root causes are driven by dominant Western values and the systems designed to perpetuate those values. And what are those values? For the most part, they are short-term growth and the extraction of profit above all else.
|
|
||||||
|
|
||||||
That is why conversations about sustainability that don't include social issues or how economies are designed won't reach true solutions. After all, societies, and the people in positions of power, determine what their own values are—or aren't.
|
|
||||||
|
|
||||||
### What can you or I do?
|
|
||||||
|
|
||||||
Many in the tech sector are currently grappling with these issues and want to know how to take meaningful action. One common approach is looking at how to optimize the tech they build so that it uses electricity more effectively. Sixty percent of the world's electricity is still generated by burning fossil fuels, despite the increasing capacity for renewable energy generation. Logically, using less electricity means generating fewer carbon emissions.
|
|
||||||
|
|
||||||
And yes, that is a meaningful action that anyone can take right now, today. Optimizing the assets sent when someone loads a page to send less data will use less energy. So will optimizing servers to run at different times of the day, for example when there are more renewables online, or deleting old stores of redundant information, such as analytics data or logs.
|
|
||||||
|
|
||||||
But consider Jevon's paradox: Making something more efficient often leads to using more of it, not less. When it is easier and more accessible for people to use something, they end up consuming more. In some ways, that is good. Better performing tech is a good thing that helps increase inclusion and accessibility, and that's good for society. But long-term solutions for climate change and sustainability require deeper, more uncomfortable conversations around the relationship between society and technology. What and who is all this technology serving? What behaviors and practices is it accelerating?
|
|
||||||
|
|
||||||
It's common to view advancing technology as progress, and some people repeat the mantra that technology will save the world from climate change. A few bright folks will do the hard work, so no one else has to change their ways. The problem is that many communities and ecosystems are already suffering.
|
|
||||||
|
|
||||||
For example, the accelerating quest for more data is causing some communities in Chile to have insufficient water to grow their crops. Instead, datacenters are using it. Seventy percent of the pollution caused by mobile phones comes from their manufacture. The raw resources such as lithium and cobalt to make and power mobile devices are usually extracted from a community that has little power to stop the destruction of their land and that certainly does not partake in the profit made. Still, the practice of upgrading your phone every two years has become commonplace.
|
|
||||||
|
|
||||||
### Open source leading the way for sustainability
|
|
||||||
|
|
||||||
It's time to view the use of digital technology as a precious resource with consequences to both the planet and (often already disadvantaged) communities.
|
|
||||||
|
|
||||||
The open source community is already a leading light in helping people to realize there is another way: the open source way. There are huge parallels between the open source way and what our wider society needs to do to achieve a more sustainable future. Being more open and inclusive is a key part of that.
|
|
||||||
|
|
||||||
We also need a mindset shift at all levels of society that views digital technology as having growth limits and not as the abundantly cheap and free thing we see today. We need to wisely prioritize its application in society to the things that matter. And above all else, we need to visualize and eradicate the harms from its creation and continued use and share the wealth that is does create equitably with everyone in society, whether they are users of digital tech or not. These things aren’t going to happen overnight, but they are things we can come together to push towards so that we all enjoy the benefits of digital technology for the long-term, sustainably.
|
|
||||||
|
|
||||||
This article is based on a longer presentation. To see the talk in full or view the slides, see the post ["How can we make digital technology more sustainable."][3]
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://opensource.com/article/22/5/open-source-sustainable-technology
|
|
||||||
|
|
||||||
作者:[Hannah Smith][a]
|
|
||||||
选题:[lkxed][b]
|
|
||||||
译者:[PeterPan0106](https://github.com/PeterPan0106)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://opensource.com/users/hanopcan
|
|
||||||
[b]: https://github.com/lkxed
|
|
||||||
[1]: https://opensource.com/sites/default/files/pictures/green-780x400.jpg
|
|
||||||
[2]: https://climatetechvc.substack.com/p/-a-running-list-of-climate-tech-vcs?s=w
|
|
||||||
[3]: https://opcan.co.uk/talk/wordfest-live-2022
|
|
@ -1,5 +1,5 @@
|
|||||||
[#]: collector: (lujun9972)
|
[#]: collector: (lujun9972)
|
||||||
[#]: translator: ( )
|
[#]: translator: (Starryi)
|
||||||
[#]: reviewer: ( )
|
[#]: reviewer: ( )
|
||||||
[#]: publisher: ( )
|
[#]: publisher: ( )
|
||||||
[#]: url: ( )
|
[#]: url: ( )
|
||||||
|
@ -1,109 +0,0 @@
|
|||||||
[#]: subject: "How To Enable Minimize And Maximize Buttons In Fedora 36 Workstation"
|
|
||||||
[#]: via: "https://ostechnix.com/how-to-enable-minimize-and-maximize-buttons-in-fedora/"
|
|
||||||
[#]: author: "sk https://ostechnix.com/author/sk/"
|
|
||||||
[#]: collector: "lkxed"
|
|
||||||
[#]: translator: "geekpi"
|
|
||||||
[#]: reviewer: " "
|
|
||||||
[#]: publisher: " "
|
|
||||||
[#]: url: " "
|
|
||||||
|
|
||||||
How To Enable Minimize And Maximize Buttons In Fedora 36 Workstation
|
|
||||||
======
|
|
||||||
Today, we will see one of the post installation steps in Fedora desktop. This brief guide explains how to enable minimize and maximize buttons in application windows in Fedora GNOME Workstation and Silverblue editions.
|
|
||||||
|
|
||||||
### Introduction
|
|
||||||
|
|
||||||
As you may already know, there is no minimize and maximize buttons in Application windows in Fedora Silverblue as well as Fedora GNOME Workstation editions.
|
|
||||||
|
|
||||||
If you want to minimize an application window, you need to right click on its title bar and choose the minimize option from the context menu.
|
|
||||||
|
|
||||||
Unfortunately, you don't even get that option in Firefox with your mouse. To minimize Firefox window, you should hit the **Left ALT+SPACEBAR** keys and choose Minimize option.
|
|
||||||
|
|
||||||
I don't know what is the benefit of hiding most frequently used buttons. Ubuntu GNOME desktop has the min/max buttons, but Fedora hasn't.
|
|
||||||
|
|
||||||
If you want to bring back the minimize and maximize buttons in Fedora GNOME and Silverblue editions, you can enable them with the help of **Gnome Tweaks** utility and **Dash to Panel** extension in Fedora.
|
|
||||||
|
|
||||||
### Install Gnome Tweaks in Fedora
|
|
||||||
|
|
||||||
**Gnome Tweaks**, previously known as **Tweak Tool**, is a Graphical interface for advanced GNOME 3 settings. It is primarily designed for GNOME Shell, however it can be used in other desktops as well. You may not have all features if you use Tweaks on a different desktop. It is available in the default repositories of Fedora. So you can install Gnome Tweaks on Fedora using `dnf` package manager like below:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo dnf install gnome-tweaks
|
|
||||||
```
|
|
||||||
|
|
||||||
If you are on Fedora Silverblue, you need to enter into your toolbox container using command:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ toolbox enter
|
|
||||||
```
|
|
||||||
|
|
||||||
And then install Tweaks as shown in the previous command.
|
|
||||||
|
|
||||||
### Add Gnome Shell Integration Add-on In Browser
|
|
||||||
|
|
||||||
Make sure you have added **"Gnome Shell Integration"** add-on in your browser. This extension provides integration with GNOME shell and the corresponding extensions repository.
|
|
||||||
|
|
||||||
If you haven't added it yet, go to Plugins sections and search for it and install it.
|
|
||||||
|
|
||||||
![Add Gnome Shell Integration Add-on In Firefox Browser][1]
|
|
||||||
|
|
||||||
A pop up window will appear. Click "Add" to enable the add-on. After adding this extension, you will see the GNOME logo on the browser's tool bar.
|
|
||||||
|
|
||||||
### Enable Dash to panel extension in Fedora
|
|
||||||
|
|
||||||
The **Dash to panel** extension is an icon taskbar for the Gnome Shell. This extension moves the dash into the gnome main panel so that the application launchers and system tray are combined into a single panel, similar to that found in KDE Plasma and Windows 7+ operating systems.
|
|
||||||
|
|
||||||
The Dash to panel extension gives you a permanently visible panel with favorite shortcuts. So a separate dock is no longer needed for easy access to running and favorited applications.
|
|
||||||
|
|
||||||
To enable Dash to panel extension, go to **GNOME extensions** site and search for **"Dash to panel"** extension.
|
|
||||||
|
|
||||||
![Search for Dash to panel extension in Gnome extensions site][2]
|
|
||||||
|
|
||||||
Click the Dash to panel link in the search results. You will be redirected to Dash to panel extension official page. Click on the **ON** button.
|
|
||||||
|
|
||||||
![Enable Dash to panel extension][3]
|
|
||||||
|
|
||||||
In the next window, click Install button to enable Dash to panel extension.
|
|
||||||
|
|
||||||
![Install Dash to panel extension][4]
|
|
||||||
|
|
||||||
One this extension is activated, you will see the Dash panel at the bottom along with your favorite shortcuts.
|
|
||||||
|
|
||||||
### Enable minimize and maximize buttons in Fedora
|
|
||||||
|
|
||||||
Open the **Gnome Tweaks** application. Go to **Windows Tittlebars** and toggle min/max buttons on.
|
|
||||||
|
|
||||||
![Enable minimize and maximize buttons in application windows in Fedora][5]
|
|
||||||
|
|
||||||
As soon as you toggled the min/max buttons on, the minimize and maximize buttons will appear in all applications windows.
|
|
||||||
|
|
||||||
![Minimize, maximize buttons appears in applications windows in Fedora][6]
|
|
||||||
|
|
||||||
By default, the min/max buttons are visible at the right side. You can change its position to left or right.
|
|
||||||
|
|
||||||
The Dash to panel extension has lots of fine tuning and customization options. Right click on the Dash panel and choose Settings option and start customizing it as per your liking.
|
|
||||||
|
|
||||||
**Resource:**
|
|
||||||
|
|
||||||
* [Dash to panel website][7]
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://ostechnix.com/how-to-enable-minimize-and-maximize-buttons-in-fedora/
|
|
||||||
|
|
||||||
作者:[sk][a]
|
|
||||||
选题:[lkxed][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://ostechnix.com/author/sk/
|
|
||||||
[b]: https://github.com/lkxed
|
|
||||||
[1]: https://ostechnix.com/wp-content/uploads/2022/05/Add-Gnome-Shell-Integration-Add-on-In-Firefox-Browser.png
|
|
||||||
[2]: https://ostechnix.com/wp-content/uploads/2021/01/Search-for-Dash-to-panel-extension-in-Gnome-extensions-site.png
|
|
||||||
[3]: https://ostechnix.com/wp-content/uploads/2021/01/Enable-Dash-to-panel-extension.png
|
|
||||||
[4]: https://ostechnix.com/wp-content/uploads/2021/01/Install-Dash-to-panel-extension.png
|
|
||||||
[5]: https://ostechnix.com/wp-content/uploads/2021/01/Enable-Minimize-And-Maximize-Buttons-In-Application-Windows-In-Fedora.png
|
|
||||||
[6]: https://ostechnix.com/wp-content/uploads/2021/01/Minimize-maximize-buttons-appears-in-applications-windows-in-Fedora.png
|
|
||||||
[7]: https://extensions.gnome.org/extension/1160/dash-to-panel/
|
|
@ -2,7 +2,7 @@
|
|||||||
[#]: via: "https://ostechnix.com/reset-root-password-in-fedora/"
|
[#]: via: "https://ostechnix.com/reset-root-password-in-fedora/"
|
||||||
[#]: author: "sk https://ostechnix.com/author/sk/"
|
[#]: author: "sk https://ostechnix.com/author/sk/"
|
||||||
[#]: collector: "lkxed"
|
[#]: collector: "lkxed"
|
||||||
[#]: translator: " "
|
[#]: translator: "geekpi"
|
||||||
[#]: reviewer: " "
|
[#]: reviewer: " "
|
||||||
[#]: publisher: " "
|
[#]: publisher: " "
|
||||||
[#]: url: " "
|
[#]: url: " "
|
||||||
|
@ -1,130 +0,0 @@
|
|||||||
[#]: subject: "Structured Data Processing with Spark SQL"
|
|
||||||
[#]: via: "https://www.opensourceforu.com/2022/05/structured-data-processing-with-spark-sql/"
|
|
||||||
[#]: author: "Phani Kiran https://www.opensourceforu.com/author/phani-kiran/"
|
|
||||||
[#]: collector: "lkxed"
|
|
||||||
[#]: translator: "geekpi"
|
|
||||||
[#]: reviewer: " "
|
|
||||||
[#]: publisher: " "
|
|
||||||
[#]: url: " "
|
|
||||||
|
|
||||||
Structured Data Processing with Spark SQL
|
|
||||||
======
|
|
||||||
Spark SQL is the module in the Spark ecosystem that processes data in a structured format. It internally uses the Spark Core API for its process, but the usage is abstracted from the user. This article dives a little deeper and tells you what’s new in Spark SQL 3.x.
|
|
||||||
|
|
||||||
![][1]
|
|
||||||
|
|
||||||
with Spark SQL, users can also write SQL-styled queries. This is essentially helpful for the wide user community that is proficient in structured query language or SQL. Users will also be able to write interactive and ad hoc queries on the structured data. Spark SQL bridges the gap between resilient distributed data sets (RDDs) and relational tables. An RDD is the fundamental data structure of Spark. It stores data as distributed objects across a cluster of nodes suitable for parallel processing. RDDs are good for low-level processing, but are difficult to debug during runtime and programmers cannot automatically infer schema. Also, there is no built-in optimisation for RDDs. Spark SQL provides the DataFrames and data sets to address these issues.
|
|
||||||
|
|
||||||
Spark SQL can use the existing Hive metastore, SerDes, and UDFs. It can connect to existing BI tools using JDBC/ODBC.
|
|
||||||
|
|
||||||
### Data sources
|
|
||||||
|
|
||||||
Big Data processing often needs the ability to process different file types and data sources (relational and non-relational). Spark SQL supports a unified DataFrame interface to process different types of sources, as given below.
|
|
||||||
|
|
||||||
*Files:*
|
|
||||||
|
|
||||||
* CSV
|
|
||||||
* Text
|
|
||||||
* JSON
|
|
||||||
* XML
|
|
||||||
|
|
||||||
*JDBC/ODBC:*
|
|
||||||
|
|
||||||
* MySQL
|
|
||||||
* Oracle
|
|
||||||
* Postgres
|
|
||||||
|
|
||||||
*Files with schema:*
|
|
||||||
|
|
||||||
* AVRO
|
|
||||||
* Parquet
|
|
||||||
|
|
||||||
*Hive tables:*
|
|
||||||
|
|
||||||
* Spark SQL also supports reading and writing data stored in Apache Hive.
|
|
||||||
|
|
||||||
With DataFrame, users can seamlessly read these diversified data sources and do transformations/joins on them.
|
|
||||||
|
|
||||||
### What’s new in Spark SQL 3.x
|
|
||||||
|
|
||||||
In the previous releases (Spark 2.x), the query plans were based on heuristics rules and cost estimation. The process from parsing to logical and physical query planning, and finally to optimisation was sequential. These releases had little visibility into the runtime characteristics of transformations and actions. Hence, the query plan was suboptimal because of the following reasons:
|
|
||||||
|
|
||||||
* Missing and outdated statistics
|
|
||||||
* Suboptimal heuristics
|
|
||||||
* Wrong estimation of costs
|
|
||||||
|
|
||||||
Spark 3.x has enhanced this process by using runtime data for iteratively improving the query planning and optimisation. The runtime statistics of a prior stage are used to optimise the query plan for subsequent stages. There is a feedback loop that helps to re-plan and re-optimise the execution plan.
|
|
||||||
|
|
||||||
![Figure 1: Query planning][2]
|
|
||||||
|
|
||||||
#### Adaptive query execution (AQE)
|
|
||||||
|
|
||||||
The query is changed to a logical plan and finally to a physical plan. The concept here is ‘reoptimisation’. It takes the data available during the prior stage and reoptimises for subsequent stages. Because of this, the overall query execution is much faster.
|
|
||||||
|
|
||||||
AQE can be enabled by setting the SQL configuration, as given below (default false in Spark 3.0):
|
|
||||||
|
|
||||||
```
|
|
||||||
spark.conf.set(“spark.sql.adaptive.enabled”,true)
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Dynamically coalescing shuffle partitions
|
|
||||||
|
|
||||||
Spark determines the optimum number of partitions after a shuffle operation. With AQE, Spark uses the default number of partitions, which is 200. This can be enabled by the configuration:
|
|
||||||
|
|
||||||
```
|
|
||||||
spark.conf.set(“spark.sql.adaptive.coalescePartitions.enabled”,true)
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Dynamically switching join strategies
|
|
||||||
|
|
||||||
Broadcast Hash is the best join operation. If one of the data sets is small, Spark can dynamically switch to Broadcast join instead of shuffling large amounts of data across the network.
|
|
||||||
|
|
||||||
#### Dynamically optimising skew joins
|
|
||||||
|
|
||||||
If the data dispersion is not uniform, data will be skewed and there will be a few large partitions. These partitions take up a lot of time. Spark 3.x optimises this by splitting the large partitions into multiple small partitions. This can be enabled by setting:
|
|
||||||
|
|
||||||
```
|
|
||||||
spark.conf.set(“spark.sql.adaptive.skewJoin.enabled”,true)
|
|
||||||
```
|
|
||||||
|
|
||||||
![Figure 2: Performance improvement in Spark 3.x (Source: Databricks)][3]
|
|
||||||
|
|
||||||
### Other enhancements
|
|
||||||
|
|
||||||
|
|
||||||
In addition, Spark SQL 3.x supports the following.
|
|
||||||
|
|
||||||
#### Dynamic partition pruning
|
|
||||||
|
|
||||||
3.x will only read the partitions that are relevant based on the values from one of the tables. This eliminates the need to parse the big tables.
|
|
||||||
|
|
||||||
#### Join hints
|
|
||||||
|
|
||||||
This allows users to specify the join strategy to be used if the user has knowledge of the data. This enhances the query execution process.
|
|
||||||
|
|
||||||
#### ANSI SQL compliant
|
|
||||||
|
|
||||||
In the earlier versions of Spark, which are Hive compliant, we could use certain keywords in the query which would work perfectly fine. However, this is not allowed in Spark SQL 3, which has full ANSI SQL support. For example, ‘cast a string to integer’ will throw runtime exception. It also supports reserved keywords.
|
|
||||||
|
|
||||||
#### Newer Hadoop, Java and Scala versions
|
|
||||||
|
|
||||||
From Spark 3.0 onwards, Java 11 and Scala 2.12 are supported. Java 11 has better native coordination and garbage correction, which results in better performance. Scala 2.12 exploits new features of Java 8 and is better than 2.11.
|
|
||||||
|
|
||||||
Spark 3.x has provided these useful features off-the-shelf instead of developers worrying about them. This will improve the overall performance of Spark significantly.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://www.opensourceforu.com/2022/05/structured-data-processing-with-spark-sql/
|
|
||||||
|
|
||||||
作者:[Phani Kiran][a]
|
|
||||||
选题:[lkxed][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://www.opensourceforu.com/author/phani-kiran/
|
|
||||||
[b]: https://github.com/lkxed
|
|
||||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Spark-SQL-Data-cluster.jpg
|
|
||||||
[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-Query-planning.jpg
|
|
||||||
[3]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-2-Performance-improvement-in-Spark-3.x-Source-Databricks.jpg
|
|
@ -0,0 +1,548 @@
|
|||||||
|
[#]: subject: "A guide to Pipy, a programmable network proxy for cloud"
|
||||||
|
[#]: via: "https://opensource.com/article/22/5/pipy-programmable-network-proxy-cloud"
|
||||||
|
[#]: author: "Ali Naqvi https://opensource.com/users/alinaqvi"
|
||||||
|
[#]: collector: "lkxed"
|
||||||
|
[#]: translator: " "
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
A guide to Pipy, a programmable network proxy for cloud
|
||||||
|
======
|
||||||
|
Pipy is an open source, extremely fast, and lightweight network traffic processor. It has a variety of use cases including edge routers, load balancing and proxying, API gateways, static HTTP servers, service mesh sidecars, and many other applications.
|
||||||
|
|
||||||
|
![Woman using laptop concentrating][1]
|
||||||
|
Image by Mapbox Uncharted ERG, [CC-BY 3.0 US][2]
|
||||||
|
|
||||||
|
Pipy is an open source, cloud-native, network stream processor. It is modular by design and can create a high-performance network proxy. It's written in C++ and is built on top of the Asio asynchronous I/O library. Pipy is ideal for a variety of use cases ranging from edge routers, load balancers, proxy solutions, API gateways, static HTTP servers, service mesh sidecars, and more.
|
||||||
|
|
||||||
|
Pipy also comes with built-in JavaScript support through PipyJS. PipyJS is highly customizable and predictable in performance, with no garbage collection overhead. Currently, PipyJS is part of the Pipy code base, but it has no dependency on it and in the future it may be moved to a standalone package.
|
||||||
|
|
||||||
|
### Pipy quick start guide
|
||||||
|
|
||||||
|
You can run the production version of Pipy using Podman or Docker with one of the tutorial scripts provided on the official Pipy Git repository. The Pipy container image can be configured with a few environment variables:
|
||||||
|
|
||||||
|
* PIPY_CONFIG_FILE=</path/to/config-file> sets the location of the Pipy configuration file.
|
||||||
|
* PIPY_SPAWN=n sets the number of Pipy instances you want to start, where n is the number of instances. This is a zero-based index, so 0 represents 1 instance. For example, use PIPY_SPAWN=3 for 4 instances.
|
||||||
|
|
||||||
|
Start the Pipy server with this example script:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ docker run --rm -e PIPY_CONFIG_FILE=\
|
||||||
|
https://raw.githubusercontent.com/flomesh-io/pipy/main/tutorial/01-hello \
|
||||||
|
-e PIPY_SPAWN=1 -p 8080:8080 flomesh/pipy-pjs:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
You may notice that instead of a local file, this code provides a link to a remote Pipy script through the environment variable `PIPY_CONFIG_FILE`. Pipy is smart enough to handle that.
|
||||||
|
|
||||||
|
For your reference, here are the contents of the file `tutorial/01-hello/hello.js` :
|
||||||
|
|
||||||
|
```
|
||||||
|
pipy()
|
||||||
|
.listen(8080)
|
||||||
|
.serveHTTP(
|
||||||
|
new Message('Hi, there!\n')
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
This simple script defines one Port pipeline, which listens on port 8080 and returns "Hi, there!" for each HTTP request received on the listening port.
|
||||||
|
|
||||||
|
As you've exposed local port 8080 with the docker run command, you can proceed with a test on the same port:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ curl http://localhost:8080
|
||||||
|
```
|
||||||
|
|
||||||
|
Executing the above command displays `Hi, there!` on the console.
|
||||||
|
|
||||||
|
For learning, development, or debugging purposes it's recommended to proceed with the local installation (either build Pipy from sources or download a release for your OS) of Pipy, as it comes with an admin web console along with documentation and tutorials.
|
||||||
|
|
||||||
|
Once installed locally, running `pipy` without any arguments starts the admin console on port 6060, but it can be configured to listen on the different port with the `--admin-port` option.
|
||||||
|
|
||||||
|
![Pipy admin console listening on port 6060][3]
|
||||||
|
|
||||||
|
To build Pipy from source, or to install a precompiled binary for your operating system, refer to README.md on the [Pipy][4] Git repository.
|
||||||
|
|
||||||
|
#### Running Pipy in a terminal
|
||||||
|
|
||||||
|
To start a Pipy proxy, run Pipy with a PipyJS script file, for example, the script in `tutorial/01-hello/hello.js` if you need a simple echo server that responds with the same message body received with every incoming request:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ pipy tutorial/01-hello/hello.js
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively, while developing and debugging, one can start Pipy with a builtin web UI:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ pipy tutorial/01-hello/hello.js --admin-port=6060
|
||||||
|
```
|
||||||
|
|
||||||
|
To see all command-line options, use the `--help` flag:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ pipy --help
|
||||||
|
```
|
||||||
|
|
||||||
|
### Pipy is a stream processor
|
||||||
|
|
||||||
|
Pipy operates on network streams using an event-driven pipeline where it consumes the input stream, performs user-provided transformations, and outputs the stream. A pipy data stream takes raw data and abstracts it into an event. An event can belong to one of four categories:
|
||||||
|
|
||||||
|
* Data: Network streams are composed of data bytes and come in chunks. Pipy abstracts out chunks into a Data event.
|
||||||
|
* MessageStart, MessageEnd, StreamEnd: These three non-data events work as markers, giving the raw byte streams high-level semantics for business logic to rely on.
|
||||||
|
|
||||||
|
### Pipy Design
|
||||||
|
|
||||||
|
The internal workings of Pipy are similar to [Unix Pipelines][5] but unlike Unix pipelines, which deal with discreet bytes, Pipy deals with streams of events.
|
||||||
|
|
||||||
|
Pipy processes incoming streams through a chain of filters, where each filter deals with general concerns like request logging, authentication, SSL offloading, request forwarding, and so on. Each filter reads from its input and writes to its output, with the output of one filter connected to the input of the next.
|
||||||
|
|
||||||
|
#### Pipelines
|
||||||
|
|
||||||
|
A chain of filters is called a pipeline and Pipy categorizes pipelines in 3 different categories according to their input sources.
|
||||||
|
|
||||||
|
* Port pipeline: Reads in Data events from a network port, processes them, and then writes the result back to the same port. This is the most commonly used request and response model. For instance, when Pipy works like an HTTP server, the input to a Port pipeline is an HTTP request from the clients, and the output from the pipeline would be an HTTP response sent back to clients.
|
||||||
|
* Timer pipeline: Gets a pair of MessageStart and MessageEnd events as its input periodically. Useful when [Cron][6] [job-like][7] functionality is required.
|
||||||
|
* Sub-pipeline: Works in conjunction with a join filter, such as link, which takes in events from its predecessor pipeline, feeds them into a sub-pipeline for processing, reads back the output from the sub-pipeline, and then pumps it down to the next filter.
|
||||||
|
The best way to look at sub-pipelines and join filters is to think of them as callees and callers of a subroutine in procedural programming. The input to the joint filter is the subroutine's parameters, the output from the joint filter is its return value.
|
||||||
|
A root pipeline, such as Port or Timer, cannot be called from join filters.
|
||||||
|
To get a list of builtin filters and their parameters:
|
||||||
|
$ pipy --list-filters
|
||||||
|
$ pipy --help-filters
|
||||||
|
|
||||||
|
```
|
||||||
|
$ pipy --list-filters
|
||||||
|
$ pipy --help-filters
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Context
|
||||||
|
|
||||||
|
Another important notion in Pipy is that of contexts. A context is a set of variables attached to a pipeline. Every pipeline gets access to the same set of variables across a Pipy instance. In other words, contexts have the same shape. When you start a Pipy instance, the first thing you do is define the shape of the context by defining variable(s) and their initial values.
|
||||||
|
|
||||||
|
Every root pipeline clones the initial context you define at the start. When a sub-pipeline starts, it either shares or clones its parent's context, depending on which joint filter you use. For instance, a link filter shares its parent's context while a demux filter clones it.
|
||||||
|
|
||||||
|
To the scripts embedded in a pipeline, these context variables are their global variables, which means that these variables are always accessible to scripts from anywhere if they live in the same script file.
|
||||||
|
|
||||||
|
This might seem odd to a seasoned programmer because global variables usually mean they are globally unique. You have only one set of these variables, whereas in Pipy we can have many sets of them (contexts) depending on how many root pipelines are open for incoming network connections and how many sub-pipelines clone their parents' contexts.
|
||||||
|
|
||||||
|
### Writing a Network Proxy
|
||||||
|
|
||||||
|
Suppose you're running separate instances of different services and you want to add a proxy to forward traffic to the relevant services based on the request URL path. This would give you the benefit of exposing a single URL and scaling your services in the back end without users having to remember a distinct service URL. In normal situations, your services would be running on different nodes and each service could have multiple instances running. In this example, assume you're running the services below, and want to distribute traffic to them based on the URI.
|
||||||
|
|
||||||
|
* service-hi at /hi/* (127.0.0.1:8080, 127.0.0.1:8082)
|
||||||
|
* service-echo at /echo (127.0.0.1:8081)
|
||||||
|
* service-tell-ip at /ip_/_* (127.0.0.1:8082)
|
||||||
|
|
||||||
|
Pipy scripts are written in JavaScript, and you can use any text editor of your choice to edit them. Alternatively, if you have installed Pipy locally, you can use Pipy admin Web UI, which comes with syntax highlighting, auto-completion, hints, as well as the ability to run scripts, all from the same console.
|
||||||
|
|
||||||
|
Start a Pipy instance, without any arguments, so the Pipy admin console launches on port 6060. Now open your favorite web browser and navigate to [[http://localhost:6060](http://localhost:6060/][8] to see the built-in Pipy Administration Web UI.
|
||||||
|
|
||||||
|
![Built-in Pipy administration web UI][9]
|
||||||
|
|
||||||
|
### Create a Pipy program
|
||||||
|
|
||||||
|
A good design practice is that code and configurations are separated. Pipy supports such modular design through its Plugins, which you can think of as JavaScript modules. That said, you store your configuration data in the config folder, and your coding logic in separate files under the plugins folder. The main proxy server script is stored in the root folder, the main proxy script (`proxy.js` ) will include and combine the functionality defined in separate modules. In the end, your final folder structure is:
|
||||||
|
|
||||||
|
```
|
||||||
|
├── config
|
||||||
|
│ ├── balancer.json
|
||||||
|
│ ├── proxy.json
|
||||||
|
│ └── router.json
|
||||||
|
├── plugins
|
||||||
|
│ ├── balancer.js
|
||||||
|
│ ├── default.js
|
||||||
|
│ └── router.js
|
||||||
|
└── proxy.js
|
||||||
|
```
|
||||||
|
|
||||||
|
1.Click **New Codebase**, enter `/proxy` for the Codebase *name* in the dialog and then click **Create**.
|
||||||
|
|
||||||
|
1. Click the + button to add a new file. Enter /config/proxy.json for its filename and then click Create. This is the configuration file used to configure your proxy.
|
||||||
|
2. You now see proxy.json listed under the config folder in the left pane. Click on the file to open it and add the configuration shown below and make sure you save your file by clicking the disk icon on the top panel.
|
||||||
|
|
||||||
|
{
|
||||||
|
"listen": 8000,
|
||||||
|
"plugins": [
|
||||||
|
"plugins/router.js",
|
||||||
|
"plugins/balancer.js",
|
||||||
|
"plugins/default.js" ]
|
||||||
|
}
|
||||||
|
3. Repeat steps 2 and 3 to create another file, /config/router.json, to store route information. Enter this configuration data:
|
||||||
|
{
|
||||||
|
"routes": {
|
||||||
|
"/hi/*": "service-hi",
|
||||||
|
"/echo": "service-echo",
|
||||||
|
"/ip/*": "service-tell-ip" }
|
||||||
|
}
|
||||||
|
4. Repeat steps 2 and 3 to create another file, /config/balancer.json to store your service-to-target map. Enter the following data:
|
||||||
|
{
|
||||||
|
"services": {
|
||||||
|
"service-hi" : ["127.0.0.1:8080", "127.0.0.1:8082"],
|
||||||
|
"service-echo" : ["127.0.0.1:8081"],
|
||||||
|
"service-tell-ip" : ["127.0.0.1:8082"] }
|
||||||
|
}
|
||||||
|
5. Now it's time to write your very first Pipy script, which will be used as a default fallback when your server receives a request for which you don't have any target (an endpoint) configured. Create the file /plugins/default.js. The name here is just a convention and Pipy doesn't rely on names, so you can choose any name you like. The script will contain the code shown below, which returns the HTTP Status code 404 with a message of No handler found:
|
||||||
|
|
||||||
|
pipy()
|
||||||
|
.pipeline('request')
|
||||||
|
.replaceMessage(
|
||||||
|
new Message({ status: 404 }, 'No handler found'))
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"listen": 8000,
|
||||||
|
"plugins": [
|
||||||
|
"plugins/router.js",
|
||||||
|
"plugins/balancer.js",
|
||||||
|
"plugins/default.js" ]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"routes": {
|
||||||
|
"/hi/*": "service-hi",
|
||||||
|
"/echo": "service-echo",
|
||||||
|
"/ip/*": "service-tell-ip" }
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"services": {
|
||||||
|
"service-hi" : ["127.0.0.1:8080", "127.0.0.1:8082"],
|
||||||
|
"service-echo" : ["127.0.0.1:8081"],
|
||||||
|
"service-tell-ip" : ["127.0.0.1:8082"] }
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
pipy()
|
||||||
|
.pipeline('request')
|
||||||
|
.replaceMessage(
|
||||||
|
new Message({ status: 404 }, 'No handler found'))
|
||||||
|
```
|
||||||
|
|
||||||
|
7.Create the file `/plugins/router.js`, which stores your routing logic:
|
||||||
|
|
||||||
|
```
|
||||||
|
(config =>
|
||||||
|
pipy({
|
||||||
|
_router: new algo.URLRouter(config.routes), })
|
||||||
|
.export('router', {
|
||||||
|
__serviceID: '', })
|
||||||
|
.pipeline('request')
|
||||||
|
.handleMessageStart(
|
||||||
|
msg => (
|
||||||
|
__serviceID = _router.find(
|
||||||
|
msg.head.headers.host,
|
||||||
|
msg.head.path, )
|
||||||
|
) )
|
||||||
|
)(JSON.decode(pipy.load('config/router.json')))
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Create the file /plugins/balancer.js, which stores your load balancing logic as a side-note. Pipy comes with multiple Load Balancing algorithms, but for simplicity, you're using the Round Robin algorithm here.
|
||||||
|
(config =>
|
||||||
|
|
||||||
|
pipy({
|
||||||
|
_services: (
|
||||||
|
Object.fromEntries(
|
||||||
|
Object.entries(config.services).map(
|
||||||
|
([k, v]) => [
|
||||||
|
k, new algo.RoundRobinLoadBalancer(v)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
|
||||||
|
_balancer: null,
|
||||||
|
_balancerCache: null,
|
||||||
|
_target: '',
|
||||||
|
})
|
||||||
|
|
||||||
|
.import({
|
||||||
|
__turnDown: 'proxy',
|
||||||
|
__serviceID: 'router',
|
||||||
|
})
|
||||||
|
|
||||||
|
.pipeline('session')
|
||||||
|
.handleStreamStart(
|
||||||
|
() => (
|
||||||
|
_balancerCache = new algo.Cache(
|
||||||
|
// k is a balancer, v is a target
|
||||||
|
(k ) => k.select(),
|
||||||
|
(k,v) => k.deselect(v),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.handleStreamEnd(
|
||||||
|
() => (
|
||||||
|
_balancerCache.clear()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
.pipeline('request')
|
||||||
|
.handleMessageStart(
|
||||||
|
() => (
|
||||||
|
_balancer = _services[__serviceID],
|
||||||
|
_balancer && (_target = _balancerCache.get(_balancer)),
|
||||||
|
_target && (__turnDown = true)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.link(
|
||||||
|
'forward', () => Boolean(_target),
|
||||||
|
''
|
||||||
|
)
|
||||||
|
|
||||||
|
.pipeline('forward')
|
||||||
|
.muxHTTP(
|
||||||
|
'connection',
|
||||||
|
() => _target
|
||||||
|
)
|
||||||
|
|
||||||
|
.pipeline('connection')
|
||||||
|
.connect(
|
||||||
|
() => _target
|
||||||
|
)
|
||||||
|
|
||||||
|
)(JSON.decode(pipy.load('config/balancer.json')))
|
||||||
|
2. Now write the entry point, or the proxy server script, to use the above plugins. Creating a new code base (step 1) creates a default main.js file as an entry point. You can use that as your main entry point, or if you prefer to go with a different name, feel free to delete main.js and create a new file with the name of your choice. For this example, delete it and create a new file named /proxy.js. Make sure you click the top flag icon to make it the main entry point, to ensure script execution is started when you hit the run button (the arrow icon on the right).
|
||||||
|
(config =>
|
||||||
|
|
||||||
|
pipy()
|
||||||
|
|
||||||
|
.export('proxy', {
|
||||||
|
__turnDown: false,
|
||||||
|
})
|
||||||
|
|
||||||
|
.listen(config.listen)
|
||||||
|
.use(config.plugins, 'session')
|
||||||
|
.demuxHTTP('request')
|
||||||
|
|
||||||
|
.pipeline('request')
|
||||||
|
.use(
|
||||||
|
config.plugins,
|
||||||
|
'request',
|
||||||
|
'response',
|
||||||
|
() => __turnDown
|
||||||
|
)
|
||||||
|
|
||||||
|
)(JSON.decode(pipy.load('config/proxy.json')))
|
||||||
|
|
||||||
|
```
|
||||||
|
(config =>
|
||||||
|
|
||||||
|
pipy({
|
||||||
|
_services: (
|
||||||
|
Object.fromEntries(
|
||||||
|
Object.entries(config.services).map(
|
||||||
|
([k, v]) => [
|
||||||
|
k, new algo.RoundRobinLoadBalancer(v)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
|
||||||
|
_balancer: null,
|
||||||
|
_balancerCache: null,
|
||||||
|
_target: '',
|
||||||
|
})
|
||||||
|
|
||||||
|
.import({
|
||||||
|
__turnDown: 'proxy',
|
||||||
|
__serviceID: 'router',
|
||||||
|
})
|
||||||
|
|
||||||
|
.pipeline('session')
|
||||||
|
.handleStreamStart(
|
||||||
|
() => (
|
||||||
|
_balancerCache = new algo.Cache(
|
||||||
|
// k is a balancer, v is a target
|
||||||
|
(k ) => k.select(),
|
||||||
|
(k,v) => k.deselect(v),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.handleStreamEnd(
|
||||||
|
() => (
|
||||||
|
_balancerCache.clear()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
.pipeline('request')
|
||||||
|
.handleMessageStart(
|
||||||
|
() => (
|
||||||
|
_balancer = _services[__serviceID],
|
||||||
|
_balancer && (_target = _balancerCache.get(_balancer)),
|
||||||
|
_target && (__turnDown = true)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.link(
|
||||||
|
'forward', () => Boolean(_target),
|
||||||
|
''
|
||||||
|
)
|
||||||
|
|
||||||
|
.pipeline('forward')
|
||||||
|
.muxHTTP(
|
||||||
|
'connection',
|
||||||
|
() => _target
|
||||||
|
)
|
||||||
|
|
||||||
|
.pipeline('connection')
|
||||||
|
.connect(
|
||||||
|
() => _target
|
||||||
|
)
|
||||||
|
|
||||||
|
)(JSON.decode(pipy.load('config/balancer.json')))
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
(config =>
|
||||||
|
|
||||||
|
pipy()
|
||||||
|
|
||||||
|
.export('proxy', {
|
||||||
|
__turnDown: false,
|
||||||
|
})
|
||||||
|
|
||||||
|
.listen(config.listen)
|
||||||
|
.use(config.plugins, 'session')
|
||||||
|
.demuxHTTP('request')
|
||||||
|
|
||||||
|
.pipeline('request')
|
||||||
|
.use(
|
||||||
|
config.plugins,
|
||||||
|
'request',
|
||||||
|
'response',
|
||||||
|
() => __turnDown
|
||||||
|
)
|
||||||
|
|
||||||
|
)(JSON.decode(pipy.load('config/proxy.json')))
|
||||||
|
```
|
||||||
|
|
||||||
|
So far, your workspace looks like this:
|
||||||
|
|
||||||
|
![Image of workspace][10]
|
||||||
|
|
||||||
|
To run your script, click the play icon button (4th from right). Pipy runs your proxy script, and you see output similar to this:
|
||||||
|
|
||||||
|
![Image of output][11]
|
||||||
|
|
||||||
|
This shows that your proxy server is listening on port 8000 (which you configured in your `/config/proxy.json` ). Use [curl to run a test][12]:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ curl -i [http://localhost:8000](http://localhost:8000)
|
||||||
|
HTTP/1.1 404 Not Found
|
||||||
|
content-length: 10
|
||||||
|
connection: keep-alive
|
||||||
|
No handler found
|
||||||
|
```
|
||||||
|
|
||||||
|
That response makes sense because you haven't configured any target for root. Try one of your configured routes, such as `/hi` :
|
||||||
|
|
||||||
|
```
|
||||||
|
$ curl -i [http://localhost:8000/hi](http://localhost:8000/hi)
|
||||||
|
HTTP/1.1 502 Connection Refused
|
||||||
|
content-length: 0
|
||||||
|
connection: keep-alive
|
||||||
|
```
|
||||||
|
|
||||||
|
You get `502 Connection Refused` because you have no service running on your configured target port.
|
||||||
|
|
||||||
|
You can update `/config/balancer.json` with details like the host and port of your already running services to make it fit for your use case, or you can just write a script in Pipy to listen on your configured ports, and return simple messages.
|
||||||
|
|
||||||
|
Save this code to a file on your local computer named `mock-proxy.js`, and remember the location where you stored it:
|
||||||
|
|
||||||
|
```
|
||||||
|
pipy()
|
||||||
|
|
||||||
|
.listen(8080)
|
||||||
|
.serveHTTP(
|
||||||
|
new Message('Hi, there!\n')
|
||||||
|
)
|
||||||
|
|
||||||
|
.listen(8081)
|
||||||
|
.serveHTTP(
|
||||||
|
msg => new Message(msg.body)
|
||||||
|
)
|
||||||
|
|
||||||
|
.listen(8082)
|
||||||
|
.serveHTTP(
|
||||||
|
msg => new Message(
|
||||||
|
`You are requesting ${msg.head.path} from ${__inbound.remoteAddress}\n`
|
||||||
|
)
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
Open a new terminal window and run this script with Pipy (change `/path/to` to the location where you stored this script file):
|
||||||
|
|
||||||
|
```
|
||||||
|
$ pipy /path/to/mock-proxy.js
|
||||||
|
2022-01-11 18:56:31 [INF] [config]
|
||||||
|
2022-01-11 18:56:31 [INF] [config] Module /mock-proxy.js
|
||||||
|
2022-01-11 18:56:31 [INF] [config] ================
|
||||||
|
2022-01-11 18:56:31 [INF] [config]
|
||||||
|
2022-01-11 18:56:31 [INF] [config] [Listen on :::8080]
|
||||||
|
2022-01-11 18:56:31 [INF] [config] ----->|
|
||||||
|
2022-01-11 18:56:31 [INF] [config] |
|
||||||
|
2022-01-11 18:56:31 [INF] [config] serveHTTP
|
||||||
|
2022-01-11 18:56:31 [INF] [config] |
|
||||||
|
2022-01-11 18:56:31 [INF] [config] <-----|
|
||||||
|
2022-01-11 18:56:31 [INF] [config]
|
||||||
|
2022-01-11 18:56:31 [INF] [config] [Listen on :::8081]
|
||||||
|
2022-01-11 18:56:31 [INF] [config] ----->|
|
||||||
|
2022-01-11 18:56:31 [INF] [config] |
|
||||||
|
2022-01-11 18:56:31 [INF] [config] serveHTTP
|
||||||
|
2022-01-11 18:56:31 [INF] [config] |
|
||||||
|
2022-01-11 18:56:31 [INF] [config] <-----|
|
||||||
|
2022-01-11 18:56:31 [INF] [config]
|
||||||
|
2022-01-11 18:56:31 [INF] [config] [Listen on :::8082]
|
||||||
|
2022-01-11 18:56:31 [INF] [config] ----->|
|
||||||
|
2022-01-11 18:56:31 [INF] [config] |
|
||||||
|
2022-01-11 18:56:31 [INF] [config] serveHTTP
|
||||||
|
2022-01-11 18:56:31 [INF] [config] |
|
||||||
|
2022-01-11 18:56:31 [INF] [config] <-----|
|
||||||
|
2022-01-11 18:56:31 [INF] [config]
|
||||||
|
2022-01-11 18:56:31 [INF] [listener] Listening on port 8080 at ::
|
||||||
|
2022-01-11 18:56:31 [INF] [listener] Listening on port 8081 at ::
|
||||||
|
2022-01-11 18:56:31 [INF] [listener] Listening on port 8082 at ::
|
||||||
|
```
|
||||||
|
|
||||||
|
You now have your mock services listening on ports 8080, 8081, and 8082. Do a test again on your proxy server to see the correct response returned from your mock service.
|
||||||
|
|
||||||
|
### Summary
|
||||||
|
|
||||||
|
You've used a number of Pipy features, including variable declaration, importing and exporting variables, plugins, Pipelines, sub-pipelines, filter chaining, Pipy filters like `handleMessageStart`, `handleStreamStart`, and link, and Pipy classes like JSON, `algo.URLRouter`, `algo.RoundRobinLoadBalancer`, `algo.Cache`, and others. For more information, read the excellent [Pipy documentation][13], and through Pipy's admin web UI, and follow the step-by-step tutorials that come with it.
|
||||||
|
|
||||||
|
### Conclusion
|
||||||
|
|
||||||
|
Pipy from [Flomesh][14] is an open source, extremely fast, and lightweight network traffic processor. You can use it in a variety of use cases ranging from edge routers, load balancing and proxying (forward and reverse), API gateways, static HTTP servers, service mesh sidecars, and many other applications. Pipy is in active development and is maintained by full-time committers and contributors.
|
||||||
|
|
||||||
|
Images by: (Ali Naqvi, CC BY-SA 40)
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://opensource.com/article/22/5/pipy-programmable-network-proxy-cloud
|
||||||
|
|
||||||
|
作者:[Ali Naqvi][a]
|
||||||
|
选题:[lkxed][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/alinaqvi
|
||||||
|
[b]: https://github.com/lkxed
|
||||||
|
[1]: https://opensource.com/sites/default/files/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png
|
||||||
|
[2]: https://creativecommons.org/licenses/by/3.0/us/
|
||||||
|
[3]: https://opensource.com/sites/default/files/2022-05/pipy1.png
|
||||||
|
[4]: https://github.com/flomesh-io/pipy
|
||||||
|
[5]: https://opensource.com/article/19/4/interprocess-communication-linux-channels
|
||||||
|
[6]: https://en.wikipedia.org/wiki/Cron
|
||||||
|
[7]: https://en.wikipedia.org/wiki/Cron
|
||||||
|
[8]: http://localhost:6060
|
||||||
|
[9]: https://opensource.com/sites/default/files/2022-05/pipy2.png
|
||||||
|
[10]: https://opensource.com/sites/default/files/2022-05/pipy3.png
|
||||||
|
[11]: https://opensource.com/sites/default/files/2022-05/pipy4.png
|
||||||
|
[12]: https://www.redhat.com/sysadmin/social-media-curl
|
||||||
|
[13]: https://flomesh.io
|
||||||
|
[14]: https://flomesh.io
|
@ -0,0 +1,58 @@
|
|||||||
|
[#]: subject: "Five common mistakes when using automation"
|
||||||
|
[#]: via: "https://fedoramagazine.org/five-common-mistakes-when-using-automation/"
|
||||||
|
[#]: author: "Gary Scarborough https://fedoramagazine.org/author/gscarbor/"
|
||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: "geekpi"
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
Five common mistakes when using automation
|
||||||
|
======
|
||||||
|
|
||||||
|
![][1]
|
||||||
|
|
||||||
|
Background image from ["Modern Times" (1936)][2], [United Artists][3], Public domain, via Wikimedia Commons
|
||||||
|
|
||||||
|
As automation expands to cover more aspects of IT, more administrators are learning automation skills and applying them to ease their workload. Automation can ease the burden of repetitive tasks and add a level of conformity to infrastructure. But when IT workers deploy automation, there are common mistakes that can wreak havoc on infrastructures large and small. Five common mistakes are typically seen in automation deployments.
|
||||||
|
|
||||||
|
### Lack of testing
|
||||||
|
|
||||||
|
A beginner’s mistake that is commonly made is that automation scripts are not thoroughly tested. A simple shell script can have adverse affects on a server due to typos or logic errors. Multiply that mistake by the number of servers in your infrastructure, and you can have a big mess to clean up. Always test your automation scripts before deploying in large scale.
|
||||||
|
|
||||||
|
### Unexpected server load
|
||||||
|
|
||||||
|
The second mistake that frequently occurs is not predicting the system load the script may put on other resources. Running a script that downloads a file or installs a package from a repository may be fine when the target is a dozen servers. Scripts are often run against hundreds or thousands of servers. This load can bring supporting services to a stand still or crash them entirely. Don’t forget to consider end point impact or set a reasonable concurrency rate.
|
||||||
|
|
||||||
|
### Run away scripts
|
||||||
|
|
||||||
|
One use of automation tools is to ensure compliance to standard settings. Automation can make it easy to ensure that every server in a group has exactly the same settings. Problems may arise if a server in that group needs to be altered from that baseline, and the administrator is not aware of the compliance standard. Unneeded and unwanted services can be installed and enabled leading to possible security concerns.
|
||||||
|
|
||||||
|
### Lack of documentation
|
||||||
|
|
||||||
|
A constant duty for administrators should be to document their work. Companies can have frequent new employees in IT departments due to contracts ending or promotions or regular employee turnover. It is also not uncommon for work groups within a company to be siloed from each other. For these reasons it is important to document what automation is in place. Unlike user run scripts, automation may continue long after the person who created it leaves the group. Administrators can find themselves facing strange behaviors in their infrastructure from automation left unchecked.
|
||||||
|
|
||||||
|
### Lack of experience
|
||||||
|
|
||||||
|
The last mistake on the list is when administrators do not know enough about the systems they are automating. Too often admins are hired to work positions where they do not have adequate training and no one to learn from. This has been especially relevant since COVID when companies are struggling to fill vacancies. Admins are then forced to deal with infrastructure they didn’t set up and may not fully understand. This can lead to very inefficient scripts that waste resources or misconfigured servers.
|
||||||
|
|
||||||
|
### Conclusion
|
||||||
|
|
||||||
|
More and more admins are learning automation to help them in their everyday tasks. As a result, automation is being applied to more areas of technology. Hopefully this list will help prevent new users from making these mistakes and urge seasoned admins to re-evaluate their IT strategies. Automation is meant to ease the burden of repetitive tasks, not cause more work for the end user.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://fedoramagazine.org/five-common-mistakes-when-using-automation/
|
||||||
|
|
||||||
|
作者:[Gary Scarborough][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/gscarbor/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://fedoramagazine.org/wp-content/uploads/2022/05/modern-times-816x345.jpg
|
||||||
|
[2]: https://en.wikipedia.org/wiki/Modern_Times_(film)
|
||||||
|
[3]: https://commons.wikimedia.org/wiki/File:Chaplin_-_Modern_Times.jpg
|
@ -0,0 +1,273 @@
|
|||||||
|
[#]: subject: "How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 / 20.04 / 18.04"
|
||||||
|
[#]: via: "https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/"
|
||||||
|
[#]: author: "sk https://ostechnix.com/author/sk/"
|
||||||
|
[#]: collector: "lkxed"
|
||||||
|
[#]: translator: " "
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 / 20.04 / 18.04
|
||||||
|
======
|
||||||
|
This tutorial explains how to boot into **rescue mode** or **emergency mode**in Ubuntu 22.04, 20.04 and 18.04 LTS editions.
|
||||||
|
|
||||||
|
As you might already know, **Runlevels** are replaced with **Systemd targets** in many Linux distributions such as RHEL 7 / RHEL 8 and Ubuntu 16.04 LTS and newer versions. For more details about runlevels and systemd target, refer to [this guide][1].
|
||||||
|
|
||||||
|
This guide is specifically written for Ubuntu, however the steps given below should work on most Linux distributions that use **Systemd** as the default service manager.
|
||||||
|
|
||||||
|
Before getting into the topic, let us have a brief understanding about what is rescue mode and emergency mode and what is the purpose of these both modes.
|
||||||
|
|
||||||
|
### What Is Rescue Mode?
|
||||||
|
|
||||||
|
The **rescue mode** is equivalent to **single user mode** in Linux distributions that use **SysV** as the default service manager. In rescue mode, all local filesystems will be mounted, only some important services will be started. However, no normal services (E.g network services) won't be started.
|
||||||
|
|
||||||
|
The rescue mode is helpful in situations where the system can't boot normally. Also, we can perform some important rescue operations, such as [reset root password][2], in rescue mode.
|
||||||
|
|
||||||
|
### What Is Emergency Mode?
|
||||||
|
|
||||||
|
In contrast to the rescue mode, nothing is started in the **emergency mode**. No services are started, no mount points are mounted, no sockets are established, nothing. All you will have is just a **raw shell**. Emergency mode is suitable for debugging purposes.
|
||||||
|
|
||||||
|
First, we will see how to boot into rescue mode and emergency mode in Ubuntu 22.04 and 20.04 LTS distributions. The procedure for entering rescue mode in Ubuntu 22.04 and 20.04 LTS is exactly the same!
|
||||||
|
|
||||||
|
### Boot Into Rescue Mode In Ubuntu 22.04 / 20.04 LTS
|
||||||
|
|
||||||
|
We can boot into rescue mode in two ways.
|
||||||
|
|
||||||
|
#### Method 1
|
||||||
|
|
||||||
|
Power on your Ubuntu system. Hit the ESC key right after the BIOS logo disappears to display the Grub menu.
|
||||||
|
|
||||||
|
In the GRUB menu, choose the first entry and press **"e"** to edit it.
|
||||||
|
|
||||||
|
![GRUB Menu In Ubuntu 22.04 / 20.04 LTS][3]
|
||||||
|
|
||||||
|
Hit the DOWN arrow and find the line that starts with the word **"linux"** and add the following line at the end of it. To reach the end, just press **CTRL+e** or use the **END** key or **LEFT/RIGHT** arrows in your keyboard.
|
||||||
|
|
||||||
|
```
|
||||||
|
systemd.unit=rescue.target
|
||||||
|
```
|
||||||
|
|
||||||
|
![Edit Grub Boot Menu Entries To Enter Into Rescue Mode In Ubuntu 22.04 / 20.04 LTS][4]
|
||||||
|
|
||||||
|
After adding the above line, hit **Ctrl+x** or**F10** to boot into rescue mode.
|
||||||
|
|
||||||
|
After a few seconds, you will be landed in the rescue mode (single user mode) as root user. You will be prompted to press ENTER to enter the maintenance mode.
|
||||||
|
|
||||||
|
Here is how rescue mode looks like in Ubuntu 22.04 / 20.04 LTS systems:
|
||||||
|
|
||||||
|
![Boot Into Rescue Mode In Ubuntu 22.04 / 20.04 LTS][5]
|
||||||
|
|
||||||
|
Now do whatever you want to do in the rescue mode. You may need to mount the root (**/**) file system in read/write mode before doing any operations in rescue mode.
|
||||||
|
|
||||||
|
```
|
||||||
|
mount -n -o remount,rw /
|
||||||
|
```
|
||||||
|
|
||||||
|
![Mount Root File System In Read Write Mode In Ubuntu 22.04 / 20.04 LTS][6]
|
||||||
|
|
||||||
|
Once done, press **"Ctrl+d"** to boot into normal mode. Alternatively, you can type any one of the following commands to boot into normal mode.
|
||||||
|
|
||||||
|
```
|
||||||
|
systemctl default
|
||||||
|
```
|
||||||
|
|
||||||
|
Or,
|
||||||
|
|
||||||
|
```
|
||||||
|
exit
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want to reboot the system instead of booting into normal mode, enter:
|
||||||
|
|
||||||
|
```
|
||||||
|
systemctl reboot
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Method 2
|
||||||
|
|
||||||
|
In this method, you don't need to edit the grub boot menu entries.
|
||||||
|
|
||||||
|
Power on the system and choose **"Advanced options for Ubuntu"** from the Grub boot menu.
|
||||||
|
|
||||||
|
![Choose Advanced Options For Ubuntu From Grub Boot Menu][7]
|
||||||
|
|
||||||
|
Next, you will see the list of available Ubuntu versions with Kernel versions. Choose the **"Recovery mode"** in the grub boot menu in Ubuntu.
|
||||||
|
|
||||||
|
![Choose Recovery Mode In Grub Boot Menu In Ubuntu 22.04 / 20.04 LTS][8]
|
||||||
|
|
||||||
|
After a few seconds, you will see the Ubuntu recovery menu. From the recovery menu, choose **"Drop to root shell prompt"** option and hit the ENTER key.
|
||||||
|
|
||||||
|
![Enter Into Root Shell Prompt In Ubuntu 22.04 / 20.04 LTS][9]
|
||||||
|
|
||||||
|
Now you will be landed in the rescue mode.
|
||||||
|
|
||||||
|
![Ubuntu Maintenance Mode][10]
|
||||||
|
|
||||||
|
Mount the root (**/**) file system in read/write mode by entering the following command:
|
||||||
|
|
||||||
|
```
|
||||||
|
mount -n -o remount,rw /
|
||||||
|
```
|
||||||
|
|
||||||
|
![Mount Root File System In Read Write Mode In Ubuntu][11]
|
||||||
|
|
||||||
|
Do whatever you want to do in the rescue mode.
|
||||||
|
|
||||||
|
Once done, type exit to return back to the recovery menu.
|
||||||
|
|
||||||
|
```
|
||||||
|
exit
|
||||||
|
```
|
||||||
|
|
||||||
|
Finally, choose **"Resume normal boot"** option and hit the ENTER key.
|
||||||
|
|
||||||
|
![Boot Into Normal Mode In Ubuntu][12]
|
||||||
|
|
||||||
|
Press ENTER key again to exit recovery mode and continue booting into normal mode.
|
||||||
|
|
||||||
|
![Exit The Recovery Mode In Ubuntu][13]
|
||||||
|
|
||||||
|
If you don't want to boot into normal mode, type **"reboot"** and press ENTER from the maintenance mode to restart your system.
|
||||||
|
|
||||||
|
### Boot Into Emergency Mode In Ubuntu 22.04 / 20.04 LTS
|
||||||
|
|
||||||
|
When the GRUB boot menu appears, press **"e"** to edit it.
|
||||||
|
|
||||||
|
![GRUB Menu In Ubuntu 22.04 / 20.04 LTS][14]
|
||||||
|
|
||||||
|
Find the line that starts with the word **"linux"** and add the following line at the end of it.
|
||||||
|
|
||||||
|
```
|
||||||
|
systemd.unit=emergency.target
|
||||||
|
```
|
||||||
|
|
||||||
|
![Edit Grub Boot Menu Entries To Enter Into Emergency Mode In Ubuntu 22.04 / 20.04 LTS][15]
|
||||||
|
|
||||||
|
After adding the above line, hit **Ctrl+x** or**F10** to boot into emergency mode.
|
||||||
|
|
||||||
|
After a few seconds, you will be landed in the emergency mode as `root` user. You will be prompted to press ENTER to enter the maintenance mode.
|
||||||
|
|
||||||
|
Here is how emergency mode looks like in Ubuntu 22.04 / 20.04 LTS system:
|
||||||
|
|
||||||
|
![Boot Into Emergency Mode In Ubuntu 22.04 / 20.04 LTS][16]
|
||||||
|
|
||||||
|
Now do whatever you want to do in the emergency mode. You may need to mount the root (**/**) file system in read/write mode before doing any operations in this mode.
|
||||||
|
|
||||||
|
```
|
||||||
|
mount -n -o remount,rw /
|
||||||
|
```
|
||||||
|
|
||||||
|
Once done, press **"Ctrl+d"** to boot into normal mode. Alternatively, you can type any one of the following commands to boot into normal mode.
|
||||||
|
|
||||||
|
```
|
||||||
|
systemctl default
|
||||||
|
```
|
||||||
|
|
||||||
|
Or,
|
||||||
|
|
||||||
|
```
|
||||||
|
exit
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want to reboot the system instead of booting into normal mode, enter:
|
||||||
|
|
||||||
|
```
|
||||||
|
systemctl reboot
|
||||||
|
```
|
||||||
|
|
||||||
|
### Boot Into Rescue Mode In Ubuntu 18.04 LTS
|
||||||
|
|
||||||
|
Boot your Ubuntu system. When the Grub menu appears, choose the first entry and press **e** to edit. (To reach the end, just press **CTRL+e** or use the END key or LEFT/RIGHT arrows in your keyboard):
|
||||||
|
|
||||||
|
![Grub Menu][17]
|
||||||
|
|
||||||
|
If you don't see the Grub menu, just hit ESC key right after the BIOS logo disappears.
|
||||||
|
|
||||||
|
Find the line that starts with word **"linux"**and add the following line at the end of that line (To reach the end, just press **CTRL+e** or use the END key or LEFT/RIGHT arrows in your keyboard):
|
||||||
|
|
||||||
|
```
|
||||||
|
systemd.unit=rescue.target
|
||||||
|
```
|
||||||
|
|
||||||
|
![Edit Grub Menu][18]
|
||||||
|
|
||||||
|
Once you added the above line, just press **CTRL+x** or **F10** to continue to boot into rescue mode. After a few seconds, you will be landed in the rescue mode (single user mode) as root user.
|
||||||
|
|
||||||
|
Here is how rescue mode looks like in Ubuntu 18.04 LTS server:
|
||||||
|
|
||||||
|
![Ubuntu Rescue Mode][19]
|
||||||
|
|
||||||
|
Next, type the following command to mount root (**/**) file system into read/write mode.
|
||||||
|
|
||||||
|
```
|
||||||
|
mount -n -o remount,rw /
|
||||||
|
```
|
||||||
|
|
||||||
|
### Boot Into Emergency Mode
|
||||||
|
|
||||||
|
Booting your Ubuntu into emergency is as same as above method. All you have to do is replace **"systemd.unit=rescue.target"** with **"systemd.unit=emergency.target"** when editing grub menu.
|
||||||
|
|
||||||
|
![Edit Grub Menu][20]
|
||||||
|
|
||||||
|
Once you added "systemd.unit=emergency.target", press **Ctrl+x** or **F10** to continue booting into emergency mode.
|
||||||
|
|
||||||
|
![Ubuntu Emergency Mode][21]
|
||||||
|
|
||||||
|
Finally, you can mount root filesystem into read/write mode with command:
|
||||||
|
|
||||||
|
```
|
||||||
|
mount -n -o remount,rw /
|
||||||
|
```
|
||||||
|
|
||||||
|
### Switch Between Rescue And Emergency Modes
|
||||||
|
|
||||||
|
If you are in rescue mode, you don't have to edit the grub boot entry as I mentioned above. Instead, just type the following command to switch to emergency mode instantly:
|
||||||
|
|
||||||
|
```
|
||||||
|
systemctl emergency
|
||||||
|
```
|
||||||
|
|
||||||
|
Similarly, to switch from emergency to rescue mode, type:
|
||||||
|
|
||||||
|
```
|
||||||
|
systemctl rescue
|
||||||
|
```
|
||||||
|
|
||||||
|
### Conclusion
|
||||||
|
|
||||||
|
You know now what is rescue and emergency modes and how to boot into those modes in Ubuntu 22.04, 20.04 and 18.04 LTS systems. Like I already mentioned, the steps provided here will work on many recent Linux versions that uses Systemd.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/
|
||||||
|
|
||||||
|
作者:[sk][a]
|
||||||
|
选题:[lkxed][b]
|
||||||
|
译者:[译者ID](https://github.com/译者ID)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://ostechnix.com/author/sk/
|
||||||
|
[b]: https://github.com/lkxed
|
||||||
|
[1]: https://ostechnix.com/check-runlevel-linux/
|
||||||
|
[2]: https://ostechnix.com/how-to-reset-or-recover-root-user-password-in-linux/
|
||||||
|
[3]: https://ostechnix.com/wp-content/uploads/2022/05/GRUB-Menu-In-Ubuntu-22.04-LTS.png
|
||||||
|
[4]: https://ostechnix.com/wp-content/uploads/2022/05/Edit-Grub-Boot-Menu-Entries-To-Enter-Into-Rescue-Mode-In-Ubuntu-22.04-LTS.png
|
||||||
|
[5]: https://ostechnix.com/wp-content/uploads/2022/05/Boot-Into-Rescue-Mode-In-Ubuntu-22.04.png
|
||||||
|
[6]: https://ostechnix.com/wp-content/uploads/2022/05/Mount-Root-File-System-In-Read-Write-Mode-In-Ubuntu.png
|
||||||
|
[7]: https://ostechnix.com/wp-content/uploads/2022/05/Choose-Advanced-Options-For-Ubuntu-From-Grub-Boot-Menu.png
|
||||||
|
[8]: https://ostechnix.com/wp-content/uploads/2022/05/Choose-Recovery-Mode-In-Grub-Boot-Menu-In-Ubuntu.png
|
||||||
|
[9]: https://ostechnix.com/wp-content/uploads/2022/05/Enter-Into-Root-Shell-Prompt-In-Ubuntu.png
|
||||||
|
[10]: https://ostechnix.com/wp-content/uploads/2022/05/Ubuntu-Maintenance-Mode.png
|
||||||
|
[11]: https://ostechnix.com/wp-content/uploads/2022/05/Mount-Root-File-System-In-Read-Write-Mode-In-Ubuntu-1.png
|
||||||
|
[12]: https://ostechnix.com/wp-content/uploads/2022/05/Boot-Into-Normal-Mode-In-Ubuntu.png
|
||||||
|
[13]: https://ostechnix.com/wp-content/uploads/2022/05/Exit-The-Recovery-Mode-In-Ubuntu.png
|
||||||
|
[14]: https://ostechnix.com/wp-content/uploads/2022/05/GRUB-Menu-In-Ubuntu-22.04-LTS.png
|
||||||
|
[15]: https://ostechnix.com/wp-content/uploads/2022/05/Edit-Grub-Boot-Menu-Entries-To-Enter-Into-Emergency-Mode-In-Ubuntu.png
|
||||||
|
[16]: https://ostechnix.com/wp-content/uploads/2018/12/Boot-Into-Emergency-Mode-In-Ubuntu-20.04-LTS.png
|
||||||
|
[17]: https://ostechnix.com/wp-content/uploads/2018/12/Grub-menu.png
|
||||||
|
[18]: https://ostechnix.com/wp-content/uploads/2018/12/Edit-grub-menu.png
|
||||||
|
[19]: https://ostechnix.com/wp-content/uploads/2018/12/Ubuntu-rescue-mode.png
|
||||||
|
[20]: https://ostechnix.com/wp-content/uploads/2018/12/emergency-mode.png
|
||||||
|
[21]: https://ostechnix.com/wp-content/uploads/2018/12/emergency-mode-1.png
|
@ -0,0 +1,125 @@
|
|||||||
|
[#]: subject: "How To Reset Sudo Password In Ubuntu 22.04 / 20.04 LTS"
|
||||||
|
[#]: via: "https://ostechnix.com/how-to-reset-sudo-password-in-ubuntu-20-04-lts/"
|
||||||
|
[#]: author: "sk https://ostechnix.com/author/sk/"
|
||||||
|
[#]: collector: "lkxed"
|
||||||
|
[#]: translator: " "
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
How To Reset Sudo Password In Ubuntu 22.04 / 20.04 LTS
|
||||||
|
======
|
||||||
|
Reset Forgotten Root Password In Ubuntu
|
||||||
|
|
||||||
|
This brief guide explains how to reset sudo password in Ubuntu 22.04 and 20.04 LTS desktop and server editions from rescue mode.
|
||||||
|
|
||||||
|
### Introduction
|
||||||
|
|
||||||
|
When **[installing Ubuntu][1]**, a new user will be created with sudo privileges to perform all sorts of administrative tasks.
|
||||||
|
|
||||||
|
If your Ubuntu system have multiple sudo users, you can easily reset the forgotten password of a sudo user or administrative user from another sudo user's account.
|
||||||
|
|
||||||
|
What If you have only one sudo user and you lost the password? No problem! It is very easy to recover forgotten sudo user password in Ubuntu from the **"rescue"** or **"single user"** mode.
|
||||||
|
|
||||||
|
This guide has been officially tested on Ubuntu 22.04 and 20.04 LTS editions, however the steps given below are same for other Ubuntu versions and derivatives.
|
||||||
|
|
||||||
|
### Reset Sudo Password In Ubuntu 22.04 / 20.04 LTS
|
||||||
|
|
||||||
|
First, boot your Ubuntu system into rescue mode to reset a sudo user's password as described in the link below.
|
||||||
|
|
||||||
|
> [How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 / 20.04 / 18.04][2]
|
||||||
|
|
||||||
|
After you entered into the rescue mode, mount the root (**/**) file system in read/write mode by running the following command:
|
||||||
|
|
||||||
|
```
|
||||||
|
# mount -n -o remount,rw /
|
||||||
|
```
|
||||||
|
|
||||||
|
Now, reset the sudo user's password using **"passwd"** command:
|
||||||
|
|
||||||
|
```
|
||||||
|
# passwd ostechnix
|
||||||
|
```
|
||||||
|
|
||||||
|
Here, **"ostechnix"** is the sudo user. Replace it with your own user name.
|
||||||
|
|
||||||
|
Enter the password twice:
|
||||||
|
|
||||||
|
```
|
||||||
|
New password:
|
||||||
|
Retype new password:
|
||||||
|
passwd: password updated successfully
|
||||||
|
```
|
||||||
|
|
||||||
|
![Reset Sudo Password In Ubuntu 22.04 / 20.04 LTS][3]
|
||||||
|
|
||||||
|
That's it. We have reset the sudo user password. If you have followed the **Method 1** to enter into rescue mode as described in the above link, press **“Ctrl+d”** to boot into normal mode. Alternatively, you can type any one of the following commands to boot into normal mode.
|
||||||
|
|
||||||
|
```
|
||||||
|
# systemctl default
|
||||||
|
```
|
||||||
|
|
||||||
|
Or,
|
||||||
|
|
||||||
|
```
|
||||||
|
# exit
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want to reboot the system instead of booting into normal mode, enter:
|
||||||
|
|
||||||
|
```
|
||||||
|
# systemctl reboot
|
||||||
|
```
|
||||||
|
|
||||||
|
If you have followed the **Method 2** to enter into rescue mode as described in the above link, type:
|
||||||
|
|
||||||
|
```
|
||||||
|
# exit
|
||||||
|
```
|
||||||
|
|
||||||
|
You will go back to the recovery menu. Choose "**Resume normal boot**" and hit ENTER key.
|
||||||
|
|
||||||
|
![Boot Into Normal Mode In Ubuntu][4]
|
||||||
|
|
||||||
|
Again, choose OK and press ENTER to continue booting into normal mode:
|
||||||
|
|
||||||
|
![Exit Recovery Mode And Boot Into Normal Mode][5]
|
||||||
|
|
||||||
|
You can now use the new sudo password when running administrative commands.
|
||||||
|
|
||||||
|
##### What If I Forgot Both Username And Password?
|
||||||
|
|
||||||
|
If you forget the username, you can easily list the available users in your Linux system from the rescue mode using command:
|
||||||
|
|
||||||
|
```
|
||||||
|
# cat etc/passwd
|
||||||
|
```
|
||||||
|
|
||||||
|
Sample output from my Ubuntu 22.04 system:
|
||||||
|
|
||||||
|
```
|
||||||
|
[...]
|
||||||
|
ostechnix:x:1000:1000:Ostechnix,,,:/home/ostechnix:/bin/bash
|
||||||
|
[...]
|
||||||
|
```
|
||||||
|
|
||||||
|
Well, you now have the user name. Just follow the aforementioned steps to reset the user's password.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://ostechnix.com/how-to-reset-sudo-password-in-ubuntu-20-04-lts/
|
||||||
|
|
||||||
|
作者:[sk][a]
|
||||||
|
选题:[lkxed][b]
|
||||||
|
译者:[译者ID](https://github.com/译者ID)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://ostechnix.com/author/sk/
|
||||||
|
[b]: https://github.com/lkxed
|
||||||
|
[1]: https://ostechnix.com/install-ubuntu-desktop/
|
||||||
|
[2]: https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/
|
||||||
|
[3]: https://ostechnix.com/wp-content/uploads/2022/05/Reset-Sudo-Password-In-Ubuntu.png
|
||||||
|
[4]: https://ostechnix.com/wp-content/uploads/2020/05/Boot-into-normal-mode-in-Ubuntu.png
|
||||||
|
[5]: https://ostechnix.com/wp-content/uploads/2020/05/Booting-into-normal-mode-from-rescue-mode-in-Ubuntu.png
|
@ -0,0 +1,191 @@
|
|||||||
|
[#]: subject: "Install Specific Package Version With Apt Command in Ubuntu"
|
||||||
|
[#]: via: "https://itsfoss.com/apt-install-specific-version-2/"
|
||||||
|
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||||
|
[#]: collector: "lkxed"
|
||||||
|
[#]: translator: " "
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
Install Specific Package Version With Apt Command in Ubuntu
|
||||||
|
======
|
||||||
|
|
||||||
|
Want to install a specific version of a package in Ubuntu? You can do that ‘easily’ in the following manner:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt install package_name=package_version
|
||||||
|
```
|
||||||
|
|
||||||
|
How do you know which versions are available for a certain package? Use this command:
|
||||||
|
|
||||||
|
```
|
||||||
|
apt list --all-versions package_name
|
||||||
|
```
|
||||||
|
|
||||||
|
In the screenshot below, you can see that I have two versions of VLC available and I use the command to install the older version:
|
||||||
|
|
||||||
|
![install specific versions apt ubuntu][1]
|
||||||
|
|
||||||
|
Sounds like a simple task, right? But things are not as simple as they look. There are several ifs and buts involved here.
|
||||||
|
|
||||||
|
This tutorial will cover all the important aspects of installing a specific program version using apt or apt-get commands.
|
||||||
|
|
||||||
|
### Things to know about installing a specific version of a program
|
||||||
|
|
||||||
|
You need to know a few things about how APT and repositories work in Ubuntu and Debian-based distributions.
|
||||||
|
|
||||||
|
#### No older versions from the same source
|
||||||
|
|
||||||
|
Ubuntu doesn’t keep older versions of packages in the repository. You may see more than one version in specific cases, temporarily. For example, you run the apt update (but not upgrade), and a new version is available. You may see two versions for the same package in the apt cache. But as soon as the package is upgraded to the new version, the older version is removed from the cache as well as the repositories.
|
||||||
|
|
||||||
|
#### Use multiple sources for different versions
|
||||||
|
|
||||||
|
To get multiple versions of the same package, you’ll have to add multiple sources. For example, VLC is in version 3.x. Adding the [VLC daily build PPA][2] will give the (unstable) version 4.x.
|
||||||
|
|
||||||
|
Similarly, **you can download a DEB file with a different version and install it**.
|
||||||
|
|
||||||
|
#### The higher version always gets the priority
|
||||||
|
|
||||||
|
If you have the same package available from more than one source, by default, Ubuntu will install the highest available version.
|
||||||
|
|
||||||
|
In the previous example, if I install VLC, it will install version 4.x, not 3.x.
|
||||||
|
|
||||||
|
#### The older version gets upgraded to the available newer version
|
||||||
|
|
||||||
|
That’s another potential problem. Even if you install the older version of a package, it gets upgraded to the newer version (if available). You have to [hold the package and stop it from upgrading][3].
|
||||||
|
|
||||||
|
#### Dependencies also need to be installed
|
||||||
|
|
||||||
|
If the package has dependencies, you’ll have to install the required version of the dependent packages as well.
|
||||||
|
|
||||||
|
Now that you know a few potential issues let’s see how to tackle them.
|
||||||
|
|
||||||
|
### Installing specific version of a package
|
||||||
|
|
||||||
|
I am taking the example of VLC in this tutorial. VLC version 3.0.16 is available in Ubuntu’s repositories. I added the daily build PPA and that gives me the release candidate of VLC version 4.0.
|
||||||
|
|
||||||
|
As you can see, I have two VLC versions available in the system right now:
|
||||||
|
|
||||||
|
![install specific versions apt ubuntu][4]
|
||||||
|
|
||||||
|
```
|
||||||
|
[email protected]:~$ apt list -a vlc
|
||||||
|
Listing... Done
|
||||||
|
vlc/jammy 4.0.0~rc1~~git20220516+r92284+296~ubuntu22.04.1 amd64
|
||||||
|
vlc/jammy 3.0.16-1build7 amd64
|
||||||
|
vlc/jammy 3.0.16-1build7 i386
|
||||||
|
```
|
||||||
|
|
||||||
|
Since the higher version takes priority, using ‘apt install vlc’ will result in the installation of VLC 4.0. But I want to install the older version 3.0.16 for the sake of this tutorial.
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt install vlc=3.0.16-1build7
|
||||||
|
```
|
||||||
|
|
||||||
|
But here’s the thing. The vlc package has several dependencies and those dependencies also need specific versions. However, Ubuntu tries to install the available higher versions for them, and thus, you get the classic ‘[you have held broken packages][5]‘ error.
|
||||||
|
|
||||||
|
![problem installing specific version apt ubuntu][6]
|
||||||
|
|
||||||
|
To fix this, you have to provide specific versions of all the dependent packages it complains about. So that command becomes something like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt install vlc=3.0.16-1build7 \
|
||||||
|
vlc-bin=3.0.16-1build7 \
|
||||||
|
vlc-plugin-base=3.0.16-1build7 \
|
||||||
|
vlc-plugin-qt=3.0.16-1build7 \
|
||||||
|
vlc-plugin-video-output=3.0.16-1build7 \
|
||||||
|
vlc-l10n=3.0.16-1build7 \
|
||||||
|
vlc-plugin-access-extra=3.0.16-1build7 \
|
||||||
|
vlc-plugin-notify=3.0.16-1build7 \
|
||||||
|
vlc-plugin-samba=3.0.16-1build7 \
|
||||||
|
vlc-plugin-skins2=3.0.16-1build7 \
|
||||||
|
vlc-plugin-video-splitter=3.0.16-1build7 \
|
||||||
|
vlc-plugin-visualization=3.0.16-1build7
|
||||||
|
```
|
||||||
|
|
||||||
|
In case you are wondering, the trailing \ at the end of each line is just a way to write a single command over multiple lines.
|
||||||
|
|
||||||
|
**Does it work? In many cases, it will.** But I have chosen a complicated example of VLC, which has lots of dependencies. Even the mentioned dependencies have dependencies on other packages. It gets messy.
|
||||||
|
|
||||||
|
An alternative is to specify the source while installing.
|
||||||
|
|
||||||
|
#### Alternatively, specify the repository source
|
||||||
|
|
||||||
|
You have added multiple sources, so you should have some idea about the sources the package comes from.
|
||||||
|
|
||||||
|
Use the command below and search for the repository:
|
||||||
|
|
||||||
|
```
|
||||||
|
apt-cache policy | less
|
||||||
|
```
|
||||||
|
|
||||||
|
Focus on the lines that come after the repository name:
|
||||||
|
|
||||||
|
```
|
||||||
|
500 http://security.ubuntu.com/ubuntu jammy-security/multiverse i386 Packages
|
||||||
|
release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=multiverse,b=i386
|
||||||
|
origin security.ubuntu.com
|
||||||
|
```
|
||||||
|
|
||||||
|
You can specify the o,l,a, etc parameters.
|
||||||
|
|
||||||
|
In my original example, I want to install VLC from Ubuntu’s repository (to get 3.16) instead of the PPA (which gives me 4).
|
||||||
|
|
||||||
|
So the command below will install VLC 3.16 along with all the dependencies:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt install -t "o=ubuntu" vlc
|
||||||
|
```
|
||||||
|
|
||||||
|
![install from repository source][7]
|
||||||
|
|
||||||
|
Looks good? But the problem comes when you have to update the system. Then it complains about not finding the specified version.
|
||||||
|
|
||||||
|
**What else can be done?**
|
||||||
|
|
||||||
|
To install an older version, remove the source of the newer version from your system (if possible). It helps get rid of the dependencies hell issues.
|
||||||
|
|
||||||
|
If that’s not possible, check if you can get it in some other packaging formats like Snap, Flatpak, AppImage, etc. In fact, Snap and Flatpak also allow you to choose and install from available versions. Since the applications are sandboxed, it’s easier to manage the dependencies for different versions.
|
||||||
|
|
||||||
|
#### Hold the package and prevent upgrade
|
||||||
|
|
||||||
|
If you manage to install a specific program version, you may want to avoid accidentally upgrading to the newer version. It’s not too complicated to achieve this.
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt-mark hold package_name
|
||||||
|
```
|
||||||
|
|
||||||
|
You can remove the hold so that it can be upgraded later:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt-mark unhold package_name
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that dependencies of a package are not automatically held. They need to be individually mentioned.
|
||||||
|
|
||||||
|
### Conclusion
|
||||||
|
|
||||||
|
As you can see, there is a provision to install the selected version of a program. Things only get complicated if the package has dependencies. Then you get into the dependency hell.
|
||||||
|
|
||||||
|
I hope you learned a few new things in this tutorial. If you have questions or suggestions to improve it, please let me know in the comment section.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://itsfoss.com/apt-install-specific-version-2/
|
||||||
|
|
||||||
|
作者:[Abhishek Prakash][a]
|
||||||
|
选题:[lkxed][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/lkxed
|
||||||
|
[1]: https://itsfoss.com/wp-content/uploads/2022/05/install-specific-versions-apt-ubuntu.png
|
||||||
|
[2]: https://launchpad.net/~videolan/+archive/ubuntu/master-daily
|
||||||
|
[3]: https://itsfoss.com/prevent-package-update-ubuntu/
|
||||||
|
[4]: https://itsfoss.com/wp-content/uploads/2022/05/install-specific-versions-apt-ubuntu.png
|
||||||
|
[5]: https://itsfoss.com/held-broken-packages-error/
|
||||||
|
[6]: https://itsfoss.com/wp-content/uploads/2022/05/problem-installing-specific-version-apt-ubuntu-800x365.png
|
||||||
|
[7]: https://itsfoss.com/wp-content/uploads/2022/05/install-from-repository-source-800x578.png
|
@ -0,0 +1,109 @@
|
|||||||
|
[#]: subject: "Adobe Illustrator Alternative Inkscape Releases Version 1.2"
|
||||||
|
[#]: via: "https://news.itsfoss.com/inkscape-1-2-release/"
|
||||||
|
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||||
|
[#]: collector: "lkxed"
|
||||||
|
[#]: translator: "lkxed"
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
Adobe Illustrator 的替代品 Inkscape 发布了 1.2 版本
|
||||||
|
======
|
||||||
|
Inkscape 1.2 是一个激动人心的更新,包含许多有用的改进和新增功能。试一试吧!
|
||||||
|
|
||||||
|
![Inkscape][1]
|
||||||
|
|
||||||
|
Inkscape 是一个流行的开源矢量图形处理程序,可用于 Linux、Windows 和 macOS。
|
||||||
|
|
||||||
|
它的最新版本侧重于改进现有工具,以及提供更多自定义选项。
|
||||||
|
|
||||||
|
此外,它还有一些新增功能。让我们来看看吧!
|
||||||
|
|
||||||
|
### Inkscape 1.2:有什么新功能?
|
||||||
|
|
||||||
|
![Inkscape 1.2 is here!][2]
|
||||||
|
|
||||||
|
Inkscape 1.2 是一个激动人心的更新,它包含了许多有用的增强功能。其中一些关键变化包括:
|
||||||
|
|
||||||
|
* 改进的渐变编辑器
|
||||||
|
* 新的捕捉模式
|
||||||
|
* 支持多页文档
|
||||||
|
* 改进的导出对话框
|
||||||
|
* 可定制的工具栏
|
||||||
|
|
||||||
|
在这里,我将重点介绍重要的功能改进:
|
||||||
|
|
||||||
|
#### 多页文档支持
|
||||||
|
|
||||||
|
![][4]
|
||||||
|
|
||||||
|
你现在可以在同一个文档中创建多个标准/自定义大小的页面,并把它们保存为一个多页的 PDF 文档。
|
||||||
|
|
||||||
|
不仅是导出,你还可以导入多页 PDF 来简化操作。
|
||||||
|
|
||||||
|
### 自定义调色板
|
||||||
|
|
||||||
|
你现在可以轻松地更改尺寸、重新配置颜色,以此来尝试所有可用的调色板,然后选择你真正喜欢的颜色。
|
||||||
|
|
||||||
|
特别是当你需要在用户界面中使用多个调色板时,它会让操作更流畅。
|
||||||
|
|
||||||
|
### 新的“平铺”实时路径效果
|
||||||
|
|
||||||
|
如果你正在处理很多个对象,并想尝试不同路径效果,那么你应该会喜欢新的平铺实时路径效果。
|
||||||
|
|
||||||
|
你可以轻松调整镜像模式、调整间隙、添加行和列,从而获得大量发挥创意的机会。
|
||||||
|
|
||||||
|
### 图层和对象对话框
|
||||||
|
|
||||||
|
![][5]
|
||||||
|
|
||||||
|
大多数改进使得体验比以前更直接。使用新的合并图层和对象对话框,你可以根据要查找的图层,快速组织/查找对象。
|
||||||
|
|
||||||
|
你甚至可以自定义图层和对象颜色来区分它们。
|
||||||
|
|
||||||
|
### 导出对话框
|
||||||
|
|
||||||
|
![][6]
|
||||||
|
|
||||||
|
现在,导出对话框为你提供了选择简单/批量导出的选项,以及选择文件格式和 DPI 设置的能力。
|
||||||
|
|
||||||
|
### 其他改进
|
||||||
|
|
||||||
|
除了上面的主要亮点外,还有其他的一些重大变化,包括:
|
||||||
|
|
||||||
|
* 两种新的画布捕捉模式有助于对齐对象
|
||||||
|
* 你可以在“<ruby>填充和描边<rt>Fill and Stroke</rt></ruby>”对话框中选择渐变
|
||||||
|
* 编辑<ruby>标记<rt>marker</rt></ruby>的能力
|
||||||
|
* 改进了与扩展的兼容性
|
||||||
|
* 更新了 SVG 字体编辑器
|
||||||
|
* 性能改进
|
||||||
|
* 可配置的工具栏
|
||||||
|
|
||||||
|
你可以参考 [Inkscape 1.2 发行说明][7] 来查看所有的技术变化。
|
||||||
|
|
||||||
|
### 下载 Inkscape 1.2
|
||||||
|
|
||||||
|
你可以从它的官方网站下载 AppImage 格式的 Inkscape 1.2 软件包,或查看其他适用于 Windows/macOS 平台的可用软件包。
|
||||||
|
|
||||||
|
[Inkscape 1.2][8]
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://news.itsfoss.com/inkscape-1-2-release/
|
||||||
|
|
||||||
|
作者:[Ankush Das][a]
|
||||||
|
选题:[lkxed][b]
|
||||||
|
译者:[lkxed](https://github.com/lkxed)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://news.itsfoss.com/author/ankush/
|
||||||
|
[b]: https://github.com/lkxed
|
||||||
|
[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/inkscape-1-2.jpg
|
||||||
|
[2]: https://youtu.be/1U4hVbvRr_g
|
||||||
|
[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/inkscape-1-2-multi-document.jpg
|
||||||
|
[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/inkscape-1-2layers-objects-1024x593.jpg
|
||||||
|
[6]: https://news.itsfoss.com/wp-content/uploads/2022/05/inkscape1-2-export-1024x688.jpg
|
||||||
|
[7]: https://media.inkscape.org/media/doc/release_notes/1.2/Inkscape_1.2.html
|
||||||
|
[8]: https://inkscape.org/release/inkscape-1.2/
|
@ -0,0 +1,84 @@
|
|||||||
|
[#]: subject: "How open source leads the way for sustainable technology"
|
||||||
|
[#]: via: "https://opensource.com/article/22/5/open-source-sustainable-technology"
|
||||||
|
[#]: author: "Hannah Smith https://opensource.com/users/hanopcan"
|
||||||
|
[#]: collector: "lkxed"
|
||||||
|
[#]: translator: "PeterPan0106"
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
开源为可持续发展技术提供新思路
|
||||||
|
======
|
||||||
|
开源和社会对于更为稳定的技术演进的需求具有相同的目标,即实现一个更为可持续的未来。
|
||||||
|
|
||||||
|
![][1]
|
||||||
|
(图源: opensource.com)
|
||||||
|
|
||||||
|
在可持续发展和环境问题上,目前正在发生明确的变化。关注地球的状况并为之做出努力已经成为主流思想。举个例子,看看基于气候的风险资本主义。气候技术风险投资公司(CTVC)的气候资本名单在过去两年中增加了[一倍多][2]。涌入的资本表明了解决艰难的气候挑战的愿望和意愿。
|
||||||
|
|
||||||
|
人们想采取行动,这很好,我持相同态度!但我也看到了一个真正的风险:当人们急于采取行动并参与到其中时,他们可能会不知不觉地卷入洗绿运动中。
|
||||||
|
|
||||||
|
维基百科对 "洗绿 "的定义称其为 "一种营销策略,其中绿色公关和绿色营销被欺骗性地用来说服公众,使其相信一个组织的产品、目标和政策是环保的"。在我看来,洗绿既是有意为之,也是无意中发生的。外面有很多想有所作为的好人,但对复杂的环境系统或围绕可持续发展的问题的深度还不甚了解。
|
||||||
|
|
||||||
|
我们很容易落入这样的陷阱,即认为通过植树来抵消旅行或数据中心的排放等简单的购买行为会使一些东西变得更加绿色。虽然这些努力是值得提倡的,而且植树是改善可持续发展的一个可行的解决方案,但它们只是一个很好的开端,仍然需要进行更多的努力才能真正产生变革。
|
||||||
|
|
||||||
|
那么,一个人或一个社区可以做些什么来使数字技术真正地更加可持续?
|
||||||
|
|
||||||
|
可持续性对不同的人有不同的含义。我喜欢的最简短的定义来自1987年的《布伦特兰报告》,该报告将其概括为 "既能满足当代的需要,同时又不损及后代满足其需要的发展模式"。可持续发展的核心是优先考虑长期思维。
|
||||||
|
|
||||||
|
### 可持续发展不仅仅是保护环境
|
||||||
|
|
||||||
|
在可持续性的定义中,有三个相互关联的关键支柱。
|
||||||
|
|
||||||
|
1. 环境
|
||||||
|
2. 经济 / 政策
|
||||||
|
3. 社会
|
||||||
|
|
||||||
|
关于可持续发展的讨论越来越多地被气候危机所主导,这是有道理的。随着我们继续通过不可逆转的生态临界点,减少世界上较富裕国家的碳排放的需求变得越来越紧迫。但真正的可持续性是一套更全面的体系,正如三大支柱所展示的那样。
|
||||||
|
|
||||||
|
碳排放无疑是可持续性的一部分。许多人认为排放只是一个环境问题。只要从空气中移除更多的碳,一切都会好起来。但社会问题也是可持续性的一部分。谁会受到这些碳排放的影响?谁将承受我们气候变化带来的最大影响?谁因海平面上升而失去了家园,或因天气模式变化而失去了可靠的水源?这就是为什么你可能听说过 "气候正义就是社会正义 "这句话。
|
||||||
|
|
||||||
|
仅仅把减碳看作是可持续发展会令你的视野被限定在碳上。我经常认为,气候变化是社会在更大范围内错失可持续性的一个症状。相反,关键是要解决首先导致气候变化的根本原因。解决这些问题将使长期解决这些问题成为可能,而短期解决可能只会将问题推向另一个脆弱的边缘。
|
||||||
|
|
||||||
|
其根本原因很复杂。但是,如果我追根溯源,我看到根本问题是由主导的西方价值观并旨在延续这些价值观的系统所驱动的。这些价值观是什么呢?一语概之,它们是快速增长和对利润的攫取高于一切。
|
||||||
|
|
||||||
|
这就是为什么关于可持续性的对话如果不包括社会问题或经济的设计方式,就不会达成真正的解决方案。毕竟,社会和掌握权力的人决定了他们自己的价值观是什么,或者不是什么。
|
||||||
|
|
||||||
|
### 我能做什么?
|
||||||
|
|
||||||
|
科技领域的许多人目前正致力于解决这些问题,并想知道怎样行动更有意义。一个常见的方法是研究如何优化他们制造的技术,使其更有效地使用电力。世界上60%的电力仍然是通过燃烧化石燃料产生的,尽管可再生能源的发电能力不断提高。但从逻辑上讲,使用更少的电力意味着产生更少的碳排放。
|
||||||
|
|
||||||
|
是的,这是很有意义的,任何人都可以尝试,立即就能生效。当用户加载一个页面时,优化发送的资源,以发送更少的数据,将使用更少的能源。因此,优化服务器,使其在一天中的不同时段运行,例如,当有更多的可再生能源可用时运行,或删除多余信息的旧存储,如分析数据或日志。
|
||||||
|
|
||||||
|
但考虑到杰文的悖论:使某样东西更有效率往往会导致使用更多的东西,而不是减少。当人们更容易和更容易使用某样东西时,他们最终会使用更多。在某种角度,这是好的。性能更好的技术是一件好事,有助于提高包容性和触及性,这对社会是有益的。但是,气候变化和可持续性的长期解决方案需要围绕社会和技术之间的关系进行更深入、更令人不适的对话。所有这些技术在为什么和谁服务?它正在加速哪些行为和做法?
|
||||||
|
|
||||||
|
将技术的演进视为进步很正常,一些人认为:技术将把世界从气候变化中拯救出来。一些聪明的人正在通过艰苦卓绝的努力改善这一问题,所以其他人不需要改变他们的方式。问题是,许多社区和生态系统已经在遭受更大的创伤。
|
||||||
|
|
||||||
|
例如,对更多更高速传输的数据的追求正在导致智利的一些社区没有足够的水来种植农作物。因为数据中心正在使用这些宝贵的水源。移动电话造成的污染有70%来自于其制造。制造移动设备并为其提供动力的锂和钴等原材料通常是从弱势的社区中提取的,而这些社区几乎没有能力阻止制造商对其土地的破坏,当然也没有分享所获利润。尽管如此,每两年升级一次手机的做法已经变得很普遍了。
|
||||||
|
|
||||||
|
### 开源思路引领可持续发展之路
|
||||||
|
|
||||||
|
现在是时候将数字技术的使用视为一种宝贵的资源,这对地球和(通常已经处于弱势的)社区都有影响。
|
||||||
|
|
||||||
|
开源社区已经是帮助人们认识到有另一种解决方案:开源。开源与我们更广泛的社会为实现更可持续的未来而需要做的事情之间有巨大的相似之处。更加开放和包容是其中的一个关键部分。
|
||||||
|
|
||||||
|
我们还需要在社会的各个层面进行思维转变,将数字技术视为有代价的增长,而不是我们今天看到的大量廉价和免费的东西。我们需要明智地将其优先用于对于社会而言最为重要的事情。更重要的是,我们需要关注并消除其创造和长期使用所带来的危害,并与社会上的每个人公平地分享其创造的财富,无论他们是否是数字技术的使用者。这些事情不会在一夜之间发生,但它们是我们可以共同推动的事情,以便我们都能长期、可持续地享受数字技术的好处。
|
||||||
|
|
||||||
|
本文节选自一篇较长的演讲。要想看到演讲的全文或查看幻灯片,请参见 ["我们如何使数字技术更具有可持续性 "][3]一文。
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://opensource.com/article/22/5/open-source-sustainable-technology
|
||||||
|
|
||||||
|
作者:[Hannah Smith][a]
|
||||||
|
选题:[lkxed][b]
|
||||||
|
译者:[PeterPan0106](https://github.com/PeterPan0106)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://opensource.com/users/hanopcan
|
||||||
|
[b]: https://github.com/lkxed
|
||||||
|
[1]: https://opensource.com/sites/default/files/pictures/green-780x400.jpg
|
||||||
|
[2]: https://climatetechvc.substack.com/p/-a-running-list-of-climate-tech-vcs?s=w
|
||||||
|
[3]: https://opcan.co.uk/talk/wordfest-live-2022
|
@ -0,0 +1,109 @@
|
|||||||
|
[#]: subject: "How To Enable Minimize And Maximize Buttons In Fedora 36 Workstation"
|
||||||
|
[#]: via: "https://ostechnix.com/how-to-enable-minimize-and-maximize-buttons-in-fedora/"
|
||||||
|
[#]: author: "sk https://ostechnix.com/author/sk/"
|
||||||
|
[#]: collector: "lkxed"
|
||||||
|
[#]: translator: "geekpi"
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
如何在 Fedora 36 Workstation 中启用最小化和最大化按钮
|
||||||
|
======
|
||||||
|
今天,我们将看到 Fedora 桌面的安装后步骤之一。这个简短的指南解释了如何在 Fedora GNOME Workstation 和 Silverblue 版本的应用窗口中启用最小化和最大化按钮。
|
||||||
|
|
||||||
|
### 介绍
|
||||||
|
|
||||||
|
你可能已经知道,Fedora Silverblue 和 Fedora GNOME Workstation 版本的应用窗口中没有最小化和最大化按钮。
|
||||||
|
|
||||||
|
如果要最小化应用窗口,需要右键单击其标题栏并从上下文菜单中选择最小化选项。
|
||||||
|
|
||||||
|
不幸的是,你甚至无法在 Firefox 中使用鼠标获得该选项。要最小化 Firefox 窗口,你要点击**左 ALT+空格**键并选择最小化选项。
|
||||||
|
|
||||||
|
我不知道隐藏最常用的按钮有什么好处。 Ubuntu GNOME 桌面有最小/最大按钮,但 Fedora 没有。
|
||||||
|
|
||||||
|
如果你想恢复 Fedora GNOME 和 Silverblue 版本中的最小化和最大化按钮,你可以借助 Fedora 中的 **Gnome Tweaks** 程序和 **Dash to Panel** 扩展来启用它们。
|
||||||
|
|
||||||
|
### 在 Fedora 中安装 Gnome Tweaks
|
||||||
|
|
||||||
|
**Gnome Tweaks**,以前称为 **Tweak Tool**,是用于高级 GNOME 3 设置的图形界面。它主要是为 GNOME Shell 设计的,但也可以在其他桌面中使用。如果你在不同的桌面上使用 Tweaks,你可能无法拥有所有功能。它在 Fedora 的默认仓库中可用。因此,你可以使用 dnf 包管理器在 Fedora 上安装 Gnome Tweaks,如下所示:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ sudo dnf install gnome-tweaks
|
||||||
|
```
|
||||||
|
|
||||||
|
如果你使用 Fedora Silverblue,你需要使用以下命令进入你的 toolbox 容器:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ toolbox enter
|
||||||
|
```
|
||||||
|
|
||||||
|
然后按照前面的命令安装 Tweaks。
|
||||||
|
|
||||||
|
### 在浏览器中添加 Gnome Shell Integration 插件
|
||||||
|
|
||||||
|
确保你在浏览器中添加了 **“Gnome Shell Integration”** 插件。此扩展提供与 GNOME shell 和相应扩展仓库的集成。
|
||||||
|
|
||||||
|
如果你尚未添加它,请转到插件页并搜索并安装它。
|
||||||
|
|
||||||
|
![Add Gnome Shell Integration Add-on In Firefox Browser][1]
|
||||||
|
|
||||||
|
将出现一个弹出窗口。单击“添加”以启用加载项。添加此扩展程序后,你将在浏览器的工具栏上看到 GNOME 图标。
|
||||||
|
|
||||||
|
### 在 Fedora 中启用 Dash 到面板扩展
|
||||||
|
|
||||||
|
**Dash to panel** 扩展是 Gnome Shell 的图标任务栏。此扩展将 dash 移动到 gnome 主面板中,以便将应用启动器和系统托盘组合到一个面板中,类似于 KDE Plasma 和 Windows 7 以上操作系统中的面板。
|
||||||
|
|
||||||
|
Dash to panel 扩展为你提供了一个永久可见的面板,其中包含最喜欢的快捷方式。因此,不再需要单独的 dock 来轻松访问正在运行和收藏的应用。
|
||||||
|
|
||||||
|
要启用 Dash to panel 扩展,请进入 **GNOME extensions** 站点并搜索 **“Dash to panel”** 扩展。
|
||||||
|
|
||||||
|
![Search for Dash to panel extension in Gnome extensions site][2]
|
||||||
|
|
||||||
|
单击搜索结果中的 Dash to panel 链接。你将被重定向到 Dash to panel 扩展的官方页面。点击 **ON** 按钮。
|
||||||
|
|
||||||
|
![Enable Dash to panel extension][3]
|
||||||
|
|
||||||
|
在下一个窗口中,单击安装按钮以启用 Dash to panel 扩展。
|
||||||
|
|
||||||
|
![Install Dash to panel extension][4]
|
||||||
|
|
||||||
|
激活此扩展程序后,你将在底部看到 Dash 面板以及你最喜欢的快捷方式。
|
||||||
|
|
||||||
|
### 在 Fedora 中启用最小化和最大化按钮
|
||||||
|
|
||||||
|
打开 **Gnome Tweaks** 应用。进入 **Windows Tittlebars** 并打开最小/最大按钮。
|
||||||
|
|
||||||
|
![Enable minimize and maximize buttons in application windows in Fedora][5]
|
||||||
|
|
||||||
|
当你打开最小/最大按钮,最小化和最大化按钮将出现在所有应用的窗口中。
|
||||||
|
|
||||||
|
![Minimize, maximize buttons appears in applications windows in Fedora][6]
|
||||||
|
|
||||||
|
默认情况下,最小/最大按钮在右侧可见。你可以将其位置更改为左侧或右侧。
|
||||||
|
|
||||||
|
Dash to panel 扩展有很多微调和自定义选项。右键单击 Dash 面板并选择设置选项,然后根据你的喜好开始对其进行自定义。
|
||||||
|
|
||||||
|
**资源:**
|
||||||
|
|
||||||
|
* [Dash to panel 网站][7]
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://ostechnix.com/how-to-enable-minimize-and-maximize-buttons-in-fedora/
|
||||||
|
|
||||||
|
作者:[sk][a]
|
||||||
|
选题:[lkxed][b]
|
||||||
|
译者:[geekpi](https://github.com/geekpi)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://ostechnix.com/author/sk/
|
||||||
|
[b]: https://github.com/lkxed
|
||||||
|
[1]: https://ostechnix.com/wp-content/uploads/2022/05/Add-Gnome-Shell-Integration-Add-on-In-Firefox-Browser.png
|
||||||
|
[2]: https://ostechnix.com/wp-content/uploads/2021/01/Search-for-Dash-to-panel-extension-in-Gnome-extensions-site.png
|
||||||
|
[3]: https://ostechnix.com/wp-content/uploads/2021/01/Enable-Dash-to-panel-extension.png
|
||||||
|
[4]: https://ostechnix.com/wp-content/uploads/2021/01/Install-Dash-to-panel-extension.png
|
||||||
|
[5]: https://ostechnix.com/wp-content/uploads/2021/01/Enable-Minimize-And-Maximize-Buttons-In-Application-Windows-In-Fedora.png
|
||||||
|
[6]: https://ostechnix.com/wp-content/uploads/2021/01/Minimize-maximize-buttons-appears-in-applications-windows-in-Fedora.png
|
||||||
|
[7]: https://extensions.gnome.org/extension/1160/dash-to-panel/
|
@ -0,0 +1,130 @@
|
|||||||
|
[#]: subject: "Structured Data Processing with Spark SQL"
|
||||||
|
[#]: via: "https://www.opensourceforu.com/2022/05/structured-data-processing-with-spark-sql/"
|
||||||
|
[#]: author: "Phani Kiran https://www.opensourceforu.com/author/phani-kiran/"
|
||||||
|
[#]: collector: "lkxed"
|
||||||
|
[#]: translator: "geekpi"
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
用 Spark SQL 进行结构化数据处理
|
||||||
|
======
|
||||||
|
Spark SQL 是 Spark 生态系统中处理结构化格式数据的模块。它在内部使用 Spark Core API 进行处理,但对用户的使用进行了抽象。这篇文章深入浅出,告诉你 Spark SQL 3.x 的新内容。
|
||||||
|
|
||||||
|
![][1]
|
||||||
|
|
||||||
|
有了 Spark SQL,用户还可以编写 SQL 风格的查询。这对于精通结构化查询语言或 SQL 的广大用户群体来说,基本上是很有帮助的。用户也将能够在结构化数据上编写交互式和临时性的查询。Spark SQL 弥补了弹性分布式数据集(RDD)和关系表之间的差距。RDD 是 Spark 的基本数据结构。它将数据作为分布式对象存储在适合并行处理的节点集群中。RDD 很适合底层处理,但在运行时很难调试,程序员不能自动推断 schema。另外,RDD 没有内置的优化功能。Spark SQL 提供了 DataFrames 和数据集来解决这些问题。
|
||||||
|
|
||||||
|
Spark SQL 可以使用现有的 Hive 元存储、SerDes 和 UDFs。它可以使用 JDBC/ODBC 连接到现有的 BI 工具。
|
||||||
|
|
||||||
|
### 数据源
|
||||||
|
|
||||||
|
大数据处理通常需要处理不同的文件类型和数据源(关系型和非关系型)的能力。Spark SQL 支持一个统一的 DataFrame 接口来处理不同类型的源,如下所示。
|
||||||
|
|
||||||
|
*文件:*
|
||||||
|
|
||||||
|
* CSV
|
||||||
|
* Text
|
||||||
|
* JSON
|
||||||
|
* XML
|
||||||
|
|
||||||
|
*JDBC/ODBC:*
|
||||||
|
|
||||||
|
* MySQL
|
||||||
|
* Oracle
|
||||||
|
* Postgres
|
||||||
|
|
||||||
|
*带 schema 的文件:*
|
||||||
|
|
||||||
|
* AVRO
|
||||||
|
* Parquet
|
||||||
|
|
||||||
|
*Hive 表:*
|
||||||
|
|
||||||
|
* Spark SQL 也支持读写存储在 Apache Hive 中的数据。
|
||||||
|
|
||||||
|
通过 DataFrame,用户可以无缝地读取这些多样化的数据源,并对其进行转换/连接。
|
||||||
|
|
||||||
|
### Spark SQL 3.x 的新内容
|
||||||
|
|
||||||
|
在以前的版本中(Spark 2.x),查询计划是基于启发式规则和成本估算的。从解析到逻辑和物理查询计划,最后到优化的过程是连续的。这些版本对转换和行动的运行时特性几乎没有可见性。因此,由于以下原因,查询计划是次优的:
|
||||||
|
|
||||||
|
* 缺失和过时的统计数据
|
||||||
|
* 次优的启发式方法
|
||||||
|
* 错误的成本估计
|
||||||
|
|
||||||
|
Spark 3.x 通过使用运行时数据来迭代改进查询计划和优化,增强了这个过程。前一阶段的运行时统计数据被用来优化后续阶段的查询计划。这里有一个反馈回路,有助于重新规划和重新优化执行计划。
|
||||||
|
|
||||||
|
![Figure 1: Query planning][2]
|
||||||
|
|
||||||
|
#### 自适应查询执行(AQE)
|
||||||
|
|
||||||
|
查询被改变为逻辑计划,最后变成物理计划。这里的概念是“重新优化”。它利用前一阶段的可用数据,为后续阶段重新优化。正因为如此,整个查询的执行要快得多。
|
||||||
|
|
||||||
|
AQE 可以通过设置 SQL 配置来启用,如下所示(Spark 3.0 中默认为 false):
|
||||||
|
|
||||||
|
```
|
||||||
|
spark.conf.set(“spark.sql.adaptive.enabled”,true)
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 动态合并 shuffle 分区
|
||||||
|
|
||||||
|
Spark 在 shuffle 操作后确定最佳的分区数量。在 AQE 中,Spark 使用默认的分区数,即 200 个。这可以通过配置来启用。
|
||||||
|
|
||||||
|
```
|
||||||
|
spark.conf.set(“spark.sql.adaptive.coalescePartitions.enabled”,true)
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 动态切换 join 策略
|
||||||
|
|
||||||
|
广播哈希是最好的连接操作。如果其中一个数据集很小,Spark 可以动态地切换到广播 join,而不是在网络上 shuffe 大量的数据。
|
||||||
|
|
||||||
|
#### 动态优化倾斜 join
|
||||||
|
|
||||||
|
如果数据分布不均匀,数据会出现倾斜,会有一些大的分区。这些分区占用了大量的时间。Spark 3.x 通过将大分区分割成多个小分区来进行优化。这可以通过设置来启用:
|
||||||
|
|
||||||
|
```
|
||||||
|
spark.conf.set(“spark.sql.adaptive.skewJoin.enabled”,true)
|
||||||
|
```
|
||||||
|
|
||||||
|
![Figure 2: Performance improvement in Spark 3.x (Source: Databricks)][3]
|
||||||
|
|
||||||
|
### 其他改进措施
|
||||||
|
|
||||||
|
|
||||||
|
此外,Spark SQL 3.x还支持以下内容。
|
||||||
|
|
||||||
|
#### 动态分区修剪
|
||||||
|
|
||||||
|
3.x 将只读取基于其中一个表的值的相关分区。这消除了解析大表的需要。
|
||||||
|
|
||||||
|
#### Join 提示
|
||||||
|
|
||||||
|
如果用户对数据有了解,这允许用户指定要使用的 join 策略。这增强了查询的执行过程。
|
||||||
|
|
||||||
|
#### 兼容 ANSI SQL
|
||||||
|
|
||||||
|
在兼容 Hive 的早期版本的 Spark 中,我们可以在查询中使用某些关键词,这样做是完全可行的。然而,这在 Spark SQL 3 中是不允许的,因为它有完整的 ANSI SQL 支持。例如,“将字符串转换为整数”会在运行时产生异常。它还支持保留关键字。
|
||||||
|
|
||||||
|
#### 较新的 Hadoop、Java 和 Scala 版本
|
||||||
|
|
||||||
|
从 Spark 3.0 开始,支持 Java 11 和 Scala 2.12。 Java 11 具有更好的原生协调和垃圾校正,从而带来更好的性能。 Scala 2.12 利用了 Java 8 的新特性,优于 2.11。
|
||||||
|
|
||||||
|
Spark 3.x 提供了这些现成的有用功能,而无需开发人员操心。这将显着提高 Spark 的整体性能。
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://www.opensourceforu.com/2022/05/structured-data-processing-with-spark-sql/
|
||||||
|
|
||||||
|
作者:[Phani Kiran][a]
|
||||||
|
选题:[lkxed][b]
|
||||||
|
译者:[geekpi](https://github.com/geekpi)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://www.opensourceforu.com/author/phani-kiran/
|
||||||
|
[b]: https://github.com/lkxed
|
||||||
|
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Spark-SQL-Data-cluster.jpg
|
||||||
|
[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-Query-planning.jpg
|
||||||
|
[3]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-2-Performance-improvement-in-Spark-3.x-Source-Databricks.jpg
|
Loading…
Reference in New Issue
Block a user