mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-16 22:42:21 +08:00
commit
0e038fa1a3
@ -0,0 +1,212 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: (bodhix)
|
||||||
|
[#]: reviewer: (wxy)
|
||||||
|
[#]: publisher: (wxy)
|
||||||
|
[#]: url: (https://linux.cn/article-10804-1.html)
|
||||||
|
[#]: subject: (How to Restart a Network in Ubuntu [Beginner’s Tip])
|
||||||
|
[#]: via: (https://itsfoss.com/restart-network-ubuntu)
|
||||||
|
[#]: author: (Sergiu https://itsfoss.com/author/sergiu/)
|
||||||
|
|
||||||
|
Linux 初学者:如何在 Ubuntu 中重启网络
|
||||||
|
======
|
||||||
|
|
||||||
|
你[是否正在使用基于 Ubuntu 的系统,然后发现无法连接网络][1]?你一定会很惊讶,很多的问题都可以简单地通过重启服务解决。
|
||||||
|
|
||||||
|
在这篇文章中,我会介绍在 Ubuntu 或者其他 Linux 发行版中重启网络的几种方法,你可以根据自身需要选择对应的方法。这些方法基本分为两类:
|
||||||
|
|
||||||
|
![Ubuntu Restart Network][2]
|
||||||
|
|
||||||
|
### 通过命令行方式重启网络
|
||||||
|
|
||||||
|
如果你使用的 Ubuntu 服务器版,那么你已经在使用命令行终端了。如果你使用的是桌面版,那么你可以通过快捷键 `Ctrl+Alt+T` [Ubuntu 键盘快捷键][3] 打开命令行终端。
|
||||||
|
|
||||||
|
在 Ubuntu 中,有多个命令可以重启网络。这些命令,一部分或者说大部分,也适用于在 Debian 或者其他的 Linux 发行版中重启网络。
|
||||||
|
|
||||||
|
#### 1、network manager 服务
|
||||||
|
|
||||||
|
这是通过命令行方式重启网络最简单的方法。它相当于是通过图形化界面重启网络(重启 Network-Manager 服务)。
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo service network-manager restart
|
||||||
|
```
|
||||||
|
|
||||||
|
此时,网络图标会消失一会儿然后重新显示。
|
||||||
|
|
||||||
|
#### 2、systemd
|
||||||
|
|
||||||
|
`service` 命令仅仅是这个方式的一个封装(同样的也是 init.d 系列脚本和 Upstart 相关命令的封装)。`systemctl` 命令的功能远多于 `service` 命令。通常我更喜欢使用这个命令。
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo systemctl restart NetworkManager.service
|
||||||
|
```
|
||||||
|
|
||||||
|
这时,网络图标又会消失一会儿。 如果你想了解 `systemctl` 的其他选项, 可以参考 man 帮助文档。
|
||||||
|
|
||||||
|
#### 3、nmcli
|
||||||
|
|
||||||
|
这是 Linux 上可以管理网络的另一个工具。这是一个功能强大而且实用的工具。很多系统管理员都喜欢使用该工具,因为它非常容易使用。
|
||||||
|
|
||||||
|
这种方法有两个操作步骤:关闭网络,再开启网络。
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo nmcli networking off
|
||||||
|
```
|
||||||
|
|
||||||
|
这样就会关闭网络,网络图标会消失。接下来,再开启网络:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo nmcli networking on
|
||||||
|
```
|
||||||
|
|
||||||
|
你可以通过 man 帮助文档了解 nmcli 的更多用法。
|
||||||
|
|
||||||
|
#### 4、ifup & ifdown
|
||||||
|
|
||||||
|
这两个命令直接操作网口,切换网口是否可以收发包的状态。这是 [Linux 中最应该了解的网络命令][4] 之一。
|
||||||
|
|
||||||
|
使用 `ifdown` 关闭所有网口,再使用 `ifup` 重新启用网口。
|
||||||
|
|
||||||
|
通常推荐的做法是将这两个命令一起使用。
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo ifdown -a && sudo ifup -a
|
||||||
|
```
|
||||||
|
|
||||||
|
注意:这种方法不会让网络图标从系统托盘中消失,另外,各种网络连接也会断。
|
||||||
|
|
||||||
|
#### 补充工具: nmtui
|
||||||
|
|
||||||
|
这是系统管理员们常用的另外一种方法。它是在命令行终端中管理网络的文本菜单工具。
|
||||||
|
|
||||||
|
```
|
||||||
|
nmtui
|
||||||
|
```
|
||||||
|
|
||||||
|
打开如下菜单:
|
||||||
|
|
||||||
|
![nmtui Menu][5]
|
||||||
|
|
||||||
|
注意:在 nmtui 中,可以通过 `up` 和 `down` 方向键选择选项。
|
||||||
|
|
||||||
|
选择 “Activate a connection”:
|
||||||
|
|
||||||
|
![nmtui Menu Select "Activate a connection"][6]
|
||||||
|
|
||||||
|
按下回车键,打开 “connections” 菜单。
|
||||||
|
|
||||||
|
![nmtui Connections Menu][7]
|
||||||
|
|
||||||
|
接下来,选择前面带星号(*)的网络。在这个例子中,就是 MGEO72。
|
||||||
|
|
||||||
|
![Select your connection in the nmtui connections menu.][8]
|
||||||
|
|
||||||
|
按下回车键。 这就将“停用”你的网络连接。
|
||||||
|
|
||||||
|
![nmtui Connections Menu with no active connection][9]
|
||||||
|
|
||||||
|
选择你要连接的网络:
|
||||||
|
|
||||||
|
![Select the connection you want in the nmtui connections menu.][10]
|
||||||
|
|
||||||
|
按下回车键。这样就重新激活了所选择的网络连接。
|
||||||
|
|
||||||
|
![nmtui Connections Menu][11]
|
||||||
|
|
||||||
|
按下 `Tab` 键两次,选择 “Back”:
|
||||||
|
|
||||||
|
![Select "Back" in the nmtui connections menu.][12]
|
||||||
|
|
||||||
|
按下回车键,回到 nmtui 的主菜单。
|
||||||
|
|
||||||
|
![nmtui Main Menu][13]
|
||||||
|
|
||||||
|
选择 “Quit” :
|
||||||
|
|
||||||
|
![nmtui Quit Main Menu][14]
|
||||||
|
|
||||||
|
退出该界面,返回到命令行终端。
|
||||||
|
|
||||||
|
就这样,你已经成功重启网络了。
|
||||||
|
|
||||||
|
### 通过图形化界面重启网络
|
||||||
|
|
||||||
|
显然,这是 Ubuntu 桌面版用户重启网络最简单的方法。如果这个方法不生效,你可以尝试使用前文提到的命令行方式重启网络。
|
||||||
|
|
||||||
|
NM 小程序是 [NetworkManager][15] 的系统托盘程序标志。我们将使用它来重启网络。
|
||||||
|
|
||||||
|
首先,查看顶部状态栏。你会在系统托盘找到一个网络图标 (因为我使用 Wi-Fi,所以这里是一个 Wi-Fi 图标)。
|
||||||
|
|
||||||
|
接下来,点击该图标(也可以点击音量图标或电池图标)。打开菜单。选择 “Turn Off” 关闭网络。
|
||||||
|
|
||||||
|
![Restart network in Ubuntu][16]
|
||||||
|
|
||||||
|
网络图标会在状态栏中消失,这表示你已经成功关闭网络了。
|
||||||
|
|
||||||
|
再次点击系统托盘重新打开菜单,选择 “Turn On”,重新开启网络。
|
||||||
|
|
||||||
|
![Restarting network in Ubuntu][17]
|
||||||
|
|
||||||
|
恭喜!你现在已经重启你的网络了。
|
||||||
|
|
||||||
|
#### 其他提示:刷新可用网络列表
|
||||||
|
|
||||||
|
如果你已经连接上一个网络,但是你想连接到另外一个网络,你如何刷新 WiFi 列表,查找其他可用的网络呢?我来向你展示一下。
|
||||||
|
|
||||||
|
Ubuntu 没有可以直接 “刷新 WiFi 网络” 的选项,它有点隐蔽。
|
||||||
|
|
||||||
|
你需要再次打开配置菜单,然后点击 “Select Network” 。
|
||||||
|
|
||||||
|
![Refresh wifi network list in Ubuntu][18]
|
||||||
|
|
||||||
|
选择对应的网络修改你的 WiFi 连接。
|
||||||
|
|
||||||
|
你无法马上看到可用的无线网络列表。打开网络列表之后,大概需要 5 秒才会显示其它可用的无线网络。
|
||||||
|
|
||||||
|
![Select another wifi network in Ubuntu][19]
|
||||||
|
|
||||||
|
等待大概 5 秒钟,看到其他可用的网络。
|
||||||
|
|
||||||
|
现在,你就可以选择你想要连接的网络,点击连接。这样就完成了。
|
||||||
|
|
||||||
|
### 总结
|
||||||
|
|
||||||
|
重启网络连接是每个 Linux 用户在使用过程中必须经历的事情。
|
||||||
|
|
||||||
|
我们希望这些方法可以帮助你处理这样的问题!
|
||||||
|
|
||||||
|
你是如何重启或管理你的网络的?我们是否还有遗漏的?请在下方留言。
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://itsfoss.com/restart-network-ubuntu
|
||||||
|
|
||||||
|
作者:[Sergiu][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[bodhix](https://github.com/bodhix)
|
||||||
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://itsfoss.com/author/sergiu/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://itsfoss.com/fix-no-wireless-network-ubuntu/
|
||||||
|
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/ubuntu-restart-network.png?resize=800%2C450&ssl=1
|
||||||
|
[3]: https://itsfoss.com/ubuntu-shortcuts/
|
||||||
|
[4]: https://itsfoss.com/basic-linux-networking-commands/
|
||||||
|
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/nmtui_menu.png?fit=800%2C602&ssl=1
|
||||||
|
[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/03/nmtui_menu_select_option.png?fit=800%2C579&ssl=1
|
||||||
|
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/nmui_connection_menu_on.png?fit=800%2C585&ssl=1
|
||||||
|
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/nmui_select_connection_on.png?fit=800%2C576&ssl=1
|
||||||
|
[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/nmui_connection_menu_off.png?fit=800%2C572&ssl=1
|
||||||
|
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/03/nmui_select_connection_off.png?fit=800%2C566&ssl=1
|
||||||
|
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/nmui_connection_menu_on-1.png?fit=800%2C585&ssl=1
|
||||||
|
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/nmui_connection_menu_back.png?fit=800%2C585&ssl=1
|
||||||
|
[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/nmtui_menu_select_option-1.png?fit=800%2C579&ssl=1
|
||||||
|
[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/03/nmui_menu_quit.png?fit=800%2C580&ssl=1
|
||||||
|
[15]: https://wiki.gnome.org/Projects/NetworkManager
|
||||||
|
[16]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/03/restart-network-ubuntu-1.jpg?resize=800%2C400&ssl=1
|
||||||
|
[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/03/restart-network-ubuntu-2.jpg?resize=800%2C400&ssl=1
|
||||||
|
[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/03/select-wifi-network-ubuntu.jpg?resize=800%2C400&ssl=1
|
||||||
|
[19]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/select-wifi-network-ubuntu-1.jpg?resize=800%2C400&ssl=1
|
||||||
|
[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/ubuntu-restart-network.png?fit=800%2C450&ssl=1
|
@ -1,28 +1,30 @@
|
|||||||
[#]: collector: (lujun9972)
|
[#]: collector: (lujun9972)
|
||||||
[#]: translator: (jdh8383)
|
[#]: translator: (jdh8383)
|
||||||
[#]: reviewer: ( )
|
[#]: reviewer: (wxy)
|
||||||
[#]: publisher: ( )
|
[#]: publisher: (wxy)
|
||||||
[#]: url: ( )
|
[#]: url: (https://linux.cn/article-10772-1.html)
|
||||||
[#]: subject: (The shell scripting trap)
|
[#]: subject: (The shell scripting trap)
|
||||||
[#]: via: (https://arp242.net/weblog/shell-scripting-trap.html)
|
[#]: via: (https://arp242.net/weblog/shell-scripting-trap.html)
|
||||||
[#]: author: (Martin Tournoij https://arp242.net/)
|
[#]: author: (Martin Tournoij https://arp242.net/)
|
||||||
|
|
||||||
Shell 脚本陷阱
|
Shell 脚本编程陷阱
|
||||||
======
|
======
|
||||||
|
|
||||||
Shell 脚本很棒,你可以非常轻松地写出有用的东西来。甚至像是下面这个傻瓜式的命令:
|
Shell 脚本很棒,你可以非常轻松地写出有用的东西来。甚至像是下面这个傻瓜式的命令:
|
||||||
|
|
||||||
```
|
```
|
||||||
# 用含有 Go 的词汇起名字:
|
# 用含有 Go 的词汇起名字:
|
||||||
$ grep -i ^go /usr/share/dict/american-english /usr/share/dict/british /usr/share/dict/british-english /usr/share/dict/catala /usr/share/dict/catalan /usr/share/dict/cracklib-small /usr/share/dict/finnish /usr/share/dict/french /usr/share/dict/german /usr/share/dict/italian /usr/share/dict/ngerman /usr/share/dict/ogerman /usr/share/dict/spanish /usr/share/dict/usa /usr/share/dict/words | cut -d: -f2 | sort -R | head -n1
|
$ grep -i ^go /usr/share/dict/* | cut -d: -f2 | sort -R | head -n1
|
||||||
goldfish
|
goldfish
|
||||||
```
|
```
|
||||||
|
|
||||||
如果用其他编程语言,就需要花费更多的脑力,用多行代码实现,比如用 Ruby 的话:
|
如果用其他编程语言,就需要花费更多的脑力,用多行代码实现,比如用 Ruby 的话:
|
||||||
|
|
||||||
```
|
```
|
||||||
puts(Dir['/usr/share/dict/*-english'].map do |f|
|
puts(Dir['/usr/share/dict/*-english'].map do |f|
|
||||||
File.open(f)
|
File.open(f)
|
||||||
.readlines
|
.readlines
|
||||||
.select { |l| l[0..1].downcase == 'go' }
|
.select { |l| l[0..1].downcase == 'go' }
|
||||||
end.flatten.sample.chomp)
|
end.flatten.sample.chomp)
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -39,9 +41,11 @@ curl https://nl.wikipedia.org/wiki/Lijst_van_Nederlandse_gemeenten |
|
|||||||
|
|
||||||
这个脚本可以从维基百科上获取荷兰基层政权的列表。几年前我写了这个临时的脚本,用来快速生成一个数据库,到现在它仍然可以正常运行,当时写它并没有花费我多少精力。但要用 Ruby 完成同样的功能则会麻烦得多。
|
这个脚本可以从维基百科上获取荷兰基层政权的列表。几年前我写了这个临时的脚本,用来快速生成一个数据库,到现在它仍然可以正常运行,当时写它并没有花费我多少精力。但要用 Ruby 完成同样的功能则会麻烦得多。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
现在来说说 shell 的缺点吧。随着代码量的增加,你的脚本会变得越来越难以维护,但你也不会想用别的语言重写一遍,因为你已经在这个 shell 版上花费了很多时间。
|
现在来说说 shell 的缺点吧。随着代码量的增加,你的脚本会变得越来越难以维护,但你也不会想用别的语言重写一遍,因为你已经在这个 shell 版上花费了很多时间。
|
||||||
|
|
||||||
我把这种情况称为“Shell 脚本陷阱”,这是[沉没成本谬论][1]的一种特例(沉没成本谬论是一个经济学概念,可以简单理解为,对已经投入的成本可能被浪费而念念不忘)。
|
我把这种情况称为“Shell 脚本编程陷阱”,这是[沉没成本谬论][1]的一种特例(LCTT 译注:“沉没成本谬论”是一个经济学概念,可以简单理解为,对已经投入的成本可能被浪费而念念不忘)。
|
||||||
|
|
||||||
实际上许多脚本会增长到超出预期的大小,你经常会花费过多的时间来“修复某个 bug”,或者“添加一个小功能”。如此循环往复,让人头大。
|
实际上许多脚本会增长到超出预期的大小,你经常会花费过多的时间来“修复某个 bug”,或者“添加一个小功能”。如此循环往复,让人头大。
|
||||||
|
|
||||||
@ -51,28 +55,19 @@ curl https://nl.wikipedia.org/wiki/Lijst_van_Nederlandse_gemeenten |
|
|||||||
|
|
||||||
出于类似的原因,我很后悔写出了许多这样的 shell 脚本,而我在 2018 年的新年誓言就是不要再犯类似的错误了。
|
出于类似的原因,我很后悔写出了许多这样的 shell 脚本,而我在 2018 年的新年誓言就是不要再犯类似的错误了。
|
||||||
|
|
||||||
#### 附录:问题汇总
|
### 附录:问题汇总
|
||||||
|
|
||||||
需要指出的是,shell 编程的确存在一些实际的限制。下面是一些例子:
|
需要指出的是,shell 编程的确存在一些实际的限制。下面是一些例子:
|
||||||
|
|
||||||
* 在处理一些包含“空格”或者其他“特殊”字符的文件名时,需要特别注意细节。绝大多数脚本都会犯错,即使是那些经验丰富的作者(比如我)编写的脚本,因为太容易写错了,[只添加引号是不够的][3]。
|
* 在处理一些包含“空格”或者其他“特殊”字符的文件名时,需要特别注意细节。绝大多数脚本都会犯错,即使是那些经验丰富的作者(比如我)编写的脚本,因为太容易写错了,[只添加引号是不够的][3]。
|
||||||
|
|
||||||
* 有许多所谓“正确”和“错误”的做法。你应该用 `which` 还是 `command`?该用 `$@` 还是 `$*`,是不是得加引号?你是该用 `cmd $arg` 还是 `cmd "$arg"`?等等等等。
|
* 有许多所谓“正确”和“错误”的做法。你应该用 `which` 还是 `command`?该用 `$@` 还是 `$*`,是不是得加引号?你是该用 `cmd $arg` 还是 `cmd "$arg"`?等等等等。
|
||||||
|
|
||||||
* 你没法在变量里存储空字节(0x00);shell 脚本处理二进制数据很麻烦。
|
* 你没法在变量里存储空字节(0x00);shell 脚本处理二进制数据很麻烦。
|
||||||
|
|
||||||
* 虽然你可以非常快速地写出有用的东西,但实现更复杂的算法则要痛苦许多,即使用 ksh/zsh/bash 扩展也是如此。我上面那个解析 HTML 的脚本临时用用是可以的,但你真的不会想在生产环境中使用这种脚本。
|
* 虽然你可以非常快速地写出有用的东西,但实现更复杂的算法则要痛苦许多,即使用 ksh/zsh/bash 扩展也是如此。我上面那个解析 HTML 的脚本临时用用是可以的,但你真的不会想在生产环境中使用这种脚本。
|
||||||
|
* 很难写出跨平台的通用型 shell 脚本。`/bin/sh` 可能是 `dash` 或者 `bash`,不同的 shell 有不同的运行方式。外部工具如 `grep`、`sed` 等,不一定能支持同样的参数。你能确定你的脚本可以适用于 Linux、macOS 和 Windows 的所有版本吗(无论是过去、现在还是将来)?
|
||||||
* 很难写出跨平台的通用型 shell 脚本。`/bin/sh` 可能是 `dash` 或者 `bash`,不同的 shell 有不同的运行方式。外部工具如 `grep`、`sed` 等,不一定能支持同样的参数。你能确定你的脚本可以适用于 Linux、macOS 和 Windows 的所有版本吗(过去、现在和将来)?
|
* 调试 shell 脚本会很难,特别是你眼中的语法可能会很快变得记不清了,并不是所有人都熟悉 shell 编程的语境。
|
||||||
|
|
||||||
* 调试 shell 脚本会很难,特别是你眼中的语法可能会很快变得模糊起来,并不是所有人都熟悉 shell 编程的语境。
|
|
||||||
|
|
||||||
* 处理错误会很棘手(检查 `$?` 或是 `set -e`),排查一些超过“出了个小错”级别的复杂错误几乎是不可能的。
|
* 处理错误会很棘手(检查 `$?` 或是 `set -e`),排查一些超过“出了个小错”级别的复杂错误几乎是不可能的。
|
||||||
|
|
||||||
* 除非你使用了 `set -u`,变量未定义将不会报错,而这会导致一些“搞笑事件”,比如 `rm -r ~/$undefined` 会删除用户的整个家目录([瞅瞅 Github 上的这个悲剧][4])。
|
* 除非你使用了 `set -u`,变量未定义将不会报错,而这会导致一些“搞笑事件”,比如 `rm -r ~/$undefined` 会删除用户的整个家目录([瞅瞅 Github 上的这个悲剧][4])。
|
||||||
|
* 所有东西都是字符串。一些 shell 引入了数组,能用,但是语法非常丑陋和费解。带分数的数字运算仍然难以应付,并且依赖像 `bc` 或 `dc` 这样的外部工具(`$(( .. ))` 这种方式只能对付一下整数)。
|
||||||
* 所有东西都是字符串。一些 shell 引入了数组,能用,但是语法非常丑陋和模糊。带分数的数字运算仍然难以应付,并且依赖像 `bc` 或 `dc` 这样的外部工具(`$(( .. ))` 这种方式只能对付一下整数)。
|
|
||||||
|
|
||||||
|
|
||||||
**反馈**
|
**反馈**
|
||||||
|
|
||||||
@ -85,7 +80,7 @@ via: https://arp242.net/weblog/shell-scripting-trap.html
|
|||||||
作者:[Martin Tournoij][a]
|
作者:[Martin Tournoij][a]
|
||||||
选题:[lujun9972][b]
|
选题:[lujun9972][b]
|
||||||
译者:[jdh8383](https://github.com/jdh8383)
|
译者:[jdh8383](https://github.com/jdh8383)
|
||||||
校对:[校对者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/) 荣誉推出
|
||||||
|
|
78
published/201904/20180718 3 Emacs modes for taking notes.md
Normal file
78
published/201904/20180718 3 Emacs modes for taking notes.md
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: (lujun9972)
|
||||||
|
[#]: reviewer: (wxy)
|
||||||
|
[#]: publisher: (wxy)
|
||||||
|
[#]: url: (https://linux.cn/article-10792-1.html)
|
||||||
|
[#]: subject: (3 Emacs modes for taking notes)
|
||||||
|
[#]: via: (https://opensource.com/article/18/7/emacs-modes-note-taking)
|
||||||
|
[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt)
|
||||||
|
|
||||||
|
用来记笔记的三个 Emacs 模式
|
||||||
|
======
|
||||||
|
|
||||||
|
> 借助这些 Emacs 模式轻松记录信息。
|
||||||
|
|
||||||
|
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/notebook-writing-pen.jpg?itok=uA3dCfu_)
|
||||||
|
|
||||||
|
|
||||||
|
不管你从事哪种工作,你都无可避免地需要记笔记。而且可能还不是一点点。现在这年头,大家都开始以数字的形式来记笔记了。
|
||||||
|
|
||||||
|
开源软件爱好者有多种途径来以电子的方式记下他们的创意、想法和研究过程。你可以使用 [网页工具][1],可以使用 [桌面应用][2],或者你也可以 [使用命令行工具][3]。
|
||||||
|
|
||||||
|
如果你使用 [Emacs][4](伪装成文本编辑器的强力操作系统),有多个<ruby>模式<rt>mode</rt></ruby>可以帮你有效地记录笔记。我们这里列举三个例子。
|
||||||
|
|
||||||
|
### Deft
|
||||||
|
|
||||||
|
![](https://opensource.com/sites/default/files/uploads/deft.png)
|
||||||
|
|
||||||
|
在少数情况下,我只能使用 Mac时,有一个工具是我不能缺少的:[nvALT][5] 笔记应用。[Deft 模式][6] 为 Emacs 带来了 nvALT 式的体验。
|
||||||
|
|
||||||
|
Deft 将你的笔记以文本文件的形式存储在电脑中的某个文件夹中。当你进入 Deft 模式,你会看到一系列的笔记及其摘要。这些摘要其实就是文本文件的第一行。若第一行是 Markdown、LaTeX,甚至 Emacs Org 模式的格式的话,Deft 会忽略掉这些格式而只显示文本内容。
|
||||||
|
|
||||||
|
要打开笔记,只需要向下滚动到该笔记的位置然后按下回车即可。然而 Deft 不仅仅只是这样。根据 Deft 开发者 Jason Blevins 的说法,它的*主要操作是搜索和过滤*。Deft 的实现方式简单而有效。输入关键字然后 Deft 会只显示标题中包含关键字的笔记。这在你要从大量笔记中找到某条笔记时非常有用。
|
||||||
|
|
||||||
|
### Org 模式
|
||||||
|
|
||||||
|
![](https://opensource.com/sites/default/files/uploads/orgmode.png)
|
||||||
|
|
||||||
|
如果本文没有包含 [Org 模式][7] 的话,那么我可能会被人所诟病。为什么?它可以说是 Emacs 中最灵活、使用最广泛的记录笔记的方式了。以正确的方式使用它,Org 模式可以极大地增强记笔记的能力。
|
||||||
|
|
||||||
|
Org 模式的主要优势在于它组织笔记的方式。在 Org 模式中,一个笔记文件会被组织成一个巨大的大纲。每个章节就是大纲里的一个节点,你可以对它进行展开和折叠。这些章节又可以有子章节,这些子章节也可以展开和折叠。这不仅使你一次只关注于某个章节,而且可以让你浏览整个大纲。
|
||||||
|
|
||||||
|
你可以在多个章节之间 [进行互联][8],无需通过剪切和复制就能快速移动章节,以及 [附加文件][9] 到笔记中。Org 模式支持带格式的字符和表格。如果你需要转换笔记到其他格式,Org 模式也有大量的[导出选项][10]。
|
||||||
|
|
||||||
|
|
||||||
|
### Howm
|
||||||
|
|
||||||
|
![](https://opensource.com/sites/default/files/uploads/howm.png)
|
||||||
|
|
||||||
|
当我使用 Emacs 已经成为一种习惯时,[howm][11] 马上就成为我严重依赖的模式之一了。虽然我特别喜欢使用 Org 模式,但 howm 依然占有一席之地。
|
||||||
|
|
||||||
|
Howm 就好像是一个小型维基。你可以创建笔记和任务列表,还能在它们之间创建链接。通过输入或点击某个链接,你可以在笔记之间跳转。如果你需要,还可以使用关键字为笔记添加标签。不仅如此,你可以对笔记进行搜索、排序和合并。
|
||||||
|
|
||||||
|
Howm 不是最漂亮的 Emacs 模式,它的用户体验也不是最佳。它需要你花一点时间来适应它,而一旦你适应了它,记录和查找笔记就是轻而易举的事情了。
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://opensource.com/article/18/7/emacs-modes-note-taking
|
||||||
|
|
||||||
|
作者:[Scott Nesbitt][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[lujun9972](https://github.com/lujun9972)
|
||||||
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://opensource.com/users/scottnesbitt
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://opensource.com/alternatives/evernote
|
||||||
|
[2]: https://opensource.com/life/16/9/4-desktop-note-taking-applications
|
||||||
|
[3]: https://opensource.com/article/18/3/command-line-note-taking-applications
|
||||||
|
[4]: https://www.gnu.org/software/emacs/
|
||||||
|
[5]: http://brettterpstra.com/projects/nvalt/
|
||||||
|
[6]: https://jblevins.org/projects/deft/
|
||||||
|
[7]: https://orgmode.org/
|
||||||
|
[8]: https://orgmode.org/org.html#Hyperlinks
|
||||||
|
[9]: https://orgmode.org/org.html#Attachments
|
||||||
|
[10]: https://orgmode.org/org.html#Exporting
|
||||||
|
[11]: https://howm.osdn.jp/
|
@ -1,55 +1,56 @@
|
|||||||
Sensu 监控入门
|
Sensu 监控入门
|
||||||
======
|
======
|
||||||
|
> 这个开源解决方案可以简单而有效地监控你的云基础设施。
|
||||||
|
|
||||||
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003601_05_mech_osyearbook2016_cloud_cc.png?itok=XSV7yR9e)
|
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003601_05_mech_osyearbook2016_cloud_cc.png?itok=XSV7yR9e)
|
||||||
|
|
||||||
Sensu 是一个开源基础设施和应用程序监控解决方案,它监控服务器、相关服务和应用程序健康状况,并通过第三方集成发送警报和通知。Sensu 用 Ruby 编写,可以使用 [RabbitMQ][1] 或 [Redis][2] 来处理消息,它使用 Redis 来存储数据。
|
Sensu 是一个开源的基础设施和应用程序监控解决方案,它可以监控服务器、相关服务和应用程序健康状况,并通过第三方集成发送警报和通知。Sensu 用 Ruby 编写,可以使用 [RabbitMQ][1] 或 [Redis][2] 来处理消息,它使用 Redis 来存储数据。
|
||||||
|
|
||||||
如果你想以一种简单而有效的方式监控云基础设施,Sensu 是一个不错的选择。它可以与你组织已经使用的许多现代 DevOps 堆栈集成,比如 [Slack][3]、[HipChat][4 ] 或 [IRC][5],它甚至可以用 [PagerDuty][6] 发送移动或寻呼机警报。
|
如果你想以一种简单而有效的方式监控云基础设施,Sensu 是一个不错的选择。它可以与你的组织已经使用的许多现代 DevOps 组件集成,比如 [Slack][3]、[HipChat][4] 或 [IRC][5],它甚至可以用 [PagerDuty][6] 发送移动或寻呼机的警报。
|
||||||
|
|
||||||
Sensu 的[模块化架构][7]意味着每个组件都可以安装在同一台服务器上或者在完全独立的机器上。
|
Sensu 的[模块化架构][7]意味着每个组件都可以安装在同一台服务器上或者在完全独立的机器上。
|
||||||
|
|
||||||
### 结构
|
### 结构
|
||||||
|
|
||||||
Sensu 的主要通信机制是 `Transport`。每个 Sensu 组件必须连接到 `Transport` 才能相互发送消息。`Transport` 可以使用 RabbitMQ(在生产中推荐使用)或 Redis。
|
Sensu 的主要通信机制是 Transport。每个 Sensu 组件必须连接到 Transport 才能相互发送消息。Transport 可以使用 RabbitMQ(在生产环境中推荐使用)或 Redis。
|
||||||
|
|
||||||
Sensu 服务器处理事件数据并采取行动。它注册客户端并使用过滤器、增变器和处理程序检查结果和监视事件。服务器向客户端发布检查说明,Sensu API 提供 RESTful API,提供对监控数据和核心功能的访问。
|
Sensu 服务器处理事件数据并采取行动。它注册客户端并使用过滤器、增变器和处理程序检查结果和监视事件。服务器向客户端发布检查说明,Sensu API 提供 RESTful API,提供对监控数据和核心功能的访问。
|
||||||
|
|
||||||
[Sensu 客户端][8]执行 Sensu 服务器安排的检查或本地检查定义。Sensu 使用数据存储(Redis)来保存所有的持久数据。最后,[Uchiwa][9] 是与 Sensu API 进行通信的 Web 界面。
|
[Sensu 客户端][8]执行 Sensu 服务器安排的检查或本地检查定义。Sensu 使用数据存储(Redis)来保存所有的持久数据。最后,[Uchiwa][9] 是与 Sensu API 进行通信的 Web 界面。
|
||||||
|
|
||||||
![sensu_system.png][11]
|
![][11]
|
||||||
|
|
||||||
### 安装 Sensu
|
### 安装 Sensu
|
||||||
|
|
||||||
#### 条件
|
#### 条件
|
||||||
|
|
||||||
* 一个 Linux 系统作为服务器节点(本文使用了 CentOS 7)
|
* 一个 Linux 系统作为服务器节点(本文使用了 CentOS 7)
|
||||||
* 要监控的一台或多台 Linux 机器(客户机)
|
* 要监控的一台或多台 Linux 机器(客户机)
|
||||||
|
|
||||||
#### 服务器侧
|
#### 服务器侧
|
||||||
|
|
||||||
Sensu 需要安装 Redis。要安装 Redis,启用 EPEL 仓库:
|
Sensu 需要安装 Redis。要安装 Redis,启用 EPEL 仓库:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo yum install epel-release -y
|
$ sudo yum install epel-release -y
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
然后安装 Redis:
|
然后安装 Redis:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo yum install redis -y
|
$ sudo yum install redis -y
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
修改 `/etc/redis.conf` 来禁用保护模式,监听每个地址并设置密码:
|
修改 `/etc/redis.conf` 来禁用保护模式,监听每个地址并设置密码:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo sed -i 's/^protected-mode yes/protected-mode no/g' /etc/redis.conf
|
$ sudo sed -i 's/^protected-mode yes/protected-mode no/g' /etc/redis.conf
|
||||||
|
|
||||||
$ sudo sed -i 's/^bind 127.0.0.1/bind 0.0.0.0/g' /etc/redis.conf
|
$ sudo sed -i 's/^bind 127.0.0.1/bind 0.0.0.0/g' /etc/redis.conf
|
||||||
|
|
||||||
$ sudo sed -i 's/^# requirepass foobared/requirepass password123/g' /etc/redis.conf
|
$ sudo sed -i 's/^# requirepass foobared/requirepass password123/g' /etc/redis.conf
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
启用并启动 Redis 服务:
|
启用并启动 Redis 服务:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo systemctl enable redis
|
$ sudo systemctl enable redis
|
||||||
$ sudo systemctl start redis
|
$ sudo systemctl start redis
|
||||||
@ -60,6 +61,7 @@ Redis 现在已经安装并准备好被 Sensu 使用。
|
|||||||
现在让我们来安装 Sensu。
|
现在让我们来安装 Sensu。
|
||||||
|
|
||||||
首先,配置 Sensu 仓库并安装软件包:
|
首先,配置 Sensu 仓库并安装软件包:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo tee /etc/yum.repos.d/sensu.repo << EOF
|
$ sudo tee /etc/yum.repos.d/sensu.repo << EOF
|
||||||
[sensu]
|
[sensu]
|
||||||
@ -73,6 +75,7 @@ $ sudo yum install sensu uchiwa -y
|
|||||||
```
|
```
|
||||||
|
|
||||||
让我们为 Sensu 创建最简单的配置文件:
|
让我们为 Sensu 创建最简单的配置文件:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo tee /etc/sensu/conf.d/api.json << EOF
|
$ sudo tee /etc/sensu/conf.d/api.json << EOF
|
||||||
{
|
{
|
||||||
@ -85,6 +88,7 @@ EOF
|
|||||||
```
|
```
|
||||||
|
|
||||||
然后,配置 `sensu-api` 在本地主机上使用端口 4567 监听:
|
然后,配置 `sensu-api` 在本地主机上使用端口 4567 监听:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo tee /etc/sensu/conf.d/redis.json << EOF
|
$ sudo tee /etc/sensu/conf.d/redis.json << EOF
|
||||||
{
|
{
|
||||||
@ -107,6 +111,7 @@ EOF
|
|||||||
```
|
```
|
||||||
|
|
||||||
在这两个文件中,我们将 Sensu 配置为使用 Redis 作为传输机制,还有 Reids 监听的地址。客户端需要直接连接到传输机制。每台客户机都需要这两个文件。
|
在这两个文件中,我们将 Sensu 配置为使用 Redis 作为传输机制,还有 Reids 监听的地址。客户端需要直接连接到传输机制。每台客户机都需要这两个文件。
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo tee /etc/sensu/uchiwa.json << EOF
|
$ sudo tee /etc/sensu/uchiwa.json << EOF
|
||||||
{
|
{
|
||||||
@ -125,14 +130,16 @@ $ sudo tee /etc/sensu/uchiwa.json << EOF
|
|||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
在这个文件中,我们配置 `Uchiwa` 监听端口 3000 上的每个地址(0.0.0.0)。我们还配置 `Uchiwa` 使用 `sensu-api`(已配置好)。
|
在这个文件中,我们配置 Uchiwa 监听每个地址(0.0.0.0)的端口 3000。我们还配置 Uchiwa 使用 `sensu-api`(已配置好)。
|
||||||
|
|
||||||
出于安全原因,更改刚刚创建的配置文件的所有者:
|
出于安全原因,更改刚刚创建的配置文件的所有者:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo chown -R sensu:sensu /etc/sensu
|
$ sudo chown -R sensu:sensu /etc/sensu
|
||||||
```
|
```
|
||||||
|
|
||||||
启用并启动 Sensu 服务:
|
启用并启动 Sensu 服务:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo systemctl enable sensu-server sensu-api sensu-client
|
$ sudo systemctl enable sensu-server sensu-api sensu-client
|
||||||
$ sudo systemctl start sensu-server sensu-api sensu-client
|
$ sudo systemctl start sensu-server sensu-api sensu-client
|
||||||
@ -140,15 +147,16 @@ $ sudo systemctl enable uchiwa
|
|||||||
$ sudo systemctl start uchiwa
|
$ sudo systemctl start uchiwa
|
||||||
```
|
```
|
||||||
|
|
||||||
尝试访问 `Uchiwa` 网站:http://<服务器的 IP 地址>:3000
|
尝试访问 Uchiwa 网站:`http://<服务器的 IP 地址>:3000`
|
||||||
|
|
||||||
对于生产环境,建议运行 RabbitMQ 集群作为 Transport 而不是 Redis(虽然 Redis 集群也可以用于生产),运行多个 Sensu 服务器实例和 API 实例,以实现负载均衡和高可用性。
|
对于生产环境,建议运行 RabbitMQ 集群作为 Transport 而不是 Redis(虽然 Redis 集群也可以用于生产环境),运行多个 Sensu 服务器实例和 API 实例,以实现负载均衡和高可用性。
|
||||||
|
|
||||||
Sensu 现在安装完成,让我们来配置客户端。
|
Sensu 现在安装完成,让我们来配置客户端。
|
||||||
|
|
||||||
#### 客户端侧
|
#### 客户端侧
|
||||||
|
|
||||||
要添加一个新客户端,你需要通过创建 `/etc/yum.repos.d/sensu.repo` 文件在客户机上启用 Sensu 仓库。
|
要添加一个新客户端,你需要通过创建 `/etc/yum.repos.d/sensu.repo` 文件在客户机上启用 Sensu 仓库。
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo tee /etc/yum.repos.d/sensu.repo << EOF
|
$ sudo tee /etc/yum.repos.d/sensu.repo << EOF
|
||||||
[sensu]
|
[sensu]
|
||||||
@ -160,11 +168,13 @@ EOF
|
|||||||
```
|
```
|
||||||
|
|
||||||
启用仓库后,安装 Sensu:
|
启用仓库后,安装 Sensu:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo yum install sensu -y
|
$ sudo yum install sensu -y
|
||||||
```
|
```
|
||||||
|
|
||||||
要配置 `sensu-client`,创建在服务器中相同的 `redis.json` 和 `transport.json`,还有 `client.json` 配置文件:
|
要配置 `sensu-client`,创建在服务器中相同的 `redis.json` 和 `transport.json`,还有 `client.json` 配置文件:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo tee /etc/sensu/conf.d/client.json << EOF
|
$ sudo tee /etc/sensu/conf.d/client.json << EOF
|
||||||
{
|
{
|
||||||
@ -179,9 +189,10 @@ $ sudo tee /etc/sensu/conf.d/client.json << EOF
|
|||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
在 `name` 字段中,指定一个名称来标识此客户机(通常是主机名)。`environment` 字段可以帮助你过滤,订阅定义客户机将执行哪些监视检查。
|
在 `name` 字段中,指定一个名称来标识此客户机(通常是主机名)。`environment` 字段可以帮助你过滤,而 `subscriptions` 定义了客户机将执行哪些监视检查。
|
||||||
|
|
||||||
|
最后,启用并启动服务并签入 Uchiwa,因为客户机会自动注册:
|
||||||
|
|
||||||
最后,启用并启动服务并检查 `Uchiwa`,因为客户机会自动注册:
|
|
||||||
```
|
```
|
||||||
$ sudo systemctl enable sensu-client
|
$ sudo systemctl enable sensu-client
|
||||||
$ sudo systemctl start sensu-client
|
$ sudo systemctl start sensu-client
|
||||||
@ -191,21 +202,23 @@ $ sudo systemctl start sensu-client
|
|||||||
|
|
||||||
Sensu 检查有两个组件:一个插件和一个定义。
|
Sensu 检查有两个组件:一个插件和一个定义。
|
||||||
|
|
||||||
Sensu 与 [Nagios 检查插件规范][12]兼容,因此无需修改即可使用针对 Nagios 的任何检查。检查是可执行文件,由 Sensu 客户机运行。
|
Sensu 与 [Nagios 检查插件规范][12]兼容,因此无需修改即可使用用于 Nagios 的任何检查。检查是可执行文件,由 Sensu 客户机运行。
|
||||||
|
|
||||||
检查定义让 Sensu 知道如何、在哪以及何时运行插件。
|
检查定义可以让 Sensu 知道如何、在哪以及何时运行插件。
|
||||||
|
|
||||||
#### 客户端侧
|
#### 客户端侧
|
||||||
|
|
||||||
让我们在客户机上安装一个检查插件。请记住,此插件将在客户机上执行。
|
让我们在客户机上安装一个检查插件。请记住,此插件将在客户机上执行。
|
||||||
|
|
||||||
启用 EPEL 并安装 `nagios-plugins-http` :
|
启用 EPEL 并安装 `nagios-plugins-http`:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo yum install -y epel-release
|
$ sudo yum install -y epel-release
|
||||||
$ sudo yum install -y nagios-plugins-http
|
$ sudo yum install -y nagios-plugins-http
|
||||||
```
|
```
|
||||||
|
|
||||||
现在让我们通过手动执行它来研究这个插件。尝试检查客户机上运行的 Web 服务器的状态。它应该会失败,因为我们并没有运行 Web 服务器:
|
现在让我们通过手动执行它来了解这个插件。尝试检查客户机上运行的 Web 服务器的状态。它应该会失败,因为我们并没有运行 Web 服务器:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ /usr/lib64/nagios/plugins/check_http -I 127.0.0.1
|
$ /usr/lib64/nagios/plugins/check_http -I 127.0.0.1
|
||||||
connect to address 127.0.0.1 and port 80: Connection refused
|
connect to address 127.0.0.1 and port 80: Connection refused
|
||||||
@ -213,26 +226,27 @@ HTTP CRITICAL - Unable to open TCP socket
|
|||||||
```
|
```
|
||||||
|
|
||||||
不出所料,它失败了。检查执行的返回值:
|
不出所料,它失败了。检查执行的返回值:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ echo $?
|
$ echo $?
|
||||||
2
|
2
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Nagios 检查插件规范定义了插件执行的四个返回值:
|
Nagios 检查插件规范定义了插件执行的四个返回值:
|
||||||
|
|
||||||
| **Plugin return code** | **State** |
|
| 插件返回码 | 状态 |
|
||||||
|------------------------|-----------|
|
|----------|-----------|
|
||||||
| 0 | OK |
|
| 0 | OK |
|
||||||
| 1 | WARNING |
|
| 1 | WARNING |
|
||||||
| 2 | CRITICAL |
|
| 2 | CRITICAL |
|
||||||
| 3 | UNKNOWN |
|
| 3 | UNKNOWN |
|
||||||
|
|
||||||
有了这些信息,我们现在可以在服务器上创建检查定义。
|
有了这些信息,我们现在可以在服务器上创建检查定义。
|
||||||
|
|
||||||
#### 服务器侧
|
#### 服务器侧
|
||||||
|
|
||||||
在服务器机器上,创建 `/etc/sensu/conf.d/check_http.json` 文件:
|
在服务器机器上,创建 `/etc/sensu/conf.d/check_http.json` 文件:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"checks": {
|
"checks": {
|
||||||
@ -247,9 +261,9 @@ Nagios 检查插件规范定义了插件执行的四个返回值:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
在 `command ` 字段中,使用我们之前测试过的命令。`Interval` 会告诉 Sensu 这个检查的频率,以秒为单位。最后,`subscribers` 将定义执行检查的客户机。
|
在 `command` 字段中,使用我们之前测试过的命令。`interval` 会告诉 Sensu 这个检查的频率,以秒为单位。最后,`subscribers` 将定义执行检查的客户机。
|
||||||
|
|
||||||
重新启动 sensu-api 和 sensu-server 并确认新检查在 Uchiwa 中可用。
|
重新启动 `sensu-api` 和 `sensu-server` 并确认新检查在 Uchiwa 中可用。
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo systemctl restart sensu-api sensu-server
|
$ sudo systemctl restart sensu-api sensu-server
|
||||||
@ -265,8 +279,8 @@ via: https://opensource.com/article/18/8/getting-started-sensu-monitoring-soluti
|
|||||||
|
|
||||||
作者:[Michael Zamot][a]
|
作者:[Michael Zamot][a]
|
||||||
选题:[lujun9972](https://github.com/lujun9972)
|
选题:[lujun9972](https://github.com/lujun9972)
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
译者:[MjSeven](https://github.com/MjSeven)
|
||||||
校对:[校对者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,201 @@
|
|||||||
|
Linux 初学者:移动文件
|
||||||
|
=====================
|
||||||
|
|
||||||
|
![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/filesystem-linux.jpg?itok=NQCoYl1f)
|
||||||
|
|
||||||
|
在之前的该系列的部分中,[你学习了有关目录][1]和[访问目录][2][的权限][7]是如何工作的。你在这些文章中学习的大多数内容都可应用于文件,除了如何让一个文件变成可执行文件。
|
||||||
|
|
||||||
|
因此让我们在开始之前先解决这个问题。
|
||||||
|
|
||||||
|
### 不需要 .exe 扩展名
|
||||||
|
|
||||||
|
在其他操作系统中,一个文件的性质通常由它的后缀决定。如果一个文件有一个 .jpg 扩展,操作系统会认为它是一幅图像;如果它以 .wav 结尾,它是一个音频文件;如果它在文件名末尾以 .exe 结尾,它就是一个你可以执行的程序。
|
||||||
|
|
||||||
|
这导致了严重的问题,比如说木马可以伪装成文档文件。幸运的是,在 Linux 下事物不是这样运行的。可以确定的是,你可能会看到有些可执行文件是以 .sh 结尾暗示它们是可执行的脚本,但是这大部分是为了便于人眼找到文件,就像你使用 `ls --color` 将可执行文件的名字以亮绿色显示的方式相同。
|
||||||
|
|
||||||
|
事实上大多数应用根本没有扩展名。决定一个文件是否是一个真正程序的是 `x` (指*可执行的*)位。你可以通过运行以下命令使任何文件变得可执行,
|
||||||
|
|
||||||
|
```
|
||||||
|
chmod a+x some_program
|
||||||
|
```
|
||||||
|
|
||||||
|
而不管它的扩展名是什么或者是否存在。在上面命令中的 `x` 设置了 `x` 位,`a` 说明你为*所有*用户设置它。你同样可以为一组用户设置成拥有这个文件(`g+x`),或者只为一个用户——拥有者——设置 (`u+x`)。
|
||||||
|
|
||||||
|
尽管我们会在该系列之后的部分包含从命令行创建和运行脚本的内容,并学习通过输入它的路径并在结尾加上程序名的方式运行一个程序:
|
||||||
|
|
||||||
|
```
|
||||||
|
path/to/directory/some_program
|
||||||
|
```
|
||||||
|
|
||||||
|
或者,如果你当前在相同目录,你可以使用:
|
||||||
|
|
||||||
|
```
|
||||||
|
./some_program
|
||||||
|
```
|
||||||
|
|
||||||
|
还有其他方式可以使你的程序在目录树的任意位置运行 (提示:查询 `$PATH` 环境变量),但是当我们讨论 shell 脚本的时候你会读到这些。
|
||||||
|
|
||||||
|
### 复制、移动、链接
|
||||||
|
|
||||||
|
明显地,从命令行修改和处理文件有很多的方式,而不仅仅是处理它们的权限。当你试图打开一个不存在的文件是,大多数应用会创建一个新文件。如果 `test.txt` 当前并不存在,下列命令:
|
||||||
|
|
||||||
|
```
|
||||||
|
nano test.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
vim test.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
([nano][3] 和 [vim][4] 是流行的命令行文本编辑器)都将为你创建一个空的 `test.txt` 文件来编辑。
|
||||||
|
|
||||||
|
你可以通过 “触摸” (`touch`)来创建一个空的文件,
|
||||||
|
|
||||||
|
```
|
||||||
|
touch test.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
会创建一个文件,但是不会在任何应用中打开它。
|
||||||
|
|
||||||
|
你可以使用 `cp` 来拷贝一个文件到另一个位置,或者使用一个不同的名字:
|
||||||
|
|
||||||
|
```
|
||||||
|
cp test.txt copy_of_test.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
你也可以拷贝一堆文件:
|
||||||
|
|
||||||
|
```
|
||||||
|
cp *.png /home/images
|
||||||
|
```
|
||||||
|
|
||||||
|
上面的命令拷贝当前目录下的所有 PNG 文件到相对你的主目录下的 `images/` 目录。在你尝试之前 `images/` 目录必须存在, 不然 `cp` 将显示一个错误。同样的,警惕,当你复制一个文件到一个已经包含相同名字的文件的目录时,`cp` 会静默地用新文件覆盖老的文件。
|
||||||
|
|
||||||
|
你可以使用:
|
||||||
|
|
||||||
|
```
|
||||||
|
cp -i *.png /home/images
|
||||||
|
```
|
||||||
|
|
||||||
|
如果你想要 `cp` 命令在有任何危险时警告你 (`-i` 选项代表*交互式的*)。
|
||||||
|
|
||||||
|
你同样可以复制整个目录,但是为了做到这样,你需要 `-r` 选项:
|
||||||
|
|
||||||
|
```
|
||||||
|
cp -rv directory_a/ directory_b
|
||||||
|
```
|
||||||
|
|
||||||
|
`-r` 选项代表*递归*,意味着 `cp` 会向下探索目录 `directory_a`,复制所有的文件和子目录下内部包含的。我个人喜欢包含 `-v` 选项,因为它使 `cp` 冗长而啰嗦,意味着它会显示你当前它正在做什么而不是仅仅静默的复制然后存在。
|
||||||
|
|
||||||
|
`mv` 命令移动东西。也就是说,它移动文件从一个位置到另一个位置。最简单的形式,`mv` 表现的更像 `cp`:
|
||||||
|
|
||||||
|
```
|
||||||
|
mv test.txt new_test.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
上面的命令使 `new_test.txt` 出现,`test.txt` 消失。
|
||||||
|
|
||||||
|
```
|
||||||
|
mv *.png /home/images
|
||||||
|
```
|
||||||
|
|
||||||
|
移动当前目录下所有的 PNG 文件到相对于你的主目录的 `images/` 目录。同样的你必须小心你没有意外的覆盖已存在的文件。使用
|
||||||
|
|
||||||
|
```
|
||||||
|
mv -i *.png /home/images
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
如果你想站在安全的角度,你可以使用与 `cp` 相同的方式。
|
||||||
|
|
||||||
|
除了移动与拷贝的不同外,另一个 `mv` 和 `cp` 之间的不同是当你移动目录时:
|
||||||
|
|
||||||
|
```
|
||||||
|
mv directory_a/ directory_b
|
||||||
|
```
|
||||||
|
|
||||||
|
不需要添加递归的标志。这是因为你实际做的是重命名一个目录,与第一个例子相同,你做的是重命名文件。实际上,即使你从一个目录到另一个目录 “移动” 一个文件,只要两个目录在相同的存储设备和分区,你就是在重命名文件。
|
||||||
|
|
||||||
|
你可以做一个实验来证明。 `time` 是一个工具来让你测量一个命令花费多久来执行。找一个非常大的文件,可以是几百 MB 甚至 几 GB (例如一个长视频),像下方这样尝试拷贝到另一个目录:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ time cp hefty_file.mkv another_directory/
|
||||||
|
real 0m3,868s
|
||||||
|
user 0m0,016s
|
||||||
|
sys 0m0,887s
|
||||||
|
```
|
||||||
|
|
||||||
|
下面是 `time` 的输出。需要关注的是第一行, real 时间。它花费了几乎 4 秒来拷贝 355 MB 的 `hefty_file.mkv` 到 `another_directory/` 目录。
|
||||||
|
|
||||||
|
现在让我们尝试移动它:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ time mv hefty_file.mkv another_directory/
|
||||||
|
real 0m0,004s
|
||||||
|
user 0m0,000s
|
||||||
|
sys 0m0,003s
|
||||||
|
```
|
||||||
|
|
||||||
|
移动几乎是瞬时的!这是违反直觉的,因为看起来 `mv` 必须复制这个文件然后删除原来的。这是 `mv` 对比 `cp` 命令必须做的两件事。但是,实际上,`mv` 快了 1000 倍。
|
||||||
|
|
||||||
|
这是因为文件系统结构中,它的所有目录树,只为了让用户便利而存在。在每个分区的开始,有一个称作*分区表*的东西告诉操作系统在实际的物理磁盘上去哪找每个文件。在磁盘上,数据没有分为目录甚至是文件。[作为替代的是轨道、扇区和簇][5]。当你在相同分区 “移动” 一个文件时,操作系统实际做的仅仅是在分区表中改变了那个文件的入口,但它仍然指向磁盘上相同的簇信息。
|
||||||
|
|
||||||
|
是的!移动是一个谎言!至少在相同分区下是。如果你试图移动一个文件到一个不同的分区或者不同的设备, `mv` 仍然很快,但可以察觉到它比在相同分区下移动文件慢了。这是因为实际上发生了复制和清除数据。
|
||||||
|
|
||||||
|
### 重命名
|
||||||
|
|
||||||
|
有几个不同的命令行 `rename` 工具。没有一个像 `cp` 和 `mv` 那样固定,并且它们工作的方式都有一点不同,相同的一点是它们都被用来改变文件名的部分。
|
||||||
|
|
||||||
|
在 Debian 和 Ubuntu 中, 默认的 `rename` 工具使用 [正则表达式][6](字符组成的字符串模式)来大量的改变目录中的文件。命令:
|
||||||
|
|
||||||
|
```
|
||||||
|
rename 's/\.JPEG$/.jpg/' *
|
||||||
|
```
|
||||||
|
|
||||||
|
将改变所有扩展名为 `JPEG` 的文件为 `jpg`。文件 `IMG001.JPEG` 变成 `IMG001.jpg`、 `my_pic.JPEG` 变成 `my_pic.jpg`,等等。
|
||||||
|
|
||||||
|
另一个 `rename` 版本默认在 Manjaro 上可获得,这是一个 Arch 的衍生版,更简单,但是可能没有那么强大:
|
||||||
|
|
||||||
|
```
|
||||||
|
rename .JPEG .jpg *
|
||||||
|
```
|
||||||
|
|
||||||
|
这和你之前看到的上面做相同的重命名操作。在这个版本,`.JPEG` 是你想改变的字符组成的字符串,`.jpg` 是你想要改变成为的,`*` 表示当前目录下的所有文件。
|
||||||
|
|
||||||
|
基本原则是如果你所做的仅仅是重命名一个文件或者目录,你最好用 `mv`,这是因为 `mv` 在所有分发版上都是可靠一致的。
|
||||||
|
|
||||||
|
### 了解更多
|
||||||
|
|
||||||
|
查看 `mv` 和 `cp` 的 man 页面了解更多。运行
|
||||||
|
|
||||||
|
```
|
||||||
|
man cp
|
||||||
|
```
|
||||||
|
|
||||||
|
或者
|
||||||
|
```
|
||||||
|
man mv
|
||||||
|
```
|
||||||
|
|
||||||
|
来阅读这些命令自带的所有选项,这些使他们使用起来更强大和安全。
|
||||||
|
|
||||||
|
----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://www.linux.com/blog/2018/8/linux-beginners-moving-things-around
|
||||||
|
|
||||||
|
作者:[Paul Brown][a]
|
||||||
|
选题:[lujun9972](https://github.com/lujun9972)
|
||||||
|
译者:[warmfrog](https://github.com/warmfrog)
|
||||||
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://www.linux.com/users/bro66
|
||||||
|
[1]: https://linux.cn/article-10066-1.html
|
||||||
|
[2]: https://linux.cn/article-10399-1.html
|
||||||
|
[3]: https://www.nano-editor.org/
|
||||||
|
[4]: https://www.vim.org/
|
||||||
|
[5]: https://en.wikipedia.org/wiki/Disk_sector
|
||||||
|
[6]: https://en.wikipedia.org/wiki/Regular_expression
|
||||||
|
[7]: https://linux.cn/article-10370-1.html
|
||||||
|
|
@ -1,53 +1,48 @@
|
|||||||
[#]: collector: (lujun9972)
|
[#]: collector: (lujun9972)
|
||||||
[#]: translator: (geekpi)
|
[#]: translator: (geekpi)
|
||||||
[#]: reviewer: ( )
|
[#]: reviewer: (wxy)
|
||||||
[#]: publisher: ( )
|
[#]: publisher: (wxy)
|
||||||
[#]: url: ( )
|
[#]: url: (https://linux.cn/article-10774-1.html)
|
||||||
[#]: subject: (Enjoy Netflix? You Should Thank FreeBSD)
|
[#]: subject: (Enjoy Netflix? You Should Thank FreeBSD)
|
||||||
[#]: via: (https://itsfoss.com/netflix-freebsd-cdn/)
|
[#]: via: (https://itsfoss.com/netflix-freebsd-cdn/)
|
||||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||||
|
|
||||||
享受 Netflix 么?你应该感谢 FreeBSD
|
喜欢 Netflix 么?你应该感谢 FreeBSD
|
||||||
======
|
======
|
||||||
|
|
||||||
Netflix 是世界上最受欢迎的流媒体服务之一。
|
![][7]
|
||||||
|
|
||||||
但你已经知道了。不是吗?
|
Netflix 是世界上最受欢迎的流媒体服务之一。对,你已经知道了。但你可能不知道的是 Netflix 使用 [FreeBSD][1] 向你提供内容。
|
||||||
|
|
||||||
你可能不知道的是 Netflix 使用 [FreeBSD][1] 向你提供内容。
|
是的。Netflix 依靠 FreeBSD 来构建其内部内容交付网络(CDN)。
|
||||||
|
|
||||||
是的。Netflix 依靠 FreeBSD 来构建其内部内容交付网络 (CDN)。
|
|
||||||
|
|
||||||
[CDN][2] 是一组位于世界各地的服务器。它主要用于向终端用户分发像图像和视频这样的“大文件”。
|
[CDN][2] 是一组位于世界各地的服务器。它主要用于向终端用户分发像图像和视频这样的“大文件”。
|
||||||
|
|
||||||
Netflix 没有选择商业 CDN 服务,而是建立了自己的内部 CDN,名为 [Open Connect][3]。
|
Netflix 没有选择商业 CDN 服务,而是建立了自己的内部 CDN,名为 [Open Connect][3]。
|
||||||
|
|
||||||
Open Connect 使用[自定义硬件][4],Open Connect Appliance。你可以在下面的图片中看到它。它可以处理 40Gb/s 的数据,存储容量为 248 TB。
|
Open Connect 使用[自定义硬件][4]:Open Connect Appliance。你可以在下面的图片中看到它。它可以每秒处理 40Gb 的数据,存储容量为 248 TB。
|
||||||
|
|
||||||
![Netflix’s Open Connect Appliance runs FreeBSD][5]
|
![Netflix’s Open Connect Appliance runs FreeBSD][5]
|
||||||
|
|
||||||
Netflix 免费为合格的互联网服务提供商 (ISP) 提供 Open Connect Appliance。通过这种方式,大量的 Netflix 流量得到了本地化,ISP 可以更高效地提供 Netflix 内容。
|
Netflix 免费为合格的互联网服务提供商(ISP) 提供 Open Connect Appliance。通过这种方式,大量的 Netflix 流量得到了本地化,ISP 可以更高效地提供 Netflix 内容。
|
||||||
|
|
||||||
Open Connect Appliance 运行在 FreeBSD 操作系统上,并且[几乎完全运行开源软件][6]。
|
Open Connect Appliance 运行在 FreeBSD 操作系统上,并且[几乎完全运行开源软件][6]。
|
||||||
|
|
||||||
### Open Connect 使用 FreeBSD “头”
|
### Open Connect 使用最新版 FreeBSD
|
||||||
|
|
||||||
![][7]
|
|
||||||
|
|
||||||
你或许会期望 Netflix 在这样一个关键基础设施上使用 FreeBSD 的稳定版本,但 Netflix 会跟踪 [FreeBSD 头/当前版本][8]。Netflix 表示,跟踪“头”让他们“保持前瞻性,专注于创新”。
|
|
||||||
|
|
||||||
以下是 Netflix 跟踪 FreeBSD 的好处:
|
|
||||||
|
|
||||||
* 更快的功能迭代
|
|
||||||
* 更快地使用 FreeBSD 的新功能
|
|
||||||
* 更快的 bug 修复
|
|
||||||
* 实现协作
|
|
||||||
* 尽量减少合并冲突
|
|
||||||
* 摊销合并“成本”
|
|
||||||
|
|
||||||
|
|
||||||
|
你或许会觉得 Netflix 会在这样一个关键基础设施上使用 FreeBSD 的稳定版本,但 Netflix 会跟踪 [FreeBSD 最新/当前版本][8]。Netflix 表示,跟踪“最新版”可以让他们“保持前瞻性,专注于创新”。
|
||||||
|
|
||||||
> 运行 FreeBSD “head” 可以让我们非常高效地向用户分发大量数据,同时保持高速的功能开发。
|
以下是 Netflix 跟踪最新版 FreeBSD 的好处:
|
||||||
|
|
||||||
|
* 更快的功能迭代
|
||||||
|
* 更快地使用 FreeBSD 的新功能
|
||||||
|
* 更快的 bug 修复
|
||||||
|
* 实现协作
|
||||||
|
* 尽量减少合并冲突
|
||||||
|
* 摊销合并“成本”
|
||||||
|
|
||||||
|
> 运行 FreeBSD “最新版” 可以让我们非常高效地向用户分发大量数据,同时保持高速的功能开发。
|
||||||
>
|
>
|
||||||
> Netflix
|
> Netflix
|
||||||
|
|
||||||
@ -57,7 +52,7 @@ Open Connect Appliance 运行在 FreeBSD 操作系统上,并且[几乎完全
|
|||||||
|
|
||||||
那么 Netflix 用 FreeBSD 实现了什么?以下是一些统计数据:
|
那么 Netflix 用 FreeBSD 实现了什么?以下是一些统计数据:
|
||||||
|
|
||||||
> 使用 FreeBSD 和商业硬件,我们在 16 核 2.6GHz CPU 上使用约 55% 的 CPU,实现了 90 Gb/s 的 TLS 加密连接,。
|
> 使用 FreeBSD 和商业硬件,我们在 16 核 2.6 GHz CPU 上使用约 55% 的 CPU,实现了 90 Gb/s 的 TLS 加密连接。
|
||||||
>
|
>
|
||||||
> Netflix
|
> Netflix
|
||||||
|
|
||||||
@ -72,7 +67,7 @@ via: https://itsfoss.com/netflix-freebsd-cdn/
|
|||||||
作者:[Abhishek Prakash][a]
|
作者:[Abhishek Prakash][a]
|
||||||
选题:[lujun9972][b]
|
选题:[lujun9972][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/) 荣誉推出
|
||||||
|
|
67
published/201904/20190409 Enhanced security at the edge.md
Normal file
67
published/201904/20190409 Enhanced security at the edge.md
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: (hopefully2333)
|
||||||
|
[#]: reviewer: (wxy)
|
||||||
|
[#]: publisher: (wxy)
|
||||||
|
[#]: url: (https://linux.cn/article-10773-1.html)
|
||||||
|
[#]: subject: (Enhanced security at the edge)
|
||||||
|
[#]: via: (https://www.networkworld.com/article/3388130/enhanced-security-at-the-edge.html#tk.rss_all)
|
||||||
|
[#]: author: (Anne Taylor https://www.networkworld.com/author/Anne-Taylor/)
|
||||||
|
|
||||||
|
增强边缘计算的安全性
|
||||||
|
======
|
||||||
|
|
||||||
|
> 边缘计算环境带来的安全风险迫使公司必须特别关注它的安全措施。
|
||||||
|
|
||||||
|
![](https://images.idgesg.net/images/article/2019/04/istock-1091707448-100793312-large.jpg)
|
||||||
|
|
||||||
|
说数据安全是高管们和董事会最关注的问题已经是陈词滥调了。但问题是:数据安全问题不会自己消失。
|
||||||
|
|
||||||
|
骇客和攻击者一直在寻找利用缺陷的新方法。就像公司开始使用人工智能和机器学习等新兴技术来自动化地保护他们的组织一样,那些不良分子们也在使用这些技术来达成他们的目的。
|
||||||
|
|
||||||
|
简而言之,安全问题是一定不能忽视的。现在,随着越来越多的公司开始使用边缘计算,如何保护这些边缘计算环境,需要有新的安全考量。
|
||||||
|
|
||||||
|
### 边缘计算的风险更高
|
||||||
|
|
||||||
|
正如 Network World 的一篇文章所说,边缘计算的安全架构应该将重点放在物理安全上。这并不是说要忽视保护传输过程中的数据。而是说,实际的物理环境和物理设备更加值得关注。
|
||||||
|
|
||||||
|
例如,边缘计算的硬件设备通常位于较大的公司或者广阔空间中,有时候是在很容易进入的共享办公室和公共区域里。从表面上看,这节省了成本,能更快地访问到相关的数据,而不必在后端的数据中心和前端的设备之间往返。
|
||||||
|
|
||||||
|
但是,如果没有任何级别的访问控制,这台设备就会暴露在恶意操作和简单人为错误的双重风险之下。想象一下办公室的清洁工意外地关掉了设备,以及随之而来的停机所造成的后果。
|
||||||
|
|
||||||
|
另一个风险是 “影子边缘 IT”。有时候非 IT 人员会部署一个边缘设备来快速启动项目,却没有及时通知 IT 部门这个设备正在连接到网络。例如,零售商店可能会主动安装他们自己的数字标牌,或者,销售团队会将物联网传感器应用到电视中,并在销售演示中实时地部署它们。
|
||||||
|
|
||||||
|
在这种情况下,IT 部门很少甚至完全看不到这些边缘设备,这就使得网络可能暴露在外。
|
||||||
|
|
||||||
|
### 保护边缘计算环境
|
||||||
|
|
||||||
|
部署微型数据中心(MDC)是规避上述风险的一个简单方法。
|
||||||
|
|
||||||
|
> “在历史上,大多数这些[边缘]环境都是不受控制的,”施耐德电气安全能源部门的首席技术官和创新高级副总裁 Kevin Brown 说。“它们可能是第 1 级,但很可能是第 0 级类型的设计 —— 它们就像开放的配线柜。它们现在需要像微型数据中心一样的对待。你管理它需要像管理关键任务数据中心一样”
|
||||||
|
|
||||||
|
单说听起来的感觉,这个解决方案是一个安全、独立的机箱,它包括在室内和室外运行程序所需的所有存储空间、处理性能和网络资源。它同样包含必要的电源、冷却、安全和管理工具。
|
||||||
|
|
||||||
|
而它最重要的是高级别的安全性。这个装置是封闭的,有上锁的门,可以防止非法入侵。通过合适的供应商,DMC 可以进行定制,包括用于远程数字化管理的监控摄像头、传感器和监控技术。
|
||||||
|
|
||||||
|
随着越来越多的公司开始利用边缘计算的优势,他们必须利用安全解决方案的优势来保护他们的数据和边缘环境。
|
||||||
|
|
||||||
|
在 APC.com 上了解保护你的边缘计算环境的最佳方案。
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://www.networkworld.com/article/3388130/enhanced-security-at-the-edge.html
|
||||||
|
|
||||||
|
作者:[Anne Taylor][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[hopefully2333](https://github.com/hopefully2333)
|
||||||
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://www.networkworld.com/author/Anne-Taylor/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://images.idgesg.net/images/article/2019/04/istock-1091707448-100793312-large.jpg
|
||||||
|
[2]: https://www.csoonline.com/article/3250144/6-ways-hackers-will-use-machine-learning-to-launch-attacks.html
|
||||||
|
[3]: https://www.marketwatch.com/press-release/edge-computing-market-2018-global-analysis-opportunities-and-forecast-to-2023-2018-08-20
|
||||||
|
[4]: https://www.networkworld.com/article/3224893/what-is-edge-computing-and-how-it-s-changing-the-network.html
|
||||||
|
[5]: https://www.youtube.com/watch?v=1NLk1cXEukQ
|
||||||
|
[6]: https://www.apc.com/us/en/solutions/business-solutions/edge-computing.jsp
|
@ -63,7 +63,7 @@ mygroup1:x:1013:
|
|||||||
|
|
||||||
#### 如何使用 usermod 命令将现有的用户添加到次要组或附加组?
|
#### 如何使用 usermod 命令将现有的用户添加到次要组或附加组?
|
||||||
|
|
||||||
要将现有用户添加到辅助组,请使用带有 `-g` 选项和组名称的 `usermod` 命令。
|
要将现有用户添加到辅助组,请使用带有 `-G` 选项和组名称的 `usermod` 命令。
|
||||||
|
|
||||||
语法:
|
语法:
|
||||||
|
|
@ -1,16 +1,16 @@
|
|||||||
[#]: collector: (lujun9972)
|
[#]: collector: (lujun9972)
|
||||||
[#]: translator: (geekpi)
|
[#]: translator: (geekpi)
|
||||||
[#]: reviewer: ( )
|
[#]: reviewer: (wxy)
|
||||||
[#]: publisher: ( )
|
[#]: publisher: (wxy)
|
||||||
[#]: url: ( )
|
[#]: url: (https://linux.cn/article-10778-1.html)
|
||||||
[#]: subject: (How to Zip Files and Folders in Linux [Beginner Tip])
|
[#]: subject: (How to Zip Files and Folders in Linux [Beginner Tip])
|
||||||
[#]: via: (https://itsfoss.com/linux-zip-folder/)
|
[#]: via: (https://itsfoss.com/linux-zip-folder/)
|
||||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||||
|
|
||||||
如何在 Linux 中 zip 压缩文件和文件夹(初学者提示)
|
初级:如何在 Linux 中 zip 压缩文件和文件夹
|
||||||
======
|
======
|
||||||
|
|
||||||
_ **简介:本文向你展示了如何在 Ubuntu 和其他 Linux 发行版中创建一个 zip 文件夹。终端和 GUI 方法都有。** _
|
> 本文向你展示了如何在 Ubuntu 和其他 Linux 发行版中创建一个 zip 文件夹。终端和 GUI 方法都有。
|
||||||
|
|
||||||
zip 是最流行的归档文件格式之一。使用 zip,你可以将多个文件压缩到一个文件中。这不仅节省了磁盘空间,还节省了网络带宽。这就是为什么你几乎一直会看到 zip 文件的原因。
|
zip 是最流行的归档文件格式之一。使用 zip,你可以将多个文件压缩到一个文件中。这不仅节省了磁盘空间,还节省了网络带宽。这就是为什么你几乎一直会看到 zip 文件的原因。
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ zip 是最流行的归档文件格式之一。使用 zip,你可以将多个文
|
|||||||
|
|
||||||
**先决条件:验证是否安装了 zip**
|
**先决条件:验证是否安装了 zip**
|
||||||
|
|
||||||
通常 [zip][1] 已经安装,但验证下也没坏处。你可以运行以下命令来安装 zip 和 unzip。如果它尚未安装,它将立即安装。
|
通常 [zip][1] 已经安装,但验证下也没坏处。你可以运行以下命令来安装 `zip` 和 `unzip`。如果它尚未安装,它将立即安装。
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo apt install zip unzip
|
sudo apt install zip unzip
|
||||||
@ -30,7 +30,7 @@ sudo apt install zip unzip
|
|||||||
|
|
||||||
### 在 Linux 命令行中压缩文件夹
|
### 在 Linux 命令行中压缩文件夹
|
||||||
|
|
||||||
zip 命令的语法非常简单。
|
`zip` 命令的语法非常简单。
|
||||||
|
|
||||||
```
|
```
|
||||||
zip [option] output_file_name input1 input2
|
zip [option] output_file_name input1 input2
|
||||||
@ -42,7 +42,7 @@ zip [option] output_file_name input1 input2
|
|||||||
zip -r output_file.zip file1 folder1
|
zip -r output_file.zip file1 folder1
|
||||||
```
|
```
|
||||||
|
|
||||||
-r 选项将递归目录并压缩其内容。输出文件中的 .zip 扩展名是可选的,因为默认情况下会添加 .zip。
|
`-r` 选项将递归目录并压缩其内容。输出文件中的 .zip 扩展名是可选的,因为默认情况下会添加 .zip。
|
||||||
|
|
||||||
你应该会在 zip 操作期间看到要添加到压缩文件夹中的文件。
|
你应该会在 zip 操作期间看到要添加到压缩文件夹中的文件。
|
||||||
|
|
||||||
@ -55,13 +55,13 @@ zip -r myzip abhi-1.txt abhi-2.txt sample_directory
|
|||||||
adding: sample_directory/agatha.txt (deflated 41%)
|
adding: sample_directory/agatha.txt (deflated 41%)
|
||||||
```
|
```
|
||||||
|
|
||||||
你可以使用 -e 选项[在 Linux 中创建密码保护的 zip 文件夹][3]。
|
你可以使用 `-e` 选项[在 Linux 中创建密码保护的 zip 文件夹][3]。
|
||||||
|
|
||||||
你并不是只能通过终端创建 zip 归档文件。你也可以用图形方式做到这一点。下面是如何做的!
|
你并不是只能通过终端创建 zip 归档文件。你也可以用图形方式做到这一点。下面是如何做的!
|
||||||
|
|
||||||
### 在 Ubuntu Linux 中使用 GUI 压缩文件夹
|
### 在 Ubuntu Linux 中使用 GUI 压缩文件夹
|
||||||
|
|
||||||
_虽然我在这里使用 Ubuntu,但在使用 GNOME 或其他桌面环境的其他发行版中,方法应该基本相同。_
|
*虽然我在这里使用 Ubuntu,但在使用 GNOME 或其他桌面环境的其他发行版中,方法应该基本相同。*
|
||||||
|
|
||||||
如果要在 Linux 桌面中压缩文件或文件夹,只需点击几下即可。
|
如果要在 Linux 桌面中压缩文件或文件夹,只需点击几下即可。
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ _虽然我在这里使用 Ubuntu,但在使用 GNOME 或其他桌面环境的
|
|||||||
|
|
||||||
现在,你可以使用 zip、tar xz 或 7z 格式创建压缩归档文件。如果你好奇,这三个都是各种压缩算法,你可以使用它们来压缩文件。
|
现在,你可以使用 zip、tar xz 或 7z 格式创建压缩归档文件。如果你好奇,这三个都是各种压缩算法,你可以使用它们来压缩文件。
|
||||||
|
|
||||||
输入一个你想要的名字,并点击“创建”
|
输入一个你想要的名字,并点击“创建”。
|
||||||
|
|
||||||
![Create archive file][5]
|
![Create archive file][5]
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ via: https://itsfoss.com/linux-zip-folder/
|
|||||||
作者:[Abhishek Prakash][a]
|
作者:[Abhishek Prakash][a]
|
||||||
选题:[lujun9972][b]
|
选题:[lujun9972][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/) 荣誉推出
|
||||||
|
|
@ -1,32 +1,31 @@
|
|||||||
[#]: collector: (lujun9972)
|
[#]: collector: (lujun9972)
|
||||||
[#]: translator: (geekpi)
|
[#]: translator: (geekpi)
|
||||||
[#]: reviewer: ( )
|
[#]: reviewer: (wxy)
|
||||||
[#]: publisher: ( )
|
[#]: publisher: (wxy)
|
||||||
[#]: url: ( )
|
[#]: url: (https://linux.cn/article-10780-1.html)
|
||||||
[#]: subject: (Getting started with Mercurial for version control)
|
[#]: subject: (Getting started with Mercurial for version control)
|
||||||
[#]: via: (https://opensource.com/article/19/4/getting-started-mercurial)
|
[#]: via: (https://opensource.com/article/19/4/getting-started-mercurial)
|
||||||
[#]: author: (Moshe Zadka https://opensource.com/users/moshez)
|
[#]: author: (Moshe Zadka https://opensource.com/users/moshez)
|
||||||
|
|
||||||
开始使用 Mercurial 进行版本控制
|
Mercurial 版本控制入门
|
||||||
======
|
======
|
||||||
了解 Mercurial 的基础知识,它是一个用 Python 写的分布式版本控制系统。
|
|
||||||
|
> 了解 Mercurial 的基础知识,它是一个用 Python 写的分布式版本控制系统。
|
||||||
|
|
||||||
![][1]
|
![][1]
|
||||||
|
|
||||||
[Mercurial][2] 是一个用 Python 编写的分布式版本控制系统。因为它是用高级语言编写的,所以你可以用 Python 函数编写一个 Mercurial 扩展。
|
[Mercurial][2] 是一个用 Python 编写的分布式版本控制系统。因为它是用高级语言编写的,所以你可以用 Python 函数编写一个 Mercurial 扩展。
|
||||||
|
|
||||||
在[官方文档中][3]说明了几种安装 Mercurial 的方法。我最喜欢的一种方法不在里面:使用 **pip**。这是开发本地扩展的最合适方式!
|
在[官方文档中][3]说明了几种安装 Mercurial 的方法。我最喜欢的一种方法不在里面:使用 `pip`。这是开发本地扩展的最合适方式!
|
||||||
|
|
||||||
目前,Mercurial 仅支持 Python 2.7,因此你需要创建一个 Python 2.7 虚拟环境:
|
目前,Mercurial 仅支持 Python 2.7,因此你需要创建一个 Python 2.7 虚拟环境:
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
python2 -m virtualenv mercurial-env
|
python2 -m virtualenv mercurial-env
|
||||||
./mercurial-env/bin/pip install mercurial
|
./mercurial-env/bin/pip install mercurial
|
||||||
```
|
```
|
||||||
|
|
||||||
为了有一个简短的命令,以及满足人们对化学幽默的无法满足的需求,命令称之为 **hg**。
|
为了让命令简短一些,以及满足人们对化学幽默的渴望,该命令称之为 `hg`。
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
$ source mercurial-env/bin/activate
|
$ source mercurial-env/bin/activate
|
||||||
@ -39,7 +38,6 @@ $ source mercurial-env/bin/activate
|
|||||||
|
|
||||||
由于还没有任何文件,因此状态为空。添加几个文件:
|
由于还没有任何文件,因此状态为空。添加几个文件:
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
(mercurial-env)$ echo 1 > one
|
(mercurial-env)$ echo 1 > one
|
||||||
(mercurial-env)$ echo 2 > two
|
(mercurial-env)$ echo 2 > two
|
||||||
@ -58,13 +56,12 @@ date: Fri Mar 29 12:42:43 2019 -0700
|
|||||||
summary: Adding stuff
|
summary: Adding stuff
|
||||||
```
|
```
|
||||||
|
|
||||||
**addremove** 命令很有用:它将任何未被忽略的新文件添加到托管文件列表中,并移除任何已删除的文件。
|
`addremove` 命令很有用:它将任何未被忽略的新文件添加到托管文件列表中,并移除任何已删除的文件。
|
||||||
|
|
||||||
如我所说,Mercurial 扩展用 Python 写成,它们只是常规的 Python 模块。
|
如我所说,Mercurial 扩展用 Python 写成,它们只是常规的 Python 模块。
|
||||||
|
|
||||||
这是一个简短的 Mercurial 扩展示例:
|
这是一个简短的 Mercurial 扩展示例:
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
from mercurial import registrar
|
from mercurial import registrar
|
||||||
from mercurial.i18n import _
|
from mercurial.i18n import _
|
||||||
@ -74,19 +71,17 @@ command = registrar.command(cmdtable)
|
|||||||
|
|
||||||
@command('say-hello',
|
@command('say-hello',
|
||||||
[('w', 'whom', '', _('Whom to greet'))])
|
[('w', 'whom', '', _('Whom to greet'))])
|
||||||
def say_hello(ui, repo, **opts):
|
def say_hello(ui, repo, `opts):
|
||||||
ui.write("hello ", opts['whom'], "\n")
|
ui.write("hello ", opts['whom'], "\n")
|
||||||
```
|
```
|
||||||
|
|
||||||
一个简单的测试方法是将它手动加入虚拟环境中的文件中:
|
简单的测试方法是将它手动加入虚拟环境中的文件中:
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
`$ vi ../mercurial-env/lib/python2.7/site-packages/hello_ext.py`
|
`$ vi ../mercurial-env/lib/python2.7/site-packages/hello_ext.py`
|
||||||
```
|
```
|
||||||
|
|
||||||
然后你需要_启用_扩展。你可以仅在当前仓库中启用它开始:
|
然后你需要*启用*扩展。你可以仅在当前仓库中启用它:
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cat >> .hg/hgrc
|
$ cat >> .hg/hgrc
|
||||||
@ -96,13 +91,12 @@ hello_ext =
|
|||||||
|
|
||||||
现在,问候有了:
|
现在,问候有了:
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
(mercurial-env)$ hg say-hello --whom world
|
(mercurial-env)$ hg say-hello --whom world
|
||||||
hello world
|
hello world
|
||||||
```
|
```
|
||||||
|
|
||||||
大多数扩展会做更多有用的东西,甚至可能与 Mercurial 有关。 **repo** 对象是 **mercurial.hg.repository** 的对象。
|
大多数扩展会做更多有用的东西,甚至可能与 Mercurial 有关。 `repo` 对象是 `mercurial.hg.repository` 的对象。
|
||||||
|
|
||||||
有关 Mercurial API 的更多信息,请参阅[官方文档][5]。并访问[官方仓库][6]获取更多示例和灵感。
|
有关 Mercurial API 的更多信息,请参阅[官方文档][5]。并访问[官方仓库][6]获取更多示例和灵感。
|
||||||
|
|
||||||
@ -110,10 +104,10 @@ hello world
|
|||||||
|
|
||||||
via: https://opensource.com/article/19/4/getting-started-mercurial
|
via: https://opensource.com/article/19/4/getting-started-mercurial
|
||||||
|
|
||||||
作者:[Moshe Zadka (Community Moderator)][a]
|
作者:[Moshe Zadka][a]
|
||||||
选题:[lujun9972][b]
|
选题:[lujun9972][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/) 荣誉推出
|
||||||
|
|
@ -1,20 +1,22 @@
|
|||||||
[#]: collector: (lujun9972)
|
[#]: collector: (lujun9972)
|
||||||
[#]: translator: (MjSeven)
|
[#]: translator: (MjSeven)
|
||||||
[#]: reviewer: ( )
|
[#]: reviewer: (wxy)
|
||||||
[#]: publisher: ( )
|
[#]: publisher: (wxy)
|
||||||
[#]: url: ( )
|
[#]: url: (https://linux.cn/article-10777-1.html)
|
||||||
[#]: subject: (How to identify duplicate files on Linux)
|
[#]: subject: (How to identify duplicate files on Linux)
|
||||||
[#]: via: (https://www.networkworld.com/article/3387961/how-to-identify-duplicate-files-on-linux.html#tk.rss_all)
|
[#]: via: (https://www.networkworld.com/article/3387961/how-to-identify-duplicate-files-on-linux.html#tk.rss_all)
|
||||||
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
|
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
|
||||||
|
|
||||||
如何识别 Linux 上的重复文件
|
如何识别 Linux 上的文件分身
|
||||||
======
|
======
|
||||||
Linux 系统上的一些文件可能出现在多个位置。按照本文指示查找并识别这些“同卵双胞胎”,还可以了解为什么硬链接会如此有利。
|
|
||||||
|
> Linux 系统上的一些文件可能出现在多个位置。按照本文指示查找并识别这些“同卵双胞胎”,还可以了解为什么硬链接会如此有利。
|
||||||
|
|
||||||
![Archana Jarajapu \(CC BY 2.0\)][1]
|
![Archana Jarajapu \(CC BY 2.0\)][1]
|
||||||
|
|
||||||
识别共享磁盘空间的文件依赖于利用文件共享相同的 `inode` 这一事实。这种数据结构存储除了文件名和内容之外的所有信息。如果两个或多个文件具有不同的名称和文件系统位置,但共享一个 inode,则它们还共享内容、所有权、权限等。
|
识别使用同一个磁盘空间的文件依赖于利用文件使用相同的 inode 这一事实。这种数据结构存储除了文件名和内容之外的所有信息。如果两个或多个文件具有不同的名称和文件系统位置,但共享一个 inode,则它们还共享内容、所有权、权限等。
|
||||||
|
|
||||||
这些文件通常被称为“硬链接”,不像符号链接(即软链接)那样仅仅通过包含它们的名称指向其他文件,符号链接很容易在文件列表中通过第一个位置的 “l” 和引用文件的 **->** 符号识别出来。
|
这些文件通常被称为“硬链接”,不像符号链接(即软链接)那样仅仅通过包含它们的名称指向其他文件,符号链接很容易在文件列表中通过第一个位置的 `l` 和引用文件的 `->` 符号识别出来。
|
||||||
|
|
||||||
```
|
```
|
||||||
$ ls -l my*
|
$ ls -l my*
|
||||||
@ -23,7 +25,7 @@ lrwxrwxrwx 1 shs shs 6 Apr 15 11:18 myref -> myfile
|
|||||||
-rw-r--r-- 4 shs shs 228 Apr 12 19:37 mytwin
|
-rw-r--r-- 4 shs shs 228 Apr 12 19:37 mytwin
|
||||||
```
|
```
|
||||||
|
|
||||||
识别单个目录中的硬链接并不是很明显,但它仍然非常容易。如果使用 **ls -i** 命令列出文件并按 `inode` 编号排序,则可以非常容易地挑选出硬链接。在这种类型的 `ls` 输出中,第一列显示 `inode` 编号。
|
在单个目录中的硬链接并不是很明显,但它仍然非常容易找到。如果使用 `ls -i` 命令列出文件并按 inode 编号排序,则可以非常容易地挑选出硬链接。在这种类型的 `ls` 输出中,第一列显示 inode 编号。
|
||||||
|
|
||||||
```
|
```
|
||||||
$ ls -i | sort -n | more
|
$ ls -i | sort -n | more
|
||||||
@ -36,11 +38,10 @@ $ ls -i | sort -n | more
|
|||||||
800247 nmap-notes
|
800247 nmap-notes
|
||||||
```
|
```
|
||||||
|
|
||||||
扫描输出,查找相同的 `inode` 编号,任何匹配都会告诉你想知道的内容。
|
扫描输出,查找相同的 inode 编号,任何匹配都会告诉你想知道的内容。
|
||||||
|
|
||||||
**[另请参考:[Linux 疑难解答的宝贵提示和技巧][2]]**
|
另一方面,如果你只是想知道某个特定文件是否是另一个文件的硬链接,那么有一种方法比浏览数百个文件的列表更简单,即 `find` 命令的 `-samefile` 选项将帮助你完成工作。
|
||||||
|
|
||||||
另一方面,如果你只是想知道某个特定文件是否是另一个文件的硬链接,那么有一种方法比浏览数百个文件的列表更简单,即 `find` 命令的 **-samefile** 选项将帮助你完成工作。
|
|
||||||
```
|
```
|
||||||
$ find . -samefile myfile
|
$ find . -samefile myfile
|
||||||
./myfile
|
./myfile
|
||||||
@ -50,7 +51,8 @@ $ find . -samefile myfile
|
|||||||
|
|
||||||
注意,提供给 `find` 命令的起始位置决定文件系统会扫描多少来进行匹配。在上面的示例中,我们正在查看当前目录和子目录。
|
注意,提供给 `find` 命令的起始位置决定文件系统会扫描多少来进行匹配。在上面的示例中,我们正在查看当前目录和子目录。
|
||||||
|
|
||||||
使用 find 的 **-ls** 选项添加输出的详细信息可能更有说服力:
|
使用 `find` 的 `-ls` 选项添加输出的详细信息可能更有说服力:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ find . -samefile myfile -ls
|
$ find . -samefile myfile -ls
|
||||||
788000 4 -rw-r--r-- 4 shs shs 228 Apr 12 19:37 ./myfile
|
788000 4 -rw-r--r-- 4 shs shs 228 Apr 12 19:37 ./myfile
|
||||||
@ -58,9 +60,10 @@ $ find . -samefile myfile -ls
|
|||||||
788000 4 -rw-r--r-- 4 shs shs 228 Apr 12 19:37 ./mytwin
|
788000 4 -rw-r--r-- 4 shs shs 228 Apr 12 19:37 ./mytwin
|
||||||
```
|
```
|
||||||
|
|
||||||
第一列显示 `inode` 编号,然后我们会看到文件权限、链接、所有者、文件大小、日期信息以及引用相同磁盘内容的文件的名称。注意,在这种情况下,`link` 字段是 “4” 而不是我们可能期望的 “3”。这告诉我们还有另一个指向同一个 `inode` 的链接(但不在我们的搜索范围内)。
|
第一列显示 inode 编号,然后我们会看到文件权限、链接、所有者、文件大小、日期信息以及引用相同磁盘内容的文件的名称。注意,在这种情况下,链接字段是 “4” 而不是我们可能期望的 “3”。这告诉我们还有另一个指向同一个 inode 的链接(但不在我们的搜索范围内)。
|
||||||
|
|
||||||
如果你想在一个目录中查找所有硬链接的实例,可以尝试以下的脚本来创建列表并为你查找副本:
|
如果你想在一个目录中查找所有硬链接的实例,可以尝试以下的脚本来创建列表并为你查找副本:
|
||||||
|
|
||||||
```
|
```
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
@ -83,13 +86,15 @@ done < /tmp/$0
|
|||||||
|
|
||||||
# clean up
|
# clean up
|
||||||
rm /tmp/$0
|
rm /tmp/$0
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
$ ./findHardLinks
|
$ ./findHardLinks
|
||||||
788000 myfile
|
788000 myfile
|
||||||
788000 mytwin
|
788000 mytwin
|
||||||
```
|
```
|
||||||
|
|
||||||
你还可以使用 `find` 命令按 `inode` 编号查找文件,如命令中所示。但是,此搜索可能涉及多个文件系统,因此可能会得到错误的结果。因为相同的 `inode` 编号可能会在另一个文件系统中使用,代表另一个文件。如果是这种情况,文件的其他详细信息将不相同。
|
你还可以使用 `find` 命令按 inode 编号查找文件,如命令中所示。但是,此搜索可能涉及多个文件系统,因此可能会得到错误的结果。因为相同的 inode 编号可能会在另一个文件系统中使用,代表另一个文件。如果是这种情况,文件的其他详细信息将不相同。
|
||||||
|
|
||||||
```
|
```
|
||||||
$ find / -inum 788000 -ls 2> /dev/null
|
$ find / -inum 788000 -ls 2> /dev/null
|
||||||
@ -99,20 +104,18 @@ $ find / -inum 788000 -ls 2> /dev/null
|
|||||||
788000 4 -rw-r--r-- 4 shs shs 228 Apr 12 19:37 /home/shs/mytwin
|
788000 4 -rw-r--r-- 4 shs shs 228 Apr 12 19:37 /home/shs/mytwin
|
||||||
```
|
```
|
||||||
|
|
||||||
注意,错误输出被重定向到 `/dev/null`,这样我们就不必查看所有 "Permission denied" 错误,否则这些错误将显示在我们不允许查看的其他目录中。
|
注意,错误输出被重定向到 `/dev/null`,这样我们就不必查看所有 “Permission denied” 错误,否则这些错误将显示在我们不允许查看的其他目录中。
|
||||||
|
|
||||||
此外,扫描包含相同内容但不共享 `inode` 的文件(即,简单的文本拷贝)将花费更多的时间和精力。
|
此外,扫描包含相同内容但不共享 inode 的文件(即,简单的文本拷贝)将花费更多的时间和精力。
|
||||||
|
|
||||||
加入 [Facebook][3] 和 [LinkedIn][4] 上的网络世界社区,对重要的话题发表评论。
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
via: https://www.networkworld.com/article/3387961/how-to-identify-duplicate-files-on-linux.html#tk.rss_all
|
via: https://www.networkworld.com/article/3387961/how-to-identify-duplicate-files-on-linux.html
|
||||||
|
|
||||||
作者:[Sandra Henry-Stocker][a]
|
作者:[Sandra Henry-Stocker][a]
|
||||||
选题:[lujun9972][b]
|
选题:[lujun9972][b]
|
||||||
译者:[MjSeven](https://github.com/MjSeven)
|
译者:[MjSeven](https://github.com/MjSeven)
|
||||||
校对:[校对者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,236 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: (arrowfeng)
|
||||||
|
[#]: reviewer: (wxy)
|
||||||
|
[#]: publisher: (wxy)
|
||||||
|
[#]: url: (https://linux.cn/article-10789-1.html)
|
||||||
|
[#]: subject: (How to Install MySQL in Ubuntu Linux)
|
||||||
|
[#]: via: (https://itsfoss.com/install-mysql-ubuntu/)
|
||||||
|
[#]: author: (Sergiu https://itsfoss.com/author/sergiu/)
|
||||||
|
|
||||||
|
怎样在 Ubuntu Linux 上安装 MySQL
|
||||||
|
======
|
||||||
|
|
||||||
|
> 本教程教你如何在基于 Ubuntu 的 Linux 发行版上安装 MySQL。对于首次使用的用户,你将会学习到如何验证你的安装和第一次怎样去连接 MySQL。
|
||||||
|
|
||||||
|
[MySQL][1] 是一个典型的数据库管理系统。它被用于许多技术栈中,包括流行的 [LAMP][2] (Linux、Apache、MySQL、PHP)技术栈。它已经被证实了其稳定性。另一个让 MySQL 受欢迎的原因是它是开源的。
|
||||||
|
|
||||||
|
MySQL 是关系型数据库(基本上是表格数据)。以这种方式它很容易去存储、组织和访问数据。它使用SQL(结构化查询语言)来管理数据。
|
||||||
|
|
||||||
|
这这篇文章中,我将向你展示如何在 Ubuntu 18.04 安装和使用 MySQL 8.0。让我们一起来看看吧!
|
||||||
|
|
||||||
|
### 在 Ubuntu 上安装 MySQL
|
||||||
|
|
||||||
|
![][3]
|
||||||
|
|
||||||
|
我将会介绍两种在 Ubuntu 18.04 上安装 MySQL 的方法:
|
||||||
|
|
||||||
|
1. 从 Ubuntu 仓库上安装 MySQL。非常简单,但不是最新版(5.7)
|
||||||
|
2. 从官方仓库安装 MySQL。你将额外增加一些步处理过程,但不用担心。你将会拥有最新版的MySQL(8.0)
|
||||||
|
|
||||||
|
有必要的时候,我将会提供屏幕截图去引导你。但这篇文章中的大部分步骤,我将直接在终端(默认热键: `CTRL+ALT+T`)输入命令。别害怕!
|
||||||
|
|
||||||
|
#### 方法 1、从 Ubuntu 仓库安装 MySQL
|
||||||
|
|
||||||
|
首先,输入下列命令确保你的仓库已经被更新:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt update
|
||||||
|
```
|
||||||
|
|
||||||
|
现在,安装 MySQL 5.7,简单输入下列命令:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt install mysql-server -y
|
||||||
|
```
|
||||||
|
|
||||||
|
就是这样!简单且高效。
|
||||||
|
|
||||||
|
#### 方法 2、使用官方仓库安装 MySQL
|
||||||
|
|
||||||
|
虽然这个方法多了一些步骤,但我将逐一介绍,并尝试写下清晰的笔记。
|
||||||
|
|
||||||
|
首先浏览 MySQL 官方网站的[下载页面][4]。
|
||||||
|
|
||||||
|
![][5]
|
||||||
|
|
||||||
|
在这里,选择 DEB 软件包,点击“Download”链接。
|
||||||
|
|
||||||
|
![][6]
|
||||||
|
|
||||||
|
滑到有关于 Oracle 网站信息的底部,右键 “No thanks, just start my download.”,然后选择 “Copy link location”。
|
||||||
|
|
||||||
|
现在回到终端,我们将使用 [Curl][7] 命令去下载这个软件包:
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -OL https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb
|
||||||
|
```
|
||||||
|
|
||||||
|
`https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb` 是我刚刚从网页上复制的链接。根据当前的 MySQL 版本,它有可能不同。让我们使用 `dpkg` 去开始安装 MySQL:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo dpkg -i mysql-apt-config*
|
||||||
|
```
|
||||||
|
|
||||||
|
更新你的仓库:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt update
|
||||||
|
```
|
||||||
|
|
||||||
|
要实际安装 MySQL,我们将使用像第一个方法中同样的命令来安装:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt install mysql-server -y
|
||||||
|
```
|
||||||
|
|
||||||
|
这样做会在你的终端中打开包配置的提示。使用向下箭头选择“Ok”选项。
|
||||||
|
|
||||||
|
![][8]
|
||||||
|
|
||||||
|
点击回车。这应该会提示你输入密码:这是在为 MySQL 设置 root 密码。不要与 [Ubuntu 的 root 密码混淆][9]。
|
||||||
|
|
||||||
|
![][10]
|
||||||
|
|
||||||
|
输入密码然后点击 Tab 键去选择“Ok“。点击回车键,你将重新输入密码。操作完之后,再次键入 Tab 去选择 “Ok”。按下回车键。
|
||||||
|
|
||||||
|
![][11]
|
||||||
|
|
||||||
|
将会展示一些关于 MySQL Server 的配置信息。再次按下 Tab 去选择 “Ok” 和按下回车键:
|
||||||
|
|
||||||
|
![][12]
|
||||||
|
|
||||||
|
这里你需要去选择默认验证插件。确保选择了“Use Strong Password Encryption”。按下 Tab 键和回车键。
|
||||||
|
|
||||||
|
就是这样!你已经成功地安装了 MySQL。
|
||||||
|
|
||||||
|
#### 验证你的 MySQL 安装
|
||||||
|
|
||||||
|
要验证 MySQL 已经正确安装,使用下列命令:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo systemctl status mysql.service
|
||||||
|
```
|
||||||
|
|
||||||
|
这将展示一些关于 MySQL 服务的信息:
|
||||||
|
|
||||||
|
![][13]
|
||||||
|
|
||||||
|
你应该在那里看到 “Active: active (running)”。如果你没有看到,使用下列命令去开始这个服务:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo systemctl start mysql.service
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 配置/保护 MySQL
|
||||||
|
|
||||||
|
对于刚安装的 MySQL,你应该运行它提供的安全相关的更新命令。就是:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo mysql_secure_installation
|
||||||
|
```
|
||||||
|
|
||||||
|
这样做首先会询问你是否想使用 “<ruby>密码有效强度<rt>validate password component</rt></ruby>”。如果你想使用它,你将必须选择一个最小密码强度(0 – 低,1 – 中,2 – 高)。你将无法输入任何不遵守所选规则的密码。如果你没有使用强密码的习惯(本应该使用),这可能会配上用场。如果你认为它可能有帮助,那你就键入 `y` 或者 `Y`,按下回车键,然后为你的密码选择一个强度等级和输入一个你想使用的密码。如果成功,你将继续强化过程;否则你将重新输入一个密码。
|
||||||
|
|
||||||
|
但是,如果你不想要此功能(我不会),只需按回车或任何其他键即可跳过使用它。
|
||||||
|
|
||||||
|
对于其他选项,我建议开启它们(对于每一步输入 `y` 或者 `Y` 和按下回车)。它们(依序)是:“<ruby>移除匿名用户<rt>remove anonymous user</rt></ruby>”,“<ruby>禁止 root 远程登录<rt>disallow root login remotely</rt></ruby>”,“<ruby>移除测试数据库及其访问<rt>remove test database and access to it</rt></ruby>”。“<ruby>重新载入权限表<rt>reload privilege tables now</rt></ruby>”。
|
||||||
|
|
||||||
|
#### 链接与断开 MySQL Server
|
||||||
|
|
||||||
|
为了运行 SQL 查询,你首先必须使用 MySQL 连到服务器并在 MySQL 提示符使用。
|
||||||
|
|
||||||
|
执行此操作的命令是:
|
||||||
|
|
||||||
|
```
|
||||||
|
mysql -h host_name -u user -p
|
||||||
|
```
|
||||||
|
|
||||||
|
* `-h` 用来指定一个主机名(如果这个服务被安装到其他机器上,那么会有用;如果没有,忽略它)
|
||||||
|
* `-u` 指定登录的用户
|
||||||
|
* `-p` 指定你想输入的密码.
|
||||||
|
|
||||||
|
虽然出于安全原因不建议,但是你可以在命令行最右边的 `-p` 后直接输入密码。例如,如果用户`test_user` 的密码是 `1234`,那么你可以在你使用的机器上尝试去连接,你可以这样使用:
|
||||||
|
|
||||||
|
```
|
||||||
|
mysql -u test_user -p1234
|
||||||
|
```
|
||||||
|
|
||||||
|
如果你成功输入了必要的参数,你将会收到由 MySQL shell 提示符提供的欢迎(`mysql >`):
|
||||||
|
|
||||||
|
![][14]
|
||||||
|
|
||||||
|
要从服务端断开连接和离开 MySQL 提示符,输入:
|
||||||
|
|
||||||
|
```
|
||||||
|
QUIT
|
||||||
|
```
|
||||||
|
|
||||||
|
输入 `quit` (MySQL 不区分大小写)或者 `\q` 也能工作。按下回车退出。
|
||||||
|
|
||||||
|
你使用简单的命令也能输出关于版本的信息:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo mysqladmin -u root version -p
|
||||||
|
```
|
||||||
|
|
||||||
|
如果你想看命令行选项列表,使用:
|
||||||
|
|
||||||
|
```
|
||||||
|
mysql --help
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 卸载 MySQL
|
||||||
|
|
||||||
|
如果您决定要使用较新版本或只是想停止使用 MySQL。
|
||||||
|
|
||||||
|
首先,关闭服务:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo systemctl stop mysql.service && sudo systemctl disable mysql.service
|
||||||
|
```
|
||||||
|
|
||||||
|
确保你备份了你的数据库,以防你之后想使用它们。你可以通过运行下列命令卸载 MySQL:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt purge mysql*
|
||||||
|
```
|
||||||
|
|
||||||
|
清理依赖:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt autoremove
|
||||||
|
```
|
||||||
|
|
||||||
|
### 小结
|
||||||
|
|
||||||
|
在这篇文章中,我已经介绍如何在 Ubuntu Linux 上安装 Mysql。我很高兴如果这篇文章能帮助到那些正为此挣扎的用户或者刚刚开始的用户。
|
||||||
|
|
||||||
|
如果你发现这篇文章是一个很有用的资源,在评论里告诉我们。你为了什么使用 MySQL? 我们渴望收到你的任何反馈、印象和建议。感谢阅读,并毫不犹豫地尝试这个很棒的工具!
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://itsfoss.com/install-mysql-ubuntu/
|
||||||
|
|
||||||
|
作者:[Sergiu][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[arrowfeng](https://github.com/arrowfeng)
|
||||||
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://itsfoss.com/author/sergiu/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://www.mysql.com/
|
||||||
|
[2]: https://en.wikipedia.org/wiki/LAMP_(software_bundle)
|
||||||
|
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/install-mysql-ubuntu.png?resize=800%2C450&ssl=1
|
||||||
|
[4]: https://dev.mysql.com/downloads/repo/apt/
|
||||||
|
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/04/mysql_apt_download_page.jpg?fit=800%2C280&ssl=1
|
||||||
|
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/04/mysql_deb_download_link.jpg?fit=800%2C507&ssl=1
|
||||||
|
[7]: https://linuxhandbook.com/curl-command-examples/
|
||||||
|
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/04/mysql_package_configuration_ok.jpg?fit=800%2C587&ssl=1
|
||||||
|
[9]: https://itsfoss.com/change-password-ubuntu/
|
||||||
|
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/mysql_enter_password.jpg?fit=800%2C583&ssl=1
|
||||||
|
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/04/mysql_information_on_configuring.jpg?fit=800%2C581&ssl=1
|
||||||
|
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/mysql_default_authentication_plugin.jpg?fit=800%2C586&ssl=1
|
||||||
|
[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/04/mysql_service_information.jpg?fit=800%2C402&ssl=1
|
||||||
|
[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/mysql_shell_prompt-2.jpg?fit=800%2C423&ssl=1
|
97
published/201904/20190417 Managing RAID arrays with mdadm.md
Normal file
97
published/201904/20190417 Managing RAID arrays with mdadm.md
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: (geekpi)
|
||||||
|
[#]: reviewer: (wxy)
|
||||||
|
[#]: publisher: (wxy)
|
||||||
|
[#]: url: (https://linux.cn/article-10785-1.html)
|
||||||
|
[#]: subject: (Managing RAID arrays with mdadm)
|
||||||
|
[#]: via: (https://fedoramagazine.org/managing-raid-arrays-with-mdadm/)
|
||||||
|
[#]: author: (Gregory Bartholomew https://fedoramagazine.org/author/glb/)
|
||||||
|
|
||||||
|
使用 mdadm 管理 RAID 阵列
|
||||||
|
======
|
||||||
|
|
||||||
|
![][1]
|
||||||
|
|
||||||
|
mdadm 是<ruby>多磁盘和设备管理<rt>Multiple Disk and Device Administration</rt></ruby> 的缩写。它是一个命令行工具,可用于管理 Linux 上的软件 [RAID][2] 阵列。本文概述了使用它的基础知识。
|
||||||
|
|
||||||
|
以下 5 个命令是你使用 mdadm 的基础功能:
|
||||||
|
|
||||||
|
1. **创建 RAID 阵列**:`mdadm --create /dev/md/test --homehost=any --metadata=1.0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1`
|
||||||
|
2. **组合(并启动)RAID 阵列**:`mdadm --assemble /dev/md/test /dev/sda1 /dev/sdb1`
|
||||||
|
3. **停止 RAID 阵列**:`mdadm --stop /dev/md/test`
|
||||||
|
4. **删除 RAID 阵列**:`mdadm --zero-superblock /dev/sda1 /dev/sdb1`
|
||||||
|
5. **检查所有已组合的 RAID 阵列的状态**:`cat /proc/mdstat`
|
||||||
|
|
||||||
|
### 功能说明
|
||||||
|
|
||||||
|
#### mdadm --create
|
||||||
|
|
||||||
|
上面的创建命令除了 `-create` 参数自身和设备名之外,还包括了四个参数:
|
||||||
|
|
||||||
|
1、`–homehost`:
|
||||||
|
|
||||||
|
默认情况下,`mdadm` 将你的计算机名保存为 RAID 阵列的属性。如果你的计算机名与存储的名称不匹配,则阵列将不会自动组合。此功能在共享硬盘的服务器群集中很有用,因为如果多个服务器同时尝试访问同一驱动器,通常会发生文件系统损坏。名称 `any` 是保留字段,并禁用 `-homehost` 限制。
|
||||||
|
|
||||||
|
2、 `–metadata`:
|
||||||
|
|
||||||
|
`-mdadm` 保留每个 RAID 设备的一小部分空间,以存储有关 RAID 阵列本身的信息。 `-metadata` 参数指定信息的格式和位置。`1.0` 表示使用版本 1 格式,并将元数据存储在设备的末尾。
|
||||||
|
|
||||||
|
3、`–level`:
|
||||||
|
|
||||||
|
`-level` 参数指定数据应如何在底层设备之间分布。级别 `1` 表示每个设备应包含所有数据的完整副本。此级别也称为[磁盘镜像] [3]。
|
||||||
|
|
||||||
|
4、`–raid-devices`:
|
||||||
|
|
||||||
|
`-raid-devices` 参数指定将用于创建 RAID 阵列的设备数。
|
||||||
|
|
||||||
|
通过将 `-level=1`(镜像)与 `-metadata=1.0` (将元数据存储在设备末尾)结合使用,可以创建一个 RAID1 阵列,如果不通过 mdadm 驱动访问,那么它的底层设备会正常显示。这在灾难恢复的情况下很有用,因为即使新系统不支持 mdadm 阵列,你也可以访问该设备。如果程序需要在 mdadm 可用之前以*只读*访问底层设备时也很有用。例如,计算机中的 [UEFI][4] 固件可能需要在启动 mdadm 之前从 [ESP][5] 读取引导加载程序。
|
||||||
|
|
||||||
|
#### mdadm --assemble
|
||||||
|
|
||||||
|
如果成员设备丢失或损坏,上面的组合命令将会失败。要强制 RAID 阵列在其中一个成员丢失时进行组合并启动,请使用以下命令:
|
||||||
|
|
||||||
|
```
|
||||||
|
# mdadm --assemble --run /dev/md/test /dev/sda1
|
||||||
|
```
|
||||||
|
|
||||||
|
### 其他重要说明
|
||||||
|
|
||||||
|
避免直接写入底层是 RAID1 的设备。这导致设备不同步,并且 mdadm 不会知道它们不同步。如果你访问了在其他地方被修改了设备的某个 RAID1 阵列,则可能导致文件系统损坏。如果你在其他地方修改 RAID1 设备并需要强制阵列重新同步,请从要覆盖的设备中删除 mdadm 元数据,然后将其重新添加到阵列,如下所示:
|
||||||
|
|
||||||
|
```
|
||||||
|
# mdadm --zero-superblock /dev/sdb1
|
||||||
|
# mdadm --assemble --run /dev/md/test /dev/sda1
|
||||||
|
# mdadm /dev/md/test --add /dev/sdb1
|
||||||
|
```
|
||||||
|
|
||||||
|
以上用 sda1 的内容完全覆盖 sdb1 的内容。
|
||||||
|
|
||||||
|
要指定在计算机启动时自动激活的 RAID 阵列,请创建 `/etc/mdadm.conf` 配置。
|
||||||
|
|
||||||
|
有关最新和详细信息,请查看手册页:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ man mdadm
|
||||||
|
$ man mdadm.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
本系列的下一篇文章将展示如何将现有的单磁盘 Linux 系统变为镜像磁盘安装,这意味着即使其中一个硬盘突然停止工作,系统仍将继续运行!
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://fedoramagazine.org/managing-raid-arrays-with-mdadm/
|
||||||
|
|
||||||
|
作者:[Gregory Bartholomew][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[geekpi](https://github.com/geekpi)
|
||||||
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://fedoramagazine.org/author/glb/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://fedoramagazine.org/wp-content/uploads/2019/04/mdadm-816x345.jpg
|
||||||
|
[2]: https://en.wikipedia.org/wiki/RAID
|
||||||
|
[3]: https://en.wikipedia.org/wiki/Disk_mirroring
|
||||||
|
[4]: https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface
|
||||||
|
[5]: https://en.wikipedia.org/wiki/EFI_system_partition
|
@ -0,0 +1,69 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: (arrowfeng)
|
||||||
|
[#]: reviewer: (wxy)
|
||||||
|
[#]: publisher: (wxy)
|
||||||
|
[#]: url: (https://linux.cn/article-10797-1.html)
|
||||||
|
[#]: subject: (Most data center workers happy with their jobs -- despite the heavy demands)
|
||||||
|
[#]: via: (https://www.networkworld.com/article/3389359/most-data-center-workers-happy-with-their-jobs-despite-the-heavy-demands.html#tk.rss_all)
|
||||||
|
[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/)
|
||||||
|
|
||||||
|
许多数据中心的工作者很满意他们的工作,将鼓励他们的孩子继续从事这份工作
|
||||||
|
======
|
||||||
|
|
||||||
|
> 一份 Informa Engage 和 Data Center Knowledge 的报告调查发现,在数据中心工作的人很满意他们的工作,因此他们将会鼓励他们的孩子从事这份工作。
|
||||||
|
|
||||||
|
![Thinkstock][1]
|
||||||
|
|
||||||
|
一份由 [Informa Engage 和 Data Center Knowledge][2] 主导的调查报告显示,数据中心的工作者总体上对他们的工作很满意。尽管对时间和大脑的要求很高,但是他们还是鼓励自己的孩子能从事这项工作。
|
||||||
|
|
||||||
|
总体满意度非常好,72% 的受访者普遍同意“我喜欢我目前的工作”这一说法,三分之一的受访者则表示非常同意。75% 的人同意声明,“如果我的孩子、侄女或侄子问,我将建议他们进入 IT 行业。”
|
||||||
|
|
||||||
|
在数据中心工作的员工之中,有一种很重要的感觉,88% 的人觉得他们自己对于雇主的成功非常重要。
|
||||||
|
|
||||||
|
尽管存在一些挑战,其中最主要的是技能和认证的缺乏。调查的受访者认为缺乏技能是最受关注的领域。只有 56% 的人认为他们需要完成工作所需的培训,74% 的人表示他们已经在 IT 行业工作了十多年。
|
||||||
|
|
||||||
|
这个行业提供认证计划,每个主要的 IT 硬件供应商都有,但是 61% 的人表示在过去的 12 个月里他们并没有完成或者重新续订证书。有几个原因:
|
||||||
|
|
||||||
|
三分之一(34%)说是由于他们工作的组织缺乏培训预算,而 24% 的人认为是缺乏时间,16% 的人表示管理者认为不需要培训,以及另外 16% 的人表示在他们的工作地点没有培训计划。
|
||||||
|
|
||||||
|
这并不让我感到惊讶,因为科技是世界上最开放的行业之一,在那里你可以找到培训和教育材料并自学。已经证实了[许多程序员是自学成才][4],包括行业巨头比尔·盖茨、史蒂夫·沃兹尼亚克、约翰·卡马克和杰克·多尔西。
|
||||||
|
|
||||||
|
### 数据中心工作者们的薪水
|
||||||
|
|
||||||
|
数据中心工作者不会抱怨酬劳。当然,大部分不会。50% 的人每年可以赚到 $100,000 甚至更多,然而 11% 的人赚的少于 $40,000。三分之二的受访者来自于美国,因此那些低端收入人士可能在国外。
|
||||||
|
|
||||||
|
有一个值得注意的差异。史蒂夫·布朗是伦敦数据中心人力资源的总经理,他说软件工程师获得的薪水比硬件工程师多。
|
||||||
|
|
||||||
|
布朗在这篇报道中说,“数据中心软件工程方面的工作可以与高收入的职业媲美,而在物理基础设施——机械/电气方面的工作——情况并非如此。它更像是中层管理。”
|
||||||
|
|
||||||
|
### 数据中心的专业人士仍然主要是男性
|
||||||
|
|
||||||
|
最不令人惊讶的发现?10 个受访者中有 9 个是男性。该行业正在调整解决性别歧视问题,但是现在没什么改变。
|
||||||
|
|
||||||
|
这篇报告的结论有一点不太好,但是我认为是错的:
|
||||||
|
|
||||||
|
> “随着数据中心基础设施完成云计算模式的过渡,软件进入到容器和微服务时代,数据中心剩下来的珍贵领导者——在 20 世纪获得技能的人——可能会发现没有任何他们了解的东西需要管理,也没有人需要他们领导。当危机最终来临时,我们可能会感到震惊,但是我们不能说我们没有受到警告。"
|
||||||
|
|
||||||
|
我说过了很多次,[数据中心不会消失][6]。
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://www.networkworld.com/article/3389359/most-data-center-workers-happy-with-their-jobs-despite-the-heavy-demands.html
|
||||||
|
|
||||||
|
作者:[Andy Patrizio][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[arrowfeng](https://github.com/arrowfeng)
|
||||||
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://www.networkworld.com/author/Andy-Patrizio/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://images.idgesg.net/images/article/2018/02/data_center_thinkstock_879720438-100749725-large.jpg
|
||||||
|
[2]: https://informa.tradepub.com/c/pubRD.mpl?sr=oc&_t=oc:&qf=w_dats04&ch=datacenterkids
|
||||||
|
[3]: https://www.networkworld.com/article/3276025/20-hot-jobs-ambitious-it-pros-should-shoot-for.html
|
||||||
|
[4]: https://www.networkworld.com/article/3046178/survey-finds-most-coders-are-self-taught.html
|
||||||
|
[5]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fupgrading-your-technology-career
|
||||||
|
[6]: https://www.networkworld.com/article/3289509/two-studies-show-the-data-center-is-thriving-instead-of-dying.html
|
||||||
|
[7]: https://www.facebook.com/NetworkWorld/
|
||||||
|
[8]: https://www.linkedin.com/company/network-world
|
@ -0,0 +1,105 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: (geekpi)
|
||||||
|
[#]: reviewer: (wxy)
|
||||||
|
[#]: publisher: (wxy)
|
||||||
|
[#]: url: (https://linux.cn/article-10795-1.html)
|
||||||
|
[#]: subject: (Ubuntu 19.04 ‘Disco Dingo’ Has Arrived: Downloads Available Now!)
|
||||||
|
[#]: via: (https://itsfoss.com/ubuntu-19-04-release/)
|
||||||
|
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||||
|
|
||||||
|
下载安装 Ubuntu 19.04 “Disco Dingo”
|
||||||
|
======
|
||||||
|
|
||||||
|
Ubuntu 19.04 “Disco Dingo” 已经发布,可以下载了。虽然我们已经知道 [Ubuntu 19.04 中的新功能][1] —— 我将在下面提到一些重要的地方,还会给出官方的下载链接。
|
||||||
|
|
||||||
|
### Ubuntu 19.04:你需要知道什么
|
||||||
|
|
||||||
|
以下是你应该了解的有关 Ubuntu 19.04 Disco Dingo 发布的一些内容。
|
||||||
|
|
||||||
|
#### Ubuntu 19.04 不是 LTS 版本
|
||||||
|
|
||||||
|
与 Ubuntu 18.04 LTS 不同,它不会[支持 10 年][2]。相反,非 LTS 的 19.04 将支持 **9 个月,直到 2020 年 1 月。**
|
||||||
|
|
||||||
|
因此,如果你有生产环境,我们可能不会立即建议你进行升级。例如,如果你有一台运行在 Ubuntu 18.04 LTS 上的服务器 —— 只是因为它是一个新的版本就将它升级到 19.04 可能不是一个好主意。
|
||||||
|
|
||||||
|
但是,对于希望在计算机上安装最新版本的用户,可以尝试一下。
|
||||||
|
|
||||||
|
![][3]
|
||||||
|
|
||||||
|
#### Ubuntu 19.04 对 NVIDIA GPU 用户是个不错的更新
|
||||||
|
|
||||||
|
Martin Wimpress(来自 Canonical)在 Ubuntu MATE 19.04(Ubuntu 版本之一)的 [GitHub][4] 的最终发布说明中提到 Ubuntu 19.04 对 NVIDIA GPU 用户来说特别重要。
|
||||||
|
|
||||||
|
换句话说,在安装专有图形驱动时 —— 它现在会选择与你特定 GPU 型号兼容最佳的驱动程序。
|
||||||
|
|
||||||
|
#### Ubuntu 19.04 功能
|
||||||
|
|
||||||
|
- https://youtu.be/sbbPYdpdMb8
|
||||||
|
|
||||||
|
尽管我们已经讨论过 [Ubuntu 19.04][1] Disco Dingo 的[最佳功能][1],但值得一提的是,我对本次发布的主要变化:桌面更新 (GNOME 3.32) 和 Linux 内核 (5.0)感到兴奋。
|
||||||
|
|
||||||
|
#### 从 Ubuntu 18.10 升级到 19.04
|
||||||
|
|
||||||
|
显而易见,如果你安装了 Ubuntu 18.10,你应该升级它。18.10 将于 2019 年 7 月停止支持 —— 所以我们建议你将其升级到 19.04。
|
||||||
|
|
||||||
|
要做到这一点,你可以直接进入“软件和更新”设置,然后选择“更新”选项卡。
|
||||||
|
|
||||||
|
现在将选项从“通知我新的 Ubuntu 版本” 变成 “任何新版本都通知我”。
|
||||||
|
|
||||||
|
现在再次运行更新管理器时,你应该会看到 Ubuntu 19.04。
|
||||||
|
|
||||||
|
![][5]
|
||||||
|
|
||||||
|
#### 从 Ubuntu 18.04 升级到 19.04
|
||||||
|
|
||||||
|
建议不要直接从 18.04 升级到 19.04,因为你需要先将操作系统更新到 18.10,然后再继续升级到 19.04。
|
||||||
|
|
||||||
|
相反,你只需下载 Ubuntu 19.04 的官方 ISO 映像,然后在你的系统上重新安装 Ubuntu。
|
||||||
|
|
||||||
|
### Ubuntu 19.04:所有版本都可下载
|
||||||
|
|
||||||
|
根据[发行说明][6],现在可以下载 Ubuntu 19.04。你可以在其官方发布下载页面上获取种子或 ISO 文件。
|
||||||
|
|
||||||
|
- [下载 Ubuntu 19.04][7]
|
||||||
|
|
||||||
|
如果你需要不同的桌面环境或需要特定的东西,你应该查看 Ubuntu 的官方版本:
|
||||||
|
|
||||||
|
* [Ubuntu MATE][8]
|
||||||
|
* [Kubuntu][9]
|
||||||
|
* [Lubuntu][10]
|
||||||
|
* [Ubuntu Budgie][11]
|
||||||
|
* [Ubuntu Studio][12]
|
||||||
|
* [Xubuntu][13]
|
||||||
|
|
||||||
|
上面提到的一些 Ubuntu 版本还没有在页面提供 19.04。但你可以[仍然在 Ubuntu 的发行说明网页上找到 ISO][6]。就个人而言,我使用带 GNOME 桌面的 Ubuntu。你可以选择你喜欢的。
|
||||||
|
|
||||||
|
### 总结
|
||||||
|
|
||||||
|
你如何看待 Ubuntu 19.04 Disco Dingo?这些新功能是否足够令人兴奋?你试过了吗?请在下面的评论中告诉我们。
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://itsfoss.com/ubuntu-19-04-release/
|
||||||
|
|
||||||
|
作者:[Ankush Das][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[geekpi](https://github.com/geekpi)
|
||||||
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://itsfoss.com/author/ankush/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://itsfoss.com/ubuntu-19-04-release-features/
|
||||||
|
[2]: https://itsfoss.com/ubuntu-18-04-ten-year-support/
|
||||||
|
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/11/ubuntu-19-04-Disco-Dingo-default-wallpaper.jpg?resize=800%2C450&ssl=1
|
||||||
|
[4]: https://github.com/ubuntu-mate/ubuntu-mate.org/blob/master/blog/20190418-ubuntu-mate-disco-final-release.md
|
||||||
|
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/04/ubuntu-19-04-upgrade-available.jpg?ssl=1
|
||||||
|
[6]: https://wiki.ubuntu.com/DiscoDingo/ReleaseNotes
|
||||||
|
[7]: https://www.ubuntu.com/download/desktop
|
||||||
|
[8]: https://ubuntu-mate.org/download/
|
||||||
|
[9]: https://kubuntu.org/getkubuntu/
|
||||||
|
[10]: https://lubuntu.me/cosmic-released/
|
||||||
|
[11]: https://ubuntubudgie.org/downloads
|
||||||
|
[12]: https://ubuntustudio.org/2019/04/ubuntu-studio-19-04-released/
|
||||||
|
[13]: https://xubuntu.org/download/
|
@ -0,0 +1,105 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: (geekpi)
|
||||||
|
[#]: reviewer: (wxy)
|
||||||
|
[#]: publisher: (wxy)
|
||||||
|
[#]: url: (https://linux.cn/article-10787-1.html)
|
||||||
|
[#]: subject: (4 cool new projects to try in COPR for April 2019)
|
||||||
|
[#]: via: (https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-for-april-2019/)
|
||||||
|
[#]: author: (Dominik Turecek https://fedoramagazine.org/author/dturecek/)
|
||||||
|
|
||||||
|
COPR 仓库中 4 个很酷的新软件(2019.4)
|
||||||
|
======
|
||||||
|
|
||||||
|
![][1]
|
||||||
|
|
||||||
|
COPR 是个人软件仓库[集合][1],它不在 Fedora 中。这是因为某些软件不符合轻松打包的标准。或者它可能不符合其他 Fedora 标准,尽管它是自由而开源的。COPR 可以在 Fedora 套件之外提供这些项目。COPR 中的软件不受 Fedora 基础设施的支持,或者是由项目自己背书的。但是,这是一种尝试新的或实验性的软件的一种巧妙的方式。
|
||||||
|
|
||||||
|
这是 COPR 中一组新的有趣项目。
|
||||||
|
|
||||||
|
### Joplin
|
||||||
|
|
||||||
|
[Joplin][3] 是一个笔记和待办事项应用。笔记以 Markdown 格式编写,并通过使用标签和将它们分类到各种笔记本中进行组织。Joplin 可以从任何 Markdown 源导入笔记或从 Evernote 导出笔记。除了桌面应用之外,还有一个 Android 版本,通过使用 Nextcloud、Dropbox 或其他云服务同步笔记。最后,它还有 Chrome 和 Firefox 的浏览器扩展程序,用于保存网页和屏幕截图。
|
||||||
|
|
||||||
|
![][4]
|
||||||
|
|
||||||
|
#### 安装说明
|
||||||
|
|
||||||
|
[COPR 仓库][5]目前为 Fedora 29 和 30 以及 EPEL 7 提供 Joplin。要安装 Joplin,请[带上 sudo][6] 使用这些命令:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo dnf copr enable taw/joplin
|
||||||
|
sudo dnf install joplin
|
||||||
|
```
|
||||||
|
|
||||||
|
### Fzy
|
||||||
|
|
||||||
|
[Fzy][7] 是用于模糊字符串搜索的命令行程序。它从标准输入读取并根据最有可能的搜索结果进行排序,然后打印所选行。除了命令行,`fzy` 也可以在 vim 中使用。你可以在这个在线 [demo][8] 中尝试 `fzy`。
|
||||||
|
|
||||||
|
#### 安装说明
|
||||||
|
|
||||||
|
[COPR 仓库][9]目前为 Fedora 29、30 和 Rawhide 以及其他发行版提供了 `fzy`。要安装 `fzy`,请使用以下命令:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo dnf copr enable lehrenfried/fzy
|
||||||
|
sudo dnf install fzy
|
||||||
|
```
|
||||||
|
|
||||||
|
### Fondo
|
||||||
|
|
||||||
|
Fondo 是一个浏览 [unsplash.com][10] 网站照片的程序。它有一个简单的界面,允许你一次查找某个主题或所有主题的图片。然后,你可以通过单击将找到的图片设置为壁纸,或者共享它。
|
||||||
|
|
||||||
|
![][11]
|
||||||
|
|
||||||
|
#### 安装说明
|
||||||
|
|
||||||
|
[COPR 仓库][12]目前为 Fedora 29、30 和 Rawhide 提供 Fondo。要安装 Fondo,请使用以下命令:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo dnf copr enable atim/fondo
|
||||||
|
sudo dnf install fondo
|
||||||
|
```
|
||||||
|
|
||||||
|
### YACReader
|
||||||
|
|
||||||
|
[YACReader][13] 是一款数字漫画阅读器,它支持许多漫画和图像格式,例如 cbz、cbr、pdf 等。YACReader 会跟踪阅读进度,并可以从 [Comic Vine][14] 下载漫画信息。它还有一个 YACReader 库,用于组织和浏览你的漫画集。
|
||||||
|
|
||||||
|
![][15]
|
||||||
|
|
||||||
|
#### 安装说明
|
||||||
|
|
||||||
|
[COPR 仓库][16]目前为 Fedora 29、30 和 Rawhide 提供 YACReader。要安装 YACReader,请使用以下命令:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo dnf copr enable atim/yacreader
|
||||||
|
sudo dnf install yacreader
|
||||||
|
```
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-for-april-2019/
|
||||||
|
|
||||||
|
作者:[Dominik Turecek][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[geekpi](https://github.com/geekpi)
|
||||||
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://fedoramagazine.org/author/dturecek/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://fedoramagazine.org/wp-content/uploads/2017/08/4-copr-945x400.jpg
|
||||||
|
[2]: https://copr.fedorainfracloud.org/
|
||||||
|
[3]: https://joplin.cozic.net/
|
||||||
|
[4]: https://fedoramagazine.org/wp-content/uploads/2019/04/joplin.png
|
||||||
|
[5]: https://copr.fedorainfracloud.org/coprs/taw/joplin/
|
||||||
|
[6]: https://fedoramagazine.org/howto-use-sudo/
|
||||||
|
[7]: https://github.com/jhawthorn/fzy
|
||||||
|
[8]: https://jhawthorn.github.io/fzy-demo/
|
||||||
|
[9]: https://copr.fedorainfracloud.org/coprs/lehrenfried/fzy/
|
||||||
|
[10]: https://unsplash.com/
|
||||||
|
[11]: https://fedoramagazine.org/wp-content/uploads/2019/04/fondo.png
|
||||||
|
[12]: https://copr.fedorainfracloud.org/coprs/atim/fondo/
|
||||||
|
[13]: https://www.yacreader.com/
|
||||||
|
[14]: https://comicvine.gamespot.com/
|
||||||
|
[15]: https://fedoramagazine.org/wp-content/uploads/2019/04/yacreader.png
|
||||||
|
[16]: https://copr.fedorainfracloud.org/coprs/atim/yacreader/
|
@ -0,0 +1,147 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: (warmfrog)
|
||||||
|
[#]: reviewer: (wxy)
|
||||||
|
[#]: publisher: (wxy)
|
||||||
|
[#]: url: (https://linux.cn/article-10790-1.html)
|
||||||
|
[#]: subject: (New Features Coming to Debian 10 Buster Release)
|
||||||
|
[#]: via: (https://itsfoss.com/new-features-coming-to-debian-10-buster-release/)
|
||||||
|
[#]: author: (Shirish https://itsfoss.com/author/shirish/)
|
||||||
|
|
||||||
|
即将到来的 Debian 10 Buster 发布版的新特点
|
||||||
|
=======================================
|
||||||
|
|
||||||
|
Debian 10 Buster 即将发布。第一个发布候选版已经发布,我们预期可以在几周内见到待最终版。
|
||||||
|
|
||||||
|
如果你期待对这个新的主要发布版本,让我告诉你里面有什么。
|
||||||
|
|
||||||
|
### Debian 10 Buster 发布计划
|
||||||
|
|
||||||
|
[Debian 10 Buster][1] 的发布日期并没有确定。为什么这样呢?不像其他分发版,[Debian][2] 并不基于时间发布。相反地它主要关注于修复<ruby>发布版重要 Bug<rt>release-critical bug</rt></ruby>。发布版重要 Bug 要么是严重的安全问题([CVE][3]),要么是一些其他阻止 Debian 发布的严重问题。
|
||||||
|
|
||||||
|
Debian 在它的软件归档中分为三个部分,叫做 Main、contrib 和 non-free。在这三者之中,Debian 开发者和发布管理者最关心的包组成了该分发版的基石。Main 是像石头一样稳定的。因此他们要确保那里没有主要的功能或者安全问题。他们同样给予了不同的优先级,例如 Essential、Required、Important、Standard、Optional 和 Extra。更多关于此方面的知识参考后续的 Debian 文章。
|
||||||
|
|
||||||
|
这是必要的,因为 Debian 在很多环境中被用作服务器,人们已经变得依赖 Debian。他们同样看重升级周期是否有破环,因此他们寻找人们来测试,来查看当升级的时候是否有破坏并通知 Debian 有这样的问题。
|
||||||
|
|
||||||
|
这种提交方式带来的稳定性[是我喜欢 Debian 的众多原因之一][4]。
|
||||||
|
|
||||||
|
### Debian 10 Buster 版本的新内容
|
||||||
|
|
||||||
|
这里是即将到来的 Debian 主要发布版的一些视觉上和内部的改变。
|
||||||
|
|
||||||
|
#### 新的主题和壁纸
|
||||||
|
|
||||||
|
Buster 的 Debian 主题被称为 [FuturePrototype][5] 并且看起来如下图:
|
||||||
|
|
||||||
|
![Debian Buster FuturePrototype Theme][6]
|
||||||
|
|
||||||
|
#### 1、GNOME 桌面 3.30
|
||||||
|
|
||||||
|
Debian Stretch 版中的 GNOME 桌面在 Buster 中从 1.3.22 升级到了 1.3.30。在 GNOME 桌面发布版中新包含的一些包是 gnome-todo、tracker 替代了 tracker-gui、gstreamer1.0-packagekit 的依赖,因此可以通过自动地安装编码解码器来做播放电影之类的事。对于所有包来说一个大的改变是从 libgtk2+ 到 libgtk3+。
|
||||||
|
|
||||||
|
#### 2、Linux 内核 4.19.0-4
|
||||||
|
|
||||||
|
Debian 使用 LTS 内核版本,因此你可以期待更好的硬件支持和长达 5 年的维护和支持周期。我们已经从内核 4.9.0.3 到 4.19.0-4。
|
||||||
|
|
||||||
|
```
|
||||||
|
$ uname -r
|
||||||
|
4.19.0-4-amd64
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 3、OpenJDK 11.0
|
||||||
|
|
||||||
|
Debian 在很长时间里都是 OpenJDK 8.0。现在在 Debian Buster 里我们已经升级为 OpenJDK 11.0,并且会有一个团队维护新的版本。
|
||||||
|
|
||||||
|
#### 4、默认启用 AppArmor
|
||||||
|
|
||||||
|
在 Debian Buster 中是默认启用 [AppArmor][7] 的。这是一个好事,谨慎是系统管理员必须采取的正确策略。这仅仅是第一步,并且可能需要修复很多对用户觉得有用的脚本。
|
||||||
|
|
||||||
|
#### 5、Nodejs 10.15.2
|
||||||
|
|
||||||
|
在很长一段时间里 Debian 在仓库中都只有 Nodejs 4.8。在这个周期里 Debian 已经移到 Nodejs 10.15.2。事实上,Debian Buster 有很多 javascript 库例如 yarnpkg (一个 nmp 的替代品)等等。
|
||||||
|
|
||||||
|
当然,你可以从该项目仓库[在 Debian 中安装最新的 Nodejs][8],但是从 Debian 仓库中看到更新的版本是很棒的。
|
||||||
|
|
||||||
|
#### 6、NFtables 替代了 iptables
|
||||||
|
|
||||||
|
Debian Buster 提供了 nftables 来完整地替代了 iptables,因为它有更好、更简单的语法,更好的支持双栈 ipv4/v6 防火墙等等。
|
||||||
|
|
||||||
|
#### 7、支持更多的 ARM 64 和 ARMHF 的单板机。
|
||||||
|
|
||||||
|
Debian 已经支持一些常见的新的单板机,其中最新的包括 pine64_plus、ARM64 的 pinebook、Firefly-RK3288、ARMHF 64 的 u-boot-rockchip 以及 Odroid HC1/HC2 板、SolidRun Cubox-i 双核/四核(1.5som)和 SolidRun Cubox-i 双核/四核(1.5som+emmc)板、Cubietruckplus 等。同样支持 Rock 64、Banana Pi M2 Berry、Pine A64 LTS Board、Olimex A64 Teres-1 与 Rapberry Pi 1、Zero 和 Pi 3。对于 RISC-V 系统同样支持开箱即用。
|
||||||
|
|
||||||
|
#### 8、Python 2 已死,Python 3 长存
|
||||||
|
|
||||||
|
在 2020 年 1 月 1 日,Python 2 将被 python.org 废弃。在 Debian 将所有的软件包从 Python 2.7 移到 Python 3 以后,Python 2.7 将从软件仓库中移除。这可能发生在 Buster 发布版或者将来的某个发布版,这是肯定要来临的。因此 Python 开发者被鼓励移植他们的代码库来兼容 Python 3。在写本文的时候,在 Debian Buster 中同时支持 python2 和 pythone3。
|
||||||
|
|
||||||
|
#### 9、Mailman 3
|
||||||
|
|
||||||
|
在 Debian 中终于可以使用 Mailman3 了。同时 [Mailman][10] 已经被细分成为组件。要安装整个软件栈,可以安装 mailman3-full 来获取所有组件。
|
||||||
|
|
||||||
|
#### 10、任意已有的 Postgresql 数据库将需要重新索引
|
||||||
|
|
||||||
|
由于 glibc 本地数据的更新,放入文本索引中的信息排序的方式将会改变,因为重新索引是有益的,这样在将来就不会有数据破坏发生。
|
||||||
|
|
||||||
|
#### 11、默认 Bash 5.0
|
||||||
|
|
||||||
|
你可能已经了解了 [Bash 5.0 的新特点][11],在 Debian 中已经是该版本了。
|
||||||
|
|
||||||
|
#### 12、Debian 实现 /usr/merge
|
||||||
|
|
||||||
|
我们已经分享过一个优秀的 freedesktop [读物][12],介绍了 `/usr/merge` 带来了什么。有一些事项需要注意。当 Debian 想要整个过渡时,可能由于未预见的情况,一些二进制文件可能并没有做这些改变。需要指出的一点是,`/var` 和 `/etc` 不会被触及,因此使用容器或者云技术的不需要考虑太多 :)。
|
||||||
|
|
||||||
|
#### 13、支持安全启动
|
||||||
|
|
||||||
|
在 Buster RC1 中,Debian 现在支持<ruby>安全启动<rt>secure-boot</rt></ruby>。这意味着打开了安全启动设置的机器应该能够轻松安装 Debian。不再需要禁止或者处理安全启动的事 :)
|
||||||
|
|
||||||
|
#### 14、Debian-Live 镜像的 Calameres Live-installer
|
||||||
|
|
||||||
|
对于 Debian Buster 的 Live 版,Debian 引入了 [Calameres 安装器][13]来替代老的 Debian-installer。Debian-installer 比 Calameres 功能更多,但对于初学者,Calameres 相对于 Debian-installer 提供了另外一种全新的安装方式。安装过程的截图:
|
||||||
|
|
||||||
|
![Calamares Partitioning Stage][14]
|
||||||
|
|
||||||
|
如图所见,在 Calamares 下安装 Debian 相当简单,只要经历 5 个步骤你就能在你的机器上安装 Debian。
|
||||||
|
|
||||||
|
### 下载 Debian 10 Live 镜像 (只用于测试)
|
||||||
|
|
||||||
|
现在还不要将它用于生产机器。可以在测试机上尝试或者一个虚拟机。
|
||||||
|
|
||||||
|
你可以从 Debian Live [目录][15]获取 Debian 64 位和 32 位的镜像。如果你想要 64 位的就进入 `64-bit` 目录,如果你想要 32 位的,就进入 `32-bit` 目录。
|
||||||
|
|
||||||
|
- [下载 Debian 10 Buster Live Images][15]
|
||||||
|
|
||||||
|
如果你从已存在的稳定版升级并且出现了一些问题,查看它是否在预安装的[升级报告][16]中提及了,使用 [reportbug][17] 报告你看到的问题。如果 bug 没有被报告,那么请尽可能地报告和分享更多地信息。
|
||||||
|
|
||||||
|
### 总结
|
||||||
|
|
||||||
|
当上千个包被升级时,看起来不可能一一列出。我已经列出了一些你在 Debian Buster 可以找到的一些主要的改变。你怎么看呢?
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://itsfoss.com/new-features-coming-to-debian-10-buster-release/
|
||||||
|
|
||||||
|
作者:[Shirish][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[warmfrog](https://github.com/warmfrog)
|
||||||
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://itsfoss.com/author/shirish/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://wiki.debian.org/DebianBuster
|
||||||
|
[2]: https://www.debian.org/
|
||||||
|
[3]: https://en.wikipedia.org/wiki/Common_Vulnerabilities_and_Exposures
|
||||||
|
[4]: https://itsfoss.com/reasons-why-i-love-debian/
|
||||||
|
[5]: https://wiki.debian.org/DebianArt/Themes/futurePrototype
|
||||||
|
[6]: https://itsfoss.com/wp-content/uploads/2019/04/debian-buster-theme-800x450.png
|
||||||
|
[7]: https://wiki.debian.org/AppArmor
|
||||||
|
[8]: https://itsfoss.com/install-nodejs-ubuntu/
|
||||||
|
[9]: https://www.python.org/dev/peps/pep-0373/
|
||||||
|
[10]: https://www.list.org/
|
||||||
|
[11]: https://itsfoss.com/bash-5-release/
|
||||||
|
[12]: https://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/
|
||||||
|
[13]: https://calamares.io/about/
|
||||||
|
[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/04/calamares-partitioning-wizard.jpg?fit=800%2C538&ssl=1
|
||||||
|
[15]: https://cdimage.debian.org/cdimage/weekly-live-builds/
|
||||||
|
[16]: https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=upgrade-reports;dist=unstable
|
||||||
|
[17]: https://itsfoss.com/bug-report-debian/
|
@ -0,0 +1,87 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: (MjSeven)
|
||||||
|
[#]: reviewer: (wxy)
|
||||||
|
[#]: publisher: (wxy)
|
||||||
|
[#]: url: (https://linux.cn/article-10809-1.html)
|
||||||
|
[#]: subject: (Command line quick tips: Cutting content out of files)
|
||||||
|
[#]: via: (https://fedoramagazine.org/command-line-quick-tips-cutting-content-out-of-files/)
|
||||||
|
[#]: author: (Stephen Snow https://fedoramagazine.org/author/jakfrost/)
|
||||||
|
|
||||||
|
命令行技巧:分割文件内容
|
||||||
|
======
|
||||||
|
|
||||||
|
![][1]
|
||||||
|
|
||||||
|
Fedora 发行版是一个功能齐全的操作系统,有出色的图形化桌面环境。用户可以很容易地通过单击动作来完成任何典型任务。所有这些美妙的易用性掩盖了其底层强大的命令行细节。本文是向你展示一些常见命令行实用程序的系列文章的一部分。让我们进入 shell 来看看 `cut`。
|
||||||
|
|
||||||
|
通常,当你在命令行中工作时,你处理的是文本文件。有时这些文件可能很长,虽然可以完整地阅读它们,但是可能会耗费大量时间,并且容易出错。在本文中,你将学习如何从文本文件中提取内容,并从中获取你所需的信息。
|
||||||
|
|
||||||
|
重要的是要意识到,在 Fedora 中有许多方法可以完成类似的命令行任务。例如,Fedora 仓库含有用于解析和处理文本的完整语言系统。此外,还有多个命令行实用程序可用于 shell 中任何可能的用途。本文只关注使用其中几个实用程序选项,从文件中提取一些信息并以可读的格式呈现。
|
||||||
|
|
||||||
|
### cut 使用
|
||||||
|
|
||||||
|
为了演示这个例子,在系统上使用一个标准的大文件,如 `/etc/passwd`。正如本系列的前一篇文章所示,你可以执行 `cat` 命令来查看整个文件:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cat /etc/passwd
|
||||||
|
root:x:0:0:root:/root:/bin/bash
|
||||||
|
bin:x:1:1:bin:/bin:/sbin/nologin
|
||||||
|
daemon:x:2:2:daemon:/sbin:/sbin/nologin
|
||||||
|
adm:x:3:4:adm:/var/adm:/sbin/nologin
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
此文件包含系统上所有所有账户的信息。它有一个特定的格式:
|
||||||
|
|
||||||
|
```
|
||||||
|
name:password:user-id:group-id:comment:home-directory:shell
|
||||||
|
```
|
||||||
|
|
||||||
|
假设你只想要系统上所有账户名的列表,如果你只能从每一行中删除 “name” 值。这就是 `cut` 命令派上用场的地方!它一次处理一行输入,并提取该行的特定部分。
|
||||||
|
|
||||||
|
`cut` 命令提供了以不同方式选择一行的部分的选项,在本示例中需要两个,`-d` 和 `-f`。`-d` 选项允许你声明用于分隔行中值的分隔符。在本例中,冒号(`:`)用于分隔值。`-f` 选项允许你选择要提取哪些字段值。因此,在本例中,输入的命令是:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cut -d: -f1 /etc/passwd
|
||||||
|
root
|
||||||
|
bin
|
||||||
|
daemon
|
||||||
|
adm
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
太棒了,成功了!但是你将输出打印到标准输出,在终端会话中意味着它需要占据屏幕。如果你需要稍后完成另一项任务所需的信息,这该怎么办?如果有办法将 `cut` 命令的输出保存到文本文件中,那就太好了。对于这样的任务,shell 有一个简单的内置功能,重定向功能(`>`)。
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cut -d: -f1 /etc/passwd > names.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
这会将 `cut` 的输出放到一个名为 `names.txt` 的文件中,你可以使用 `cat` 来查看它的内容:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cat names.txt
|
||||||
|
root
|
||||||
|
bin
|
||||||
|
daemon
|
||||||
|
adm
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
使用两个命令和一个 shell 功能,可以很容易地使用 `cat` 从一个文件进行识别、提取和重定向一些信息,并将其保存到另一个文件以供以后使用。
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://fedoramagazine.org/command-line-quick-tips-cutting-content-out-of-files/
|
||||||
|
|
||||||
|
作者:[Stephen Snow][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[MjSeven](https://github.com/MjSeven)
|
||||||
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://fedoramagazine.org/author/jakfrost/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://fedoramagazine.org/wp-content/uploads/2019/04/commandline-cutting-816x345.jpg
|
||||||
|
[2]: https://unsplash.com/photos/tA5eSY_hay8?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
||||||
|
[3]: https://unsplash.com/search/photos/command-line?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
@ -0,0 +1,82 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: (warmfrog)
|
||||||
|
[#]: reviewer: (wxy)
|
||||||
|
[#]: publisher: (wxy)
|
||||||
|
[#]: url: (https://linux.cn/article-10808-1.html)
|
||||||
|
[#]: subject: (This is how System76 does open hardware)
|
||||||
|
[#]: via: (https://opensource.com/article/19/4/system76-hardware)
|
||||||
|
[#]: author: (Don Watkins https://opensource.com/users/don-watkins)
|
||||||
|
|
||||||
|
System76 是如何打造开源硬件的
|
||||||
|
================================
|
||||||
|
|
||||||
|
> 是什么让新的 Thelio 台式机系列与众不同。
|
||||||
|
|
||||||
|
![在计算机上显示度量和数据][1]
|
||||||
|
|
||||||
|
大多数人对他们电脑的硬件一无所知。作为一个长期的 Linux 用户,当我想让我的无线网卡、视频卡、显示器和其他硬件与我选择的发行版共同运行时,也一样遇到了挫折。商业品牌的硬件通常使判断这些问题变得很困难:为什么以太网驱动、无线驱动或者鼠标驱动和我们预期的不太一样?随着 Linux 发行版变得成熟,这可能不再是问题,但是我们仍能发现触控板和其它外部设备的怪异行为,尤其是当我们对底层的硬件知道的不多时。
|
||||||
|
|
||||||
|
像 [System76][2] 这样的公司致力于解决这些问题,以提升 Linux 用户体验。System76 生产了一系列的 Linux 笔记本、台式机和服务器,甚至提供了它自己的 Linux 发行版 [Pop! OS][3] 作为客户的一个选择。最近我有幸参观了 System76 在 Devnver 的工厂并揭开它的新台式机产品线 [Thelio][5] [的神秘面纱][5]。
|
||||||
|
|
||||||
|
### 关于 Thelio
|
||||||
|
|
||||||
|
System76 宣称 Thelio 的开源硬件子板(被命名为木星之后的第 5 个卫星的名字 Thelio Io)是它在市场上独特的特点之一。Thelio Io 取得了开源硬件协会的认证 [OSHWA #us000145][6],并且有 4 个用于存储的 SATA 端口和一个控制风扇和用于电源按钮控制的嵌入式控制器。Thelio IO SAS 取得了 [OSHWA #us000146][7] 认证,并且有 4 个用于存储的 U.2 端口,没有嵌入式控制器。在展示时,System76 显示了这些组件如何调整风扇通过底盘来优化部件的性能。
|
||||||
|
|
||||||
|
该控制器还管理电源键,和围绕该电源键的 LED 光环,当被按下时它以 100% 的亮度发光。这提供了触觉和视觉上的确认:该主机已经启动电源了。当电脑在使用中,该按钮被设置为 35% 的亮度,当在睡眠模式,它的亮度在 2.35% 和 25% 之间跳动。当计算机关闭后,LED 保持朦胧的亮度,因此能够在黑暗的房间里找到电源控制。
|
||||||
|
|
||||||
|
Thelio 的嵌入式控制器是一个低功耗的 [ATmega32U4][8] 微控制器,并且控制器的设置可以使用 Arduino Micro 进行原型设计。Thelio Io 主板变化的多少取决于你购买哪种 Thelio 型号。
|
||||||
|
|
||||||
|
Thelio 可能是我见过的设计的最好的电脑机箱和系统。如果你曾经亲身体验过在一个常规的 PC 的内部进行操作的话,你可能会同意我的观点。我已经做了很多次了,因此我能以自己过往的糟糕经历来证明这点。
|
||||||
|
|
||||||
|
### 为什么做开源硬件?
|
||||||
|
|
||||||
|
该主板是在 [KiCAD][9] 设计的,你可以在 [GitHub][10] 上按 GPL 许可证访问 Thelio 所有的设计文件。因此,为什么一个与其他 PC 制造商竞争的公司会设计一个独特的接口并公开授权呢?可能是该公司认识到开源设计及根据你的需要调整和分享一个 I/O 主板设计的能力的价值,即便你是市场上的竞争者。
|
||||||
|
|
||||||
|
![在 Thelio 启动时 Don Watkins 与 System76 的 CEO Carl Richell 谈话][11]
|
||||||
|
|
||||||
|
*在 [Thelio 发布会][12] Don Watkins 与 System76 的 CEO Carl Richell 谈话。*
|
||||||
|
|
||||||
|
我问 System76 的设计者和 CEO [Carl Richell][13],该公司是否担心过公开许可它的硬件设计意味着有人可以采取它的独特设计并用它来将 System76 驱逐出市场。他说:
|
||||||
|
|
||||||
|
> 开源硬件对我们所有人都有益。这是我们未来提升技术的方式,并且使得每个人获取技术更容易。我们欢迎任何想要提高 Thelio 设计的人来这么做。开源该硬件不仅可以帮助我们更快的改进我们的电脑,并且能够使我们的消费者 100% 信任他们的设备。我们的目标是尽可能地移除专利功能,同时仍然能够为消费者提供一个有竞争力的 Linux 主机。
|
||||||
|
>
|
||||||
|
> 我们已经与 Linux 社区一起合作了 13 年之久,来为我们的笔记本、台式机、服务器创造一个完美顺滑的体验。我们长期专注于为 Linux 社区提供服务,提供给我们的客户高水准的服务,我们的个性使 System76 变得独特。
|
||||||
|
|
||||||
|
我还问 Carl 为什么开源硬件对 System76 和 PC 市场是有意义的。他回复道:
|
||||||
|
|
||||||
|
> System76 创立之初的想法是技术应该对每个人是开放和可获取的。我们还没有到达 100% 开源创造一个电脑的程度,但是有了开源硬件,我们迈出了接近目标的必不可少的一大步。
|
||||||
|
>
|
||||||
|
> 我们生活在技术变成工具的时代。计算机在各级教育和很多行业当中是人们的工具。由于每个人特定的需要,每个人对于如何提升电脑和软件作为他们的主要工具有他们自己的想法。开源我们的计算机可以让这些想法成为现实,从而反过来促进技术成为一个更强大的工具。在一个开源环境中,我们持续迭代来生产更好的 PC。这有点酷。
|
||||||
|
|
||||||
|
我们总结了我们讨论的关于 System76 技术路线的对话,包含了开源硬件 mini PC,甚至是笔记本。在 System76 品牌下的已售出的 mini PC 和笔记本是由其他供应商制造的,并不是基于开源硬件的(尽管它们用的是 Linux 软件,是开源的)。
|
||||||
|
|
||||||
|
设计和支持开放式硬件是 PC 产业中的变革者,也正是它造就了 System76 的新 Thelio 台式机电脑产品线的不同。
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://opensource.com/article/19/4/system76-hardware
|
||||||
|
|
||||||
|
作者:[Don Watkins][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[warmfrog](https://github.com/warmfrog)
|
||||||
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://opensource.com/users/don-watkins
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_data_dashboard_system_computer_analytics.png?itok=oxAeIEI- (metrics and data shown on a computer screen)
|
||||||
|
[2]: https://system76.com/
|
||||||
|
[3]: https://opensource.com/article/18/1/behind-scenes-popos-linux
|
||||||
|
[4]: /article/18/11/system76-thelio-desktop-computer
|
||||||
|
[5]: https://system76.com/desktops
|
||||||
|
[6]: https://certification.oshwa.org/us000145.html
|
||||||
|
[7]: https://certification.oshwa.org/us000146.html
|
||||||
|
[8]: https://www.microchip.com/wwwproducts/ATmega32u4
|
||||||
|
[9]: http://kicad-pcb.org/
|
||||||
|
[10]: https://github.com/system76/thelio-io
|
||||||
|
[11]: https://opensource.com/sites/default/files/uploads/don_system76_ceo.jpg (Don Watkins speaks with System76 CEO Carl Richell at the Thelio launch event.)
|
||||||
|
[12]: https://trevgstudios.smugmug.com/System76/121418-Thelio-Press-Event/i-FKWFxFv
|
||||||
|
[13]: https://www.linkedin.com/in/carl-richell-9435781
|
||||||
|
|
||||||
|
|
@ -0,0 +1,96 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: (geekpi)
|
||||||
|
[#]: reviewer: (wxy)
|
||||||
|
[#]: publisher: (wxy)
|
||||||
|
[#]: url: (https://linux.cn/article-10807-1.html)
|
||||||
|
[#]: subject: (Tracking the weather with Python and Prometheus)
|
||||||
|
[#]: via: (https://opensource.com/article/19/4/weather-python-prometheus)
|
||||||
|
[#]: author: (Moshe Zadka https://opensource.com/users/moshez)
|
||||||
|
|
||||||
|
使用 Python 和 Prometheus 跟踪天气
|
||||||
|
======
|
||||||
|
|
||||||
|
> 创建自定义 Prometheus 集成以跟踪最大的云端提供商:地球母亲。
|
||||||
|
|
||||||
|
![Tree clouds][1]
|
||||||
|
|
||||||
|
开源监控系统 [Prometheus][2] 集成了跟踪多种类型的时间序列数据,但如果没有集成你想要的数据,那么很容易构建一个。一个经常使用的例子使用云端提供商的自定义集成,它使用提供商的 API 抓取特定的指标。但是,在这个例子中,我们将与最大云端提供商集成:地球。
|
||||||
|
|
||||||
|
幸运的是,美国政府已经测量了天气并为集成提供了一个简单的 API。获取红帽总部下一个小时的天气预报很简单。
|
||||||
|
|
||||||
|
```
|
||||||
|
import requests
|
||||||
|
HOURLY_RED_HAT = "<https://api.weather.gov/gridpoints/RAH/73,57/forecast/hourly>"
|
||||||
|
def get_temperature():
|
||||||
|
result = requests.get(HOURLY_RED_HAT)
|
||||||
|
return result.json()["properties"]["periods"][0]["temperature"]
|
||||||
|
```
|
||||||
|
|
||||||
|
现在我们已经完成了与地球的集成,现在是确保 Prometheus 能够理解我们想要内容的时候了。我们可以使用 [Prometheus Python 库][3]中的 gauge 创建一个注册项:红帽总部的温度。
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
from prometheus_client import CollectorRegistry, Gauge
|
||||||
|
def prometheus_temperature(num):
|
||||||
|
registry = CollectorRegistry()
|
||||||
|
g = Gauge("red_hat_temp", "Temperature at Red Hat HQ", registry=registry)
|
||||||
|
g.set(num)
|
||||||
|
return registry
|
||||||
|
```
|
||||||
|
|
||||||
|
最后,我们需要以某种方式将它连接到 Prometheus。这有点依赖 Prometheus 的网络拓扑:是 Prometheus 与我们的服务通信更容易,还是反向更容易。
|
||||||
|
|
||||||
|
第一种是通常建议的情况,如果可能的话,我们需要构建一个公开注册入口的 Web 服务器,并配置 Prometheus 收刮(scrape)它。
|
||||||
|
|
||||||
|
我们可以使用 [Pyramid][4] 构建一个简单的 Web 服务器。
|
||||||
|
|
||||||
|
```
|
||||||
|
from pyramid.config import Configurator
|
||||||
|
from pyramid.response import Response
|
||||||
|
from prometheus_client import generate_latest, CONTENT_TYPE_LATEST
|
||||||
|
def metrics_web(request):
|
||||||
|
registry = prometheus_temperature(get_temperature())
|
||||||
|
return Response(generate_latest(registry),
|
||||||
|
content_type=CONTENT_TYPE_LATEST)
|
||||||
|
config = Configurator()
|
||||||
|
config.add_route('metrics', '/metrics')
|
||||||
|
config.add_view(metrics_web, route_name='metrics')
|
||||||
|
app = config.make_wsgi_app()
|
||||||
|
```
|
||||||
|
|
||||||
|
这可以使用任何 Web 网关接口(WSGI)服务器运行。例如,假设我们将代码放在 `earth.py` 中,我们可以使用 `python -m twisted web --wsgi earth.app` 来运行它。
|
||||||
|
|
||||||
|
或者,如果我们的代码连接到 Prometheus 更容易,我们可以定期将其推送到 Prometheus 的[推送网关][5]。
|
||||||
|
|
||||||
|
```
|
||||||
|
import time
|
||||||
|
from prometheus_client import push_to_gateway
|
||||||
|
def push_temperature(url):
|
||||||
|
while True:
|
||||||
|
registry = prometheus_temperature(get_temperature())
|
||||||
|
push_to_gateway(url, "temperature collector", registry)
|
||||||
|
time.sleep(60*60)
|
||||||
|
```
|
||||||
|
|
||||||
|
这里的 URL 是推送网关的 URL。它通常以 `:9091` 结尾。
|
||||||
|
|
||||||
|
祝你构建自定义 Prometheus 集成成功,以便跟踪一切!
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://opensource.com/article/19/4/weather-python-prometheus
|
||||||
|
|
||||||
|
作者:[Moshe Zadka][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[geekpi](https://github.com/geekpi)
|
||||||
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://opensource.com/users/moshez
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life_tree_clouds.png?itok=b_ftihhP (Tree clouds)
|
||||||
|
[2]: https://prometheus.io/
|
||||||
|
[3]: https://github.com/prometheus/client_python
|
||||||
|
[4]: https://trypyramid.com/
|
||||||
|
[5]: https://github.com/prometheus/pushgateway
|
@ -0,0 +1,138 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: (warmfrog)
|
||||||
|
[#]: reviewer: (wxy)
|
||||||
|
[#]: publisher: (wxy)
|
||||||
|
[#]: url: (https://linux.cn/article-10800-1.html)
|
||||||
|
[#]: subject: (Four Methods To Check The Default Gateway Or Router IP Address In Linux?)
|
||||||
|
[#]: via: (https://www.2daygeek.com/check-find-default-gateway-or-router-ip-address-in-linux/)
|
||||||
|
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
|
||||||
|
|
||||||
|
4 种在 Linux 中检查默认网关或者路由器 IP 地址的方法
|
||||||
|
==============================================
|
||||||
|
|
||||||
|
你应该意识到你的默认网关是你的路由器的 IP 地址。一般这是在安装过程中由操作系统自动检测的,如果没有,你可能需要改变它。如果你的系统不能 ping 自身,那么很可能是一个网关问题,你必须修复它。在网络中,当你有多个网络适配器或路由器时,这种情况可能会发生。
|
||||||
|
|
||||||
|
网关是一个扮演着入口点角色的路由器,可以从一个网络传递网络数据到另一个网络。
|
||||||
|
|
||||||
|
下面是一些可能帮助你收集到与该话题相似的一些信息。
|
||||||
|
|
||||||
|
* [在 Linux 命令行检查你的公网 IP 地址的 9 种方法][1]
|
||||||
|
* [如何在 Linux 启用和禁用网卡?][2]
|
||||||
|
|
||||||
|
这可以通过下面的四个命令完成。
|
||||||
|
|
||||||
|
* `route` 命令:被用来显示和操作 IP 路由表。
|
||||||
|
* `ip` 命令:类似于 `ifconfig`,常用于设置静态 IP 地址、路由 & 默认网关,等等。
|
||||||
|
* `netstat` 命令:是一个命令行工具,用来显示网络连接相关的信息(包括入站和出站的),例如路由表、伪装连接、多播成员和网络接口。
|
||||||
|
* `routel` 命令:被用来以好看的输出格式列出路由。
|
||||||
|
|
||||||
|
### 1)在 Linux 中如何使用 route 命令检查默认的网关或者路由 IP 地址?
|
||||||
|
|
||||||
|
`route` 命令被用来显示和操作 IP 路由表。
|
||||||
|
|
||||||
|
它主要用于通过一个已经配置的接口给特定的主机或者网络设置静态的路由。
|
||||||
|
|
||||||
|
当使用 `add` 或者 `del` 选项时,`route` 修改路由表。没有这些选项,`route` 显示路由表的当前内容。
|
||||||
|
|
||||||
|
```
|
||||||
|
# route
|
||||||
|
或
|
||||||
|
# route -n
|
||||||
|
|
||||||
|
Kernel IP routing table
|
||||||
|
Destination Gateway Genmask Flags Metric Ref Use Iface
|
||||||
|
default www.routerlogin 0.0.0.0 UG 600 0 0 wlp8s0
|
||||||
|
192.168.1.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp8s0
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2)如何在 Linux 中使用 ip 命令检查默认网关或者路由 IP 地址?
|
||||||
|
|
||||||
|
[IP 命令][3] 类似于 `ifconfig`,常用于配置静态 IP 地址、路由 & 默认网关,等等。
|
||||||
|
|
||||||
|
`ifconfig` 命令因为多年没有维护而被遗弃了,即使它仍然在大多数 Linux 发行版上可获得。
|
||||||
|
|
||||||
|
`ifconfig` 命令已经被 `ip` 命令替代了,`ip` 命令是非常强大的,只要一个命令就能执行几个网络管理任务。
|
||||||
|
|
||||||
|
`ip` 命令工具附带在 iproute2 包中。在主要的 Linux 发行版中都默认预装了 iproute2 。
|
||||||
|
|
||||||
|
如果没有,你可以在你的终端中在包管理器的帮助下通过指定 iproute2 来安装它。
|
||||||
|
|
||||||
|
```
|
||||||
|
# ip r
|
||||||
|
或
|
||||||
|
# ip route
|
||||||
|
或
|
||||||
|
# ip route show
|
||||||
|
|
||||||
|
default via 192.168.1.1 dev wlp8s0 proto dhcp metric 600
|
||||||
|
192.168.1.0/24 dev wlp8s0 proto kernel scope link src 192.168.1.6 metric 600
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3)如何在 Linux 中使用 netstat 命令检查默认网关或者路由 IP 地址?
|
||||||
|
|
||||||
|
`netstat` 代表 Network Statistics,是一个用来显示网络连接相关的信息(包括入站和出站)的命令行工具,例如路由表、伪装连接,多播成员和网络接口。
|
||||||
|
|
||||||
|
它列出所有的 tcp、udp 套接字连接和 unix 套接字连接。
|
||||||
|
|
||||||
|
它在网络中被用来诊断网络问题并判断网络中的流量总量来作为性能测量指标。
|
||||||
|
|
||||||
|
```
|
||||||
|
# netstat -r
|
||||||
|
|
||||||
|
Kernel IP routing table
|
||||||
|
Destination Gateway Genmask Flags MSS Window irtt Iface
|
||||||
|
default www.routerlogin 0.0.0.0 UG 0 0 0 wlp8s0
|
||||||
|
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlp8s0
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4)如何在 Linux 中使用 routel 命令检查默认网关或者路由 IP 地址?
|
||||||
|
|
||||||
|
它用来以好看的输出格式列出路由信息。这些程序是一系列你可以用来替代 iproute2 的帮助脚本(`routel` 和 `routef`)。
|
||||||
|
|
||||||
|
`routel` 脚本以一种被认为更容易解释并且等价于 `route` 输出列表的格式来输出路由信息。
|
||||||
|
|
||||||
|
如果 `routef` 脚本不加任何参数,将仅仅简单的将路由表清空。小心!这意味着删除所有的路由,让你的网络不再可用。
|
||||||
|
|
||||||
|
```
|
||||||
|
# routel
|
||||||
|
target gateway source proto scope dev tbl
|
||||||
|
default 192.168.1.1 dhcp wlp8s0
|
||||||
|
192.168.1.0/ 24 192.168.1.6 kernel link wlp8s0
|
||||||
|
127.0.0.0 broadcast 127.0.0.1 kernel link lo local
|
||||||
|
127.0.0.0/ 8 local 127.0.0.1 kernel host lo local
|
||||||
|
127.0.0.1 local 127.0.0.1 kernel host lo local
|
||||||
|
127.255.255.255 broadcast 127.0.0.1 kernel link lo local
|
||||||
|
192.168.1.0 broadcast 192.168.1.6 kernel link wlp8s0 local
|
||||||
|
192.168.1.6 local 192.168.1.6 kernel host wlp8s0 local
|
||||||
|
192.168.1.255 broadcast 192.168.1.6 kernel link wlp8s0 local
|
||||||
|
::1 kernel lo
|
||||||
|
fe80::/ 64 kernel wlp8s0
|
||||||
|
::1 local kernel lo local
|
||||||
|
fe80::ad00:2f7e:d882:5add local kernel wlp8s0 local
|
||||||
|
ff00::/ 8 wlp8s0 local
|
||||||
|
```
|
||||||
|
|
||||||
|
如果你只想打印默认的网关那么使用下面的格式。
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
# routel | grep default
|
||||||
|
default 192.168.1.1 dhcp wlp8s0
|
||||||
|
```
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://www.2daygeek.com/check-find-default-gateway-or-router-ip-address-in-linux/
|
||||||
|
|
||||||
|
作者:[Magesh Maruthamuthu][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[warmfrog](https://github.com/warmfrog)
|
||||||
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://www.2daygeek.com/author/magesh/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://www.2daygeek.com/check-find-server-public-ip-address-linux/
|
||||||
|
[2]: https://www.2daygeek.com/enable-disable-up-down-nic-network-interface-port-linux-using-ifconfig-ifdown-ifup-ip-nmcli-nmtui/
|
||||||
|
[3]: https://www.2daygeek.com/ip-command-configure-network-interface-usage-linux/
|
@ -1,73 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: (arrowfeng)
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (Most data center workers happy with their jobs -- despite the heavy demands)
|
|
||||||
[#]: via: (https://www.networkworld.com/article/3389359/most-data-center-workers-happy-with-their-jobs-despite-the-heavy-demands.html#tk.rss_all)
|
|
||||||
[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/)
|
|
||||||
|
|
||||||
Most data center workers happy with their jobs -- despite the heavy demands
|
|
||||||
======
|
|
||||||
An Informa Engage and Data Center Knowledge survey finds data center workers are content with their jobs, so much so they would encourage their children to go into that line of work.
|
|
||||||
![Thinkstock][1]
|
|
||||||
|
|
||||||
A [survey conducted by Informa Engage and Data Center Knowledge][2] finds data center workers overall are content with their job, so much so they would encourage their children to go into that line of work despite the heavy demands on time and their brain.
|
|
||||||
|
|
||||||
Overall satisfaction is pretty good, with 72% of respondents generally agreeing with the statement “I love my current job,” while a third strongly agreed. And 75% agreed with the statement, “If my child, niece or nephew asked, I’d recommend getting into IT.”
|
|
||||||
|
|
||||||
**[ Also read:[20 hot jobs ambitious IT pros should shoot for][3] ]**
|
|
||||||
|
|
||||||
And there is a feeling of significance among data center workers, with 88% saying they feel they are very important to the success of their employer.
|
|
||||||
|
|
||||||
That’s despite some challenges, not the least of which is a skills and certification shortage. Survey respondents cite a lack of skills as the biggest area of concern. Only 56% felt they had the training necessary to do their job, and 74% said they had been in the IT industry for more than a decade.
|
|
||||||
|
|
||||||
The industry offers certification programs, every major IT hardware provider has them, but 61% said they have not completed or renewed certificates in the past 12 months. There are several reasons why.
|
|
||||||
|
|
||||||
A third (34%) said it was due to a lack of a training budget at their organization, while 24% cited a lack of time, 16% said management doesn’t see a need for training, and 16% cited no training plans within their workplace.
|
|
||||||
|
|
||||||
That doesn’t surprise me, since tech is one of the most open industries in the world where you can find training or educational materials and teach yourself. It’s already established that [many coders are self-taught][4], including industry giants Bill Gates, Steve Wozniak, John Carmack, and Jack Dorsey.
|
|
||||||
|
|
||||||
**[[Looking to upgrade your career in tech? This comprehensive online course teaches you how.][5] ]**
|
|
||||||
|
|
||||||
### Data center workers' salaries
|
|
||||||
|
|
||||||
Data center workers can’t complain about the pay. Well, most can’t, as 50% make $100,000 per year or more, but 11% make less than $40,000. Two-thirds of those surveyed are in the U.S., so those on the low end might be outside the country.
|
|
||||||
|
|
||||||
There was one notable discrepancy. Steve Brown, managing director of London-based Datacenter People, noted that software engineers get paid a lot better than the hardware people.
|
|
||||||
|
|
||||||
“The software engineering side of the data center is comparable to the highest-earning professions,” Brown said in the report. “On the physical infrastructure — the mechanical/electrical side — it’s not quite the case. It’s more equivalent to mid-level management.”
|
|
||||||
|
|
||||||
### Data center professionals still predominantly male
|
|
||||||
|
|
||||||
The least surprising finding? Nine out of 10 survey respondents were male. The industry is bending over backwards to fix the gender imbalance, but so far nothing has changed.
|
|
||||||
|
|
||||||
The conclusion of the report is a bit ominous, but I also think is wrong:
|
|
||||||
|
|
||||||
> “As data center infrastructure completes its transition to a cloud computing model, and software moves into containers and microservices, the remaining, treasured leaders of the data center workforce — people who acquired their skills in the 20th century — may find themselves with nothing recognizable they can manage and no-one to lead. We may be shocked when the crisis finally hits, but we won’t be able to say we weren’t warned.”
|
|
||||||
|
|
||||||
How many times do I have to say it, [the data center is not going away][6].
|
|
||||||
|
|
||||||
Join the Network World communities on [Facebook][7] and [LinkedIn][8] to comment on topics that are top of mind.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://www.networkworld.com/article/3389359/most-data-center-workers-happy-with-their-jobs-despite-the-heavy-demands.html#tk.rss_all
|
|
||||||
|
|
||||||
作者:[Andy Patrizio][a]
|
|
||||||
选题:[lujun9972][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://www.networkworld.com/author/Andy-Patrizio/
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://images.idgesg.net/images/article/2018/02/data_center_thinkstock_879720438-100749725-large.jpg
|
|
||||||
[2]: https://informa.tradepub.com/c/pubRD.mpl?sr=oc&_t=oc:&qf=w_dats04&ch=datacenterkids
|
|
||||||
[3]: https://www.networkworld.com/article/3276025/20-hot-jobs-ambitious-it-pros-should-shoot-for.html
|
|
||||||
[4]: https://www.networkworld.com/article/3046178/survey-finds-most-coders-are-self-taught.html
|
|
||||||
[5]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fupgrading-your-technology-career
|
|
||||||
[6]: https://www.networkworld.com/article/3289509/two-studies-show-the-data-center-is-thriving-instead-of-dying.html
|
|
||||||
[7]: https://www.facebook.com/NetworkWorld/
|
|
||||||
[8]: https://www.linkedin.com/company/network-world
|
|
@ -1,3 +1,4 @@
|
|||||||
|
LuMing Translating
|
||||||
Writing a Time Series Database from Scratch
|
Writing a Time Series Database from Scratch
|
||||||
============================================================
|
============================================================
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
RHSNOW is translating.
|
|
||||||
How To Create A Bootable Zorin OS USB Drive
|
How To Create A Bootable Zorin OS USB Drive
|
||||||
======
|
======
|
||||||
![Zorin OS][17]
|
![Zorin OS][17]
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: (geekpi)
|
||||||
|
[#]: reviewer: ( )
|
||||||
|
[#]: publisher: ( )
|
||||||
|
[#]: url: ( )
|
||||||
|
[#]: subject: (How to use autofs to mount NFS shares)
|
||||||
|
[#]: via: (https://opensource.com/article/18/6/using-autofs-mount-nfs-shares)
|
||||||
|
[#]: author: (Alan Formy-Duval https://opensource.com/users/alanfdoss)
|
||||||
|
|
||||||
How to use autofs to mount NFS shares
|
How to use autofs to mount NFS shares
|
||||||
======
|
======
|
||||||
|
|
||||||
|
@ -1,74 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: ( )
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (3 Emacs modes for taking notes)
|
|
||||||
[#]: via: (https://opensource.com/article/18/7/emacs-modes-note-taking)
|
|
||||||
[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt)
|
|
||||||
|
|
||||||
3 Emacs modes for taking notes
|
|
||||||
======
|
|
||||||
Keep track of information easily with these Emacs modes.
|
|
||||||
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/notebook-writing-pen.jpg?itok=uA3dCfu_)
|
|
||||||
|
|
||||||
No matter what line of work you're in, it's inevitable you have to take a few notes. Often, more than a few. If you're like many people in this day and age, you take your notes digitally.
|
|
||||||
|
|
||||||
Open source enthusiasts have a variety of options for jotting down their ideas, thoughts, and research in electronic format. You might use a [web-based tool][1]. You might go for a [desktop application][2]. Or, you might [turn to the command line][3].
|
|
||||||
|
|
||||||
If you use [Emacs][4], that wonderful operating system disguised as a text editor, there are modes that can help you take notes more efficiently. Let's look at three of them.
|
|
||||||
|
|
||||||
### Deft
|
|
||||||
![](https://opensource.com/sites/default/files/uploads/deft.png)
|
|
||||||
|
|
||||||
On those rare occasions I'm forced to use a Mac, there's one tool I can't do without: the [nvALT][5] note-taking application. [Deft mode][6] brings the nvALT experience to Emacs.
|
|
||||||
|
|
||||||
Deft stores your notes as text files in a single folder on your computer. When you enter Deft mode, it displays a list of your notes along with a short summary. The summary is taken from the first line of the text file. If you add, say, Markdown, LaTeX, or even Emacs Org mode formatting to the first line, Deft ignores the formatting and displays only the text.
|
|
||||||
|
|
||||||
To open a note, just scroll down to it and press Enter. Deft does a bit more, though. According to Deft's developer, Jason Blevins, its _primary operation is searching and filtering_. Deft does that simply but efficiently. Type a keyword and Deft displays only the notes that have that keyword in their title. That's useful if you have a lot of notes and want to find one quickly.
|
|
||||||
|
|
||||||
### Org mode
|
|
||||||
![](https://opensource.com/sites/default/files/uploads/orgmode.png)
|
|
||||||
|
|
||||||
There would be a couple or three people who would have jumped all over me if I didn't include [Org mode][7] in this article. Why? It's arguably the most flexible and the most widely used Emacs mode for taking notes. Used in the right way, Org mode can supercharge your note-taking.
|
|
||||||
|
|
||||||
Org mode's main strength is how it organizes your notes. In Org mode, a note file is set up as a large outline. Each section is a node in the outline, which you can expand and collapse. Those sections can have subsections, which also expand and collapse. That not only lets you focus on one section at a time, but it also gives you an at-a-glance overview of the information you have.
|
|
||||||
|
|
||||||
You can [link][8] between sections of your notes, quickly move sections without cutting and pasting, and [attach files][9] to your notes. Org mode supports character formatting and tables. If you need to convert your notes to something else, Org mode has a number of [export options][10].
|
|
||||||
|
|
||||||
### Howm
|
|
||||||
|
|
||||||
![](https://opensource.com/sites/default/files/uploads/howm.png)
|
|
||||||
|
|
||||||
When I started using Emacs regularly, [howm][11] quickly became one of the modes I leaned heavily on. And even though I'm deep into using Org mode, I still have a soft spot for howm.
|
|
||||||
|
|
||||||
Howm acts like a small wiki. You can create notes and task lists and link between them. By typing or clicking a link, you can jump between notes. If you need to, you can also tag your notes with a keyword. On top of that, you can search, sort, and concatenate your notes.
|
|
||||||
|
|
||||||
Howm isn't the prettiest Emacs mode, and it doesn't have the best UX. It takes a bit of getting used to. Once you do, taking and maneuvering around notes is a breeze.
|
|
||||||
|
|
||||||
Do you have a favorite Emacs mode for taking notes? Feel free to share it by leaving a comment.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://opensource.com/article/18/7/emacs-modes-note-taking
|
|
||||||
|
|
||||||
作者:[Scott Nesbitt][a]
|
|
||||||
选题:[lujun9972][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://opensource.com/users/scottnesbitt
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://opensource.com/alternatives/evernote
|
|
||||||
[2]: https://opensource.com/life/16/9/4-desktop-note-taking-applications
|
|
||||||
[3]: https://opensource.com/article/18/3/command-line-note-taking-applications
|
|
||||||
[4]: https://www.gnu.org/software/emacs/
|
|
||||||
[5]: http://brettterpstra.com/projects/nvalt/
|
|
||||||
[6]: https://jblevins.org/projects/deft/
|
|
||||||
[7]: https://orgmode.org/
|
|
||||||
[8]: https://orgmode.org/org.html#Hyperlinks
|
|
||||||
[9]: https://orgmode.org/org.html#Attachments
|
|
||||||
[10]: https://orgmode.org/org.html#Exporting
|
|
||||||
[11]: https://howm.osdn.jp/
|
|
@ -1,201 +0,0 @@
|
|||||||
Linux for Beginners: Moving Things Around
|
|
||||||
======
|
|
||||||
|
|
||||||
![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/filesystem-linux.jpg?itok=NQCoYl1f)
|
|
||||||
|
|
||||||
In previous installments of this series, [you learned about directories][1] and how [permissions to access directories work][2]. Most of what you learned in those articles can be applied to files, except how to make a file executable.
|
|
||||||
|
|
||||||
So let's deal with that before moving on.
|
|
||||||
|
|
||||||
### No _.exe_ Needed
|
|
||||||
|
|
||||||
In other operating systems, the nature of a file is often determined by its extension. If a file has a _.jpg_ extension, the OS guesses it is an image; if it ends in _.wav_ , it is an audio file; and if it has an _.exe_ tacked onto the end of the file name, it is a program you can execute.
|
|
||||||
|
|
||||||
This leads to serious problems, like trojans posing as documents. Fortunately, that is not how things work in Linux. Sure, you may see occasional executable file endings in _.sh_ that indicate they are runnable shell scripts, but this is mostly for the benefit of humans eyeballing files, the same way when you use `ls --color`, the names of executable files show up in bright green.
|
|
||||||
|
|
||||||
The fact is most applications have no extension at all. What determines whether a file is really program is the _x_ (for _executable_ ) bit. You can make any file executable by running
|
|
||||||
```
|
|
||||||
chmod a+x some_program
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
regardless of its extension or lack thereof. The `x` in the command above sets the _x_ bit and the `a` says you are setting it for _all_ users. You could also set it only for the group of users that own the file (`g+x`), or for only one user, the owner (`u+x`).
|
|
||||||
|
|
||||||
Although we will be covering creating and running scripts from the command line later in this series, know that you can run a program by writing the path to it and then tacking on the name of the program on the end:
|
|
||||||
```
|
|
||||||
path/to/directory/some_program
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
Or, if you are currently in the same directory, you can use:
|
|
||||||
```
|
|
||||||
./some_program
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
There are other ways of making your program available from anywhere in the directory tree (hint: look up the `$PATH` environment variable), but you will be reading about those when we talk about shell scripting.
|
|
||||||
|
|
||||||
### Copying, Moving, Linking
|
|
||||||
|
|
||||||
Obviously, there are more ways of modifying and handling files from the command line than just playing around with their permissions. Most applications will create a new file if you still try to open a file that doesn't exist. Both
|
|
||||||
```
|
|
||||||
nano test.txt
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
and
|
|
||||||
```
|
|
||||||
vim test.txt
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
([nano][3] and [vim][4] being to popular command line text editors) will create an empty _test.txt_ file for you to edit if _test.txt_ didn't exist beforehand.
|
|
||||||
|
|
||||||
You can also create an empty file by _touching_ it:
|
|
||||||
```
|
|
||||||
touch test.txt
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
Will create a file, but not open it in any application.
|
|
||||||
|
|
||||||
You can use `cp` to make a copy of a file in another location or under a new name:
|
|
||||||
```
|
|
||||||
cp test.txt copy_of_test.txt
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
You can also copy a whole bunch of files:
|
|
||||||
```
|
|
||||||
cp *.png /home/images
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
The instruction above copies all the PNG files in the current directory into an _images/_ directory hanging off of your home directory. The _images/_ directory has to exist before you try this, or `cp` will show an error. Also, be warned that, if you copy a file to a directory that contains another file with the same name, `cp` will silently overwrite the old file with the new one.
|
|
||||||
|
|
||||||
You can use
|
|
||||||
```
|
|
||||||
cp -i *.png /home/images
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
If you want `cp` to warn you of any dangers (the `-i` options stands for _interactive_ ).
|
|
||||||
|
|
||||||
You can also copy whole directories, but you need the `-r` option for that:
|
|
||||||
```
|
|
||||||
cp -rv directory_a/ directory_b
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
The `-r` option stands for _recursive_ , meaning that `cp` will drill down into _directory_a_ , copying over all the files and subdirectories contained within. I personally like to include the `-v` option, as it makes `cp` _verbose_ , meaning that it will show you what it is doing instead of just copying silently and then exiting.
|
|
||||||
|
|
||||||
The `mv` command moves stuff. That is, it changes files from one location to another. In its simplest form, `mv` looks a lot like `cp`:
|
|
||||||
```
|
|
||||||
mv test.txt new_test.txt
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
The command above makes _new_test.txt_ appear and _test.txt_ disappear.
|
|
||||||
```
|
|
||||||
mv *.png /home/images
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
Moves all the PNG files in the current directory to a directory called _images/_ hanging of your home directory. Again you have to be careful you do not overwrite existing files by accident. Use
|
|
||||||
```
|
|
||||||
mv -i *.png /home/images
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
the same way you would with `cp` if you want to be on the safe side.
|
|
||||||
|
|
||||||
Apart from moving versus copying, another difference between `mv` and `cp`is when you move a directory:
|
|
||||||
```
|
|
||||||
mv directory_a/ directory_b
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
No need for a recursive flag here. This is because what you are really doing is renaming the directory, the same way in the first example, you were renaming the file*. In fact, even when you "move" a file from one directory to another, as long as both directories are on the same storage device and partition, you are renaming the file.
|
|
||||||
|
|
||||||
You can do an experiment to prove it. `time` is a tool that lets you measure how long a command takes to execute. Look for a hefty file, something that weighs several hundred MBs or even some GBs (say, something like a long video) and try copying it from one directory to another like this:
|
|
||||||
```
|
|
||||||
$ time cp hefty_file.mkv another_directory/
|
|
||||||
real 0m3,868s
|
|
||||||
user 0m0,016s
|
|
||||||
sys 0m0,887s
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
In bold is what you have to type into the terminal and below what `time` outputs. The number to focus on is the one on the first line, _real_ time. It takes nearly 4 seconds to copy the 355 MBs of _hefty_file.mkv_ to _another_directory/_.
|
|
||||||
|
|
||||||
Now let's try moving it:
|
|
||||||
```
|
|
||||||
$ time mv hefty_file.mkv another_directory/
|
|
||||||
real 0m0,004s
|
|
||||||
user 0m0,000s
|
|
||||||
sys 0m0,003s
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
Moving is nearly instantaneous! This is counterintuitive, since it would seem that `mv` would have to copy the file and then delete the original. That is two things `mv` has to do versus `cp`'s one. But, somehow, `mv` is 1000 times faster.
|
|
||||||
|
|
||||||
That is because the file system's structure, with all its tree of directories, only exists for the users convenience. At the beginning of each partition there is something called a _partition table_ that tells the operating system where to find each file on the actual physical disk. On the disk, data is not split up into directories or even files. [There are tracks, sectors and clusters instead][5]. When you "move" a file within the same partition, what the operating system does is just change the entry for that file in the partition table, but it still points to the same cluster of information on the disk.
|
|
||||||
|
|
||||||
Yes! Moving is a lie! At least within the same partition that is. If you try and move a file to a different partition or a different device, `mv` is still fast, but is noticeably slower than moving stuff around within the same partition. That is because this time there is actually copying and erasing of data going on.
|
|
||||||
|
|
||||||
### Renaming
|
|
||||||
|
|
||||||
There are several distinct command line `rename` utilities around. None are fixtures like `cp` or `mv` and they can work in slightly different ways. What they all have in common is that they are used to change _parts_ of the names of files.
|
|
||||||
|
|
||||||
In Debian and Ubuntu, the default `rename` utility uses [regular expressions][6] (patterns of strings of characters) to mass change files in a directory. The instruction:
|
|
||||||
```
|
|
||||||
rename 's/\.JPEG$/.jpg/' *
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
will change all the extensions of files with the extension _JPEG_ to _jpg_. The file _IMG001.JPEG_ becomes _IMG001.jpg_ , _my_pic.JPEG_ becomes _my_pic.jpg_ , and so on.
|
|
||||||
|
|
||||||
Another version of `rename` available by default in Manjaro, a derivative of Arch, is much simpler, but arguably less powerful:
|
|
||||||
```
|
|
||||||
rename .JPEG .jpg *
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
This does the same renaming as you saw above. In this version, `.JPEG` is the string of characters you want to change, `.jpg` is what you want to change it to, and `*` represents all the files in the current directory.
|
|
||||||
|
|
||||||
The bottom line is that you are better off using `mv` if all you want to do is rename one file or directory, and that's because `mv` is realiably the same in all distributions everywhere.
|
|
||||||
|
|
||||||
### Learning more
|
|
||||||
|
|
||||||
Check out the both `mv` and `cp`'s _man_ pages to learn more. Run
|
|
||||||
```
|
|
||||||
man cp
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
```
|
|
||||||
man mv
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
to read about all the options these commands come with and which make them more powerful and safer to use.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://www.linux.com/blog/2018/8/linux-beginners-moving-things-around
|
|
||||||
|
|
||||||
作者:[Paul Brown][a]
|
|
||||||
选题:[lujun9972](https://github.com/lujun9972)
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://www.linux.com/users/bro66
|
|
||||||
[1]: https://www.linux.com/blog/learn/2018/5/manipulating-directories-linux
|
|
||||||
[2]: https://www.linux.com/blog/learn/intro-to-linux/2018/7/users-groups-and-other-linux-beasts-part-2
|
|
||||||
[3]: https://www.nano-editor.org/
|
|
||||||
[4]: https://www.vim.org/
|
|
||||||
[5]: https://en.wikipedia.org/wiki/Disk_sector
|
|
||||||
[6]: https://en.wikipedia.org/wiki/Regular_expression
|
|
@ -0,0 +1,65 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: (lujun9972)
|
||||||
|
[#]: reviewer: ( )
|
||||||
|
[#]: publisher: ( )
|
||||||
|
[#]: url: ( )
|
||||||
|
[#]: subject: (Get desktop notifications from Emacs shell commands ·)
|
||||||
|
[#]: via: (https://blog.hoetzel.info/post/eshell-notifications/)
|
||||||
|
[#]: author: (Jürgen Hötzel https://blog.hoetzel.info)
|
||||||
|
|
||||||
|
Get desktop notifications from Emacs shell commands ·
|
||||||
|
======
|
||||||
|
When interacting with the operating systems I always use [Eshell][1] because it integrates seamlessly with Emacs, supports (remote) [TRAMP][2] file names and also works nice on Windows.
|
||||||
|
|
||||||
|
After starting shell commands (like long running build jobs) I often lose track the task when switching buffers.
|
||||||
|
|
||||||
|
Thanks to Emacs [hooks][3] mechanism you can customize Emacs to call a elisp function when an external command finishes.
|
||||||
|
|
||||||
|
I use [John Wiegleys][4] excellent [alert][5] package to send desktop notifications:
|
||||||
|
|
||||||
|
```
|
||||||
|
(require 'alert)
|
||||||
|
|
||||||
|
(defun eshell-command-alert (process status)
|
||||||
|
"Send `alert' with severity based on STATUS when PROCESS finished."
|
||||||
|
(let* ((cmd (process-command process))
|
||||||
|
(buffer (process-buffer process))
|
||||||
|
(msg (format "%s: %s" (mapconcat 'identity cmd " ") status)))
|
||||||
|
(if (string-prefix-p "finished" status)
|
||||||
|
(alert msg :buffer buffer :severity 'normal)
|
||||||
|
(alert msg :buffer buffer :severity 'urgent))))
|
||||||
|
|
||||||
|
(add-hook 'eshell-kill-hook #'eshell-command-alert)
|
||||||
|
```
|
||||||
|
|
||||||
|
[alert][5] rules can be setup programmatically. In my case I only want to get notified if the corresponding buffer is not visible:
|
||||||
|
|
||||||
|
```
|
||||||
|
(alert-add-rule :status '(buried) ;only send alert when buffer not visible
|
||||||
|
:mode 'eshell-mode
|
||||||
|
:style 'notifications)
|
||||||
|
```
|
||||||
|
|
||||||
|
This even works on [TRAMP][2] buffers. Below is a screenshot showing a Gnome desktop notification of a failed `make` command.
|
||||||
|
|
||||||
|
![../../img/eshell.png][6]
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://blog.hoetzel.info/post/eshell-notifications/
|
||||||
|
|
||||||
|
作者:[Jürgen Hötzel][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[lujun9972](https://github.com/lujun9972)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://blog.hoetzel.info
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://www.gnu.org/software/emacs/manual/html_mono/eshell.html (Eshell)
|
||||||
|
[2]: https://www.gnu.org/software/tramp/ (TRAMP)
|
||||||
|
[3]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Hooks.html (hooks)
|
||||||
|
[4]: https://github.com/jwiegley (John Wiegleys)
|
||||||
|
[5]: https://github.com/jwiegley/alert (alert)
|
||||||
|
[6]: https://blog.hoetzel.info/img/eshell.png (../../img/eshell.png)
|
@ -1,5 +1,5 @@
|
|||||||
[#]: collector: (lujun9972)
|
[#]: collector: (lujun9972)
|
||||||
[#]: translator: (suphgcm)
|
[#]: translator: ( )
|
||||||
[#]: reviewer: ( )
|
[#]: reviewer: ( )
|
||||||
[#]: publisher: ( )
|
[#]: publisher: ( )
|
||||||
[#]: url: ( )
|
[#]: url: ( )
|
||||||
|
@ -1,114 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: ( )
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (LibreOffice 6.2 is Here: This is the Last Release with 32-bit Binaries)
|
|
||||||
[#]: via: (https://itsfoss.com/libreoffice-drops-32-bit-support/)
|
|
||||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
|
||||||
|
|
||||||
LibreOffice 6.2 is Here: This is the Last Release with 32-bit Binaries
|
|
||||||
======
|
|
||||||
|
|
||||||
LibreOffice is my favorite office suite as a free and powerful [alternative to Microsoft Office tools on Linux][1]. Even when I use my Windows machine – I prefer to have LibreOffice installed instead of Microsoft Office tools any day.
|
|
||||||
|
|
||||||
Now, with the recent [LibreOffice][2] 6.2 update, there’s a lot of good stuff to talk about along with a bad news.
|
|
||||||
|
|
||||||
### What’s New in LibreOffice 6.2?
|
|
||||||
|
|
||||||
Let’s have a quick look at the major new features in the [latest release of LibreOffice][3].
|
|
||||||
|
|
||||||
If you like Linux videos, don’t forget to [subscribe to our YouTube channel][4] as well.
|
|
||||||
|
|
||||||
#### The new NotebookBar
|
|
||||||
|
|
||||||
![][5]
|
|
||||||
|
|
||||||
A new addition to the interface that is optional and not enabled by default. In order to enable it, go to **View - > User Interface -> Tabbed**.
|
|
||||||
|
|
||||||
You can either set it as a tabbed layout or a grouped compact layout.
|
|
||||||
|
|
||||||
While it is not something that is mind blowing – but it still counts as a significant user interface update considering a variety of user preferences.
|
|
||||||
|
|
||||||
#### Icon Theme
|
|
||||||
|
|
||||||
![][6]
|
|
||||||
|
|
||||||
A new set of icons is now available to choose from. I will definitely utilize the new set of icons – they look good!
|
|
||||||
|
|
||||||
#### Platform Compatibility
|
|
||||||
|
|
||||||
With the new update, the compatibility has been improved across all the platforms (Mac, Windows, and Linux).
|
|
||||||
|
|
||||||
#### Performance Improvements
|
|
||||||
|
|
||||||
This shouldn’t concern you if you didn’t have any issues. But, still, the better they work on this – it is a win-win for all.
|
|
||||||
|
|
||||||
They have removed unnecessary animations, worked on latency reduction, avoided repeated re-layout, and more such things to improve the performance.
|
|
||||||
|
|
||||||
#### More fixes and improvements
|
|
||||||
|
|
||||||
A lot of bugs have been fixed in this new update along with little tweaks here and there for all the tools (Writer, Calc, Draw, Impress).
|
|
||||||
|
|
||||||
To get to know all the technical details, you should check out their [release notes.
|
|
||||||
][7]
|
|
||||||
|
|
||||||
### The Sad News: Dropping the support for 32-bit binaries
|
|
||||||
|
|
||||||
Of course, this is not a feature. But, this was bound to happen – because it was anticipated a few months ago. LibreOffice will no more provide 32-bit binary releases.
|
|
||||||
|
|
||||||
This is inevitable. [Ubuntu has dropped 32-bit support][8]. Many other Linux distributions have also stopped supporting 32-bit processors. The number of [Linux distributions still supporting a 32-bit architecture][9] is fast dwindling.
|
|
||||||
|
|
||||||
For the future versions of LibreOffice on 32-bit systems, you’ll have to rely on your distribution to provide it to you. You cannot download the binaries anymore.
|
|
||||||
|
|
||||||
### Installing LibreOffice 6.2
|
|
||||||
|
|
||||||
![][10]
|
|
||||||
|
|
||||||
Your Linux distribution should be providing this update sooner or later.
|
|
||||||
|
|
||||||
Arch-based Linux users should be getting it already while Ubuntu and Debian users would have to wait a bit longer.
|
|
||||||
|
|
||||||
If you cannot wait, you should download it and [install it from the deb file][11]. Do remove the existing LibreOffice install before using the DEB file.
|
|
||||||
|
|
||||||
[Download LibreOffice 6.2][12]
|
|
||||||
|
|
||||||
If you don’t want to use the deb file, you may use the official PPA should provide you LibreOffice 6.2 before Ubuntu (it doesn’t have 6.2 release at the moment). It will update your existing LibreOffice install.
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo add-apt-repository ppa:libreoffice/ppa
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install libreoffice
|
|
||||||
```
|
|
||||||
|
|
||||||
### Wrapping Up
|
|
||||||
|
|
||||||
LibreOffice 6.2 is definitely a major step up to keep it as a better alternative to Microsoft Office for Linux users.
|
|
||||||
|
|
||||||
Do you happen to use LibreOffice? Do these updates matter to you? Let us know in the comments below.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://itsfoss.com/libreoffice-drops-32-bit-support/
|
|
||||||
|
|
||||||
作者:[Ankush Das][a]
|
|
||||||
选题:[lujun9972][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://itsfoss.com/author/ankush/
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/
|
|
||||||
[2]: https://www.libreoffice.org/
|
|
||||||
[3]: https://itsfoss.com/libreoffice-6-0-released/
|
|
||||||
[4]: https://www.youtube.com/c/itsfoss?sub_confirmation=1
|
|
||||||
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/libreoffice-tabbed.png?resize=800%2C434&ssl=1
|
|
||||||
[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/02/Libreoffice-style-elementary.png?ssl=1
|
|
||||||
[7]: https://wiki.documentfoundation.org/ReleaseNotes/6.2
|
|
||||||
[8]: https://itsfoss.com/ubuntu-drops-32-bit-desktop/
|
|
||||||
[9]: https://itsfoss.com/32-bit-os-list/
|
|
||||||
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/02/libre-office-6-2-release.png?resize=800%2C450&ssl=1
|
|
||||||
[11]: https://itsfoss.com/install-deb-files-ubuntu/
|
|
||||||
[12]: https://www.libreoffice.org/download/download/
|
|
@ -1,104 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: ( )
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (DevOps for Network Engineers: Linux Foundation’s New Training Course)
|
|
||||||
[#]: via: (https://itsfoss.com/devops-for-network-engineers/)
|
|
||||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
|
||||||
|
|
||||||
DevOps for Network Engineers: Linux Foundation’s New Training Course
|
|
||||||
======
|
|
||||||
|
|
||||||
_**Linux Foundation has launched a[DevOps course for sysadmins][1] and network engineers. They are also offering a limited time 40% discount on the launch.**_
|
|
||||||
|
|
||||||
DevOps is no longer a buzzword. It has become the necessity for any IT company.
|
|
||||||
|
|
||||||
The role and responsibility of a sysadmin and a network engineer have changed as well. They are required to have knowledge of the DevOps tools popular in the IT industry.
|
|
||||||
|
|
||||||
If you are a sysadmin or a network engineer, you can no longer laugh off DevOps anymore. It’s time to learn new skills to stay relevant in today’s rapidly changing IT industry otherwise the ‘automation’ trend might cost you your job.
|
|
||||||
|
|
||||||
And who knows it better than Linux Foundation, the official organization behind Linux project and the employer of Linux-creator Linus Torvalds?
|
|
||||||
|
|
||||||
[Linux Foundation has a number of courses on Linux and related technologies][2] that help you in getting a job or improving your existing skills at work.
|
|
||||||
|
|
||||||
The [latest course offering][1] from Linux Foundation specifically focuses on sysadmins who would like to familiarize with DevOps tools.
|
|
||||||
|
|
||||||
### DevOps for Network Engineers Course
|
|
||||||
|
|
||||||
![][3]
|
|
||||||
|
|
||||||
[This course][1] is intended for existing sysadmins and network engineers. So you need to have some knowledge of Linux system administration, shell scripting and Python.
|
|
||||||
|
|
||||||
The course will help you with:
|
|
||||||
|
|
||||||
* Integrating into a DevOps/Agile environment
|
|
||||||
* Familiarizing with commonly used DevOps tools
|
|
||||||
* Collaborating on projects as DevOps
|
|
||||||
* Confidently working with software and configuration files in version control
|
|
||||||
* Recognizing the roles of SCRUM team members
|
|
||||||
* Confidently applying Agile principles in an organization
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
This is the course outline:
|
|
||||||
|
|
||||||
* Chapter 1. Course Introduction
|
|
||||||
* Chapter 2. Modern Project Management
|
|
||||||
* Chapter 3. The DevOps Process: A Network Engineer’s Perspective
|
|
||||||
* Chapter 4. Network Simulation and Testing with [Mininet][4]
|
|
||||||
* Chapter 5. [OpenFlow][5] and [ONOS][6]
|
|
||||||
* Chapter 6. Infrastructure as Code ([Ansible][7] Basics)
|
|
||||||
* Chapter 7. Version Control ([Git][8])
|
|
||||||
* Chapter 8. Continuous Integration and Continuous Delivery ([Jenkins][9])
|
|
||||||
* Chapter 9. Using [Gerrit][10] in DevOps
|
|
||||||
* Chapter 10. Jenkins, Gerrit and Code Review for DevOps
|
|
||||||
* Chapter 11. The DevOps Process and Tools (Review)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Altogether, you get 25-30 hours of course material. The online course is self-paced and you can access the material for one year from the date of purchase.
|
|
||||||
|
|
||||||
_**Unlike most other courses on Linux Foundation, this is NOT a video course.**_
|
|
||||||
|
|
||||||
There is no certification for this course because it is more focused on learning and improving skills.
|
|
||||||
|
|
||||||
#### Get the course at a 40% discount (limited time)
|
|
||||||
|
|
||||||
The course costs $299 but since it’s just launched, they are offering 40% discount till March 1st, 2019. You can get the discount by using the **DEVOPSNET** coupon code at checkout.
|
|
||||||
|
|
||||||
[DevOps for Network Engineers][1]
|
|
||||||
|
|
||||||
By the way, if you are interested in Open Source development, you can benefit from the “[Introduction to Open Source Development, Git, and Linux][11]” video course. You can get a limited time 50% discount using **OSDEV50** code at the checkout.
|
|
||||||
|
|
||||||
Staying relevant is absolutely necessary in any industry, not just IT industry. Learning new skills that are in-demand in your industry is perhaps the best way in this regard.
|
|
||||||
|
|
||||||
What do you think? What are your views on the current automation trend? How would you go about it?
|
|
||||||
|
|
||||||
_Disclaimer: This post contains affiliate links. Please read our_ [_affiliate policy_][12] _for more details._
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://itsfoss.com/devops-for-network-engineers/
|
|
||||||
|
|
||||||
作者:[Abhishek Prakash][a]
|
|
||||||
选题:[lujun9972][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://itsfoss.com/author/abhishek/
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: http://shrsl.com/1glcb
|
|
||||||
[2]: https://shareasale.com/r.cfm?b=1074561&u=747593&m=59485&urllink=&afftrack=
|
|
||||||
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/02/DevOps-for-Network-Engineers-800x450.png?resize=800%2C450&ssl=1
|
|
||||||
[4]: http://mininet.org/
|
|
||||||
[5]: https://en.wikipedia.org/wiki/OpenFlow
|
|
||||||
[6]: https://onosproject.org/
|
|
||||||
[7]: https://www.ansible.com/
|
|
||||||
[8]: https://itsfoss.com/basic-git-commands-cheat-sheet/
|
|
||||||
[9]: https://jenkins.io/
|
|
||||||
[10]: https://www.gerritcodereview.com/
|
|
||||||
[11]: https://shareasale.com/r.cfm?b=1193750&u=747593&m=59485&urllink=&afftrack=
|
|
||||||
[12]: https://itsfoss.com/affiliate-policy/
|
|
@ -1,208 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: ( )
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (How to Restart a Network in Ubuntu [Beginner’s Tip])
|
|
||||||
[#]: via: (https://itsfoss.com/restart-network-ubuntu)
|
|
||||||
[#]: author: (Sergiu https://itsfoss.com/author/sergiu/)
|
|
||||||
|
|
||||||
How to Restart a Network in Ubuntu [Beginner’s Tip]
|
|
||||||
======
|
|
||||||
|
|
||||||
You’re [using an Ubuntu-based system and you just can’t seem to connect to your network][1]? You’d be surprised how many problems can a simple restart fix.
|
|
||||||
|
|
||||||
In this article, I’ll go over multiple ways you can restart network in Ubuntu and other Linux distributions, so you can use whatever suits your needs. The methods are basically divided into two parts:
|
|
||||||
|
|
||||||
![Ubuntu Restart Network][2]
|
|
||||||
|
|
||||||
### Restart network in Ubuntu using command line
|
|
||||||
|
|
||||||
If you are using Ubuntu server edition, you are already in the terminal. If you are using the desktop edition, you can access the terminal using Ctrl+Alt+T [keyboard shortcut in Ubuntu][3].
|
|
||||||
|
|
||||||
Now you have several commands at your disposal to restart network in Ubuntu. Some (or perhaps most) commands mentioned here should be applicable for restarting network in Debian and other Linux distributions as well.
|
|
||||||
|
|
||||||
#### 1\. network manager service
|
|
||||||
|
|
||||||
This is the easiest way to restart your network using the command line. It’s equivalent to the graphical way of doing it (restarts the Network-Manager service).
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo service network-manager restart
|
|
||||||
```
|
|
||||||
|
|
||||||
The network icon should disappear for a moment and then reappear.
|
|
||||||
|
|
||||||
#### 2\. systemd
|
|
||||||
|
|
||||||
The **service** command is just a wrapper for this method (and also for init.d scripts and Upstart commands). The **systemctl** command is much more versatile than **service**. This is what I usually prefer.
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo systemctl restart NetworkManager.service
|
|
||||||
```
|
|
||||||
|
|
||||||
The network icon (again) should disappear for a moment. To check out other **systemctl** options, you can refer to its man page.
|
|
||||||
|
|
||||||
#### 3\. nmcli
|
|
||||||
|
|
||||||
This is yet another tool for handling networks on a Linux machine. It is a pretty powerful tool that I find very practical. Many sysadmins prefer it since it is easy to use.
|
|
||||||
|
|
||||||
There are two steps to this method: turning the network off, and then turning it back on.
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo nmcli networking off
|
|
||||||
```
|
|
||||||
|
|
||||||
The network will shut down and the icon will disappear. To turn it back on:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo nmcli networking on
|
|
||||||
```
|
|
||||||
|
|
||||||
You can check out the man page of nmcli for more options.
|
|
||||||
|
|
||||||
#### 4\. ifup & ifdown
|
|
||||||
|
|
||||||
This commands handle a network interface directly, changing it’s state to one in which it either can or can not transmit and receive data. It’s one of the [must know networking commands in Linux][4].
|
|
||||||
|
|
||||||
To shut down all network interfaces, use ifdown and then use ifup to turn all network interfaces back on.
|
|
||||||
|
|
||||||
A good practice would be to combine both of these commands:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo ifdown -a && sudo ifup -a
|
|
||||||
```
|
|
||||||
|
|
||||||
**Note:** This method will not make the network icon in your systray disappear, and yet you won’t be able to have a connection of any sort.
|
|
||||||
|
|
||||||
**Bonus tool: nmtui (click to expand)**
|
|
||||||
|
|
||||||
This is another method often used by system administrators. It is a text menu for managing networks right in your terminal.
|
|
||||||
|
|
||||||
```
|
|
||||||
nmtui
|
|
||||||
```
|
|
||||||
|
|
||||||
This should open up the following menu:
|
|
||||||
|
|
||||||
![nmtui Menu][5]
|
|
||||||
|
|
||||||
**Note** that in **nmtui** , you can select another option by using the **up** and **down arrow keys**.
|
|
||||||
|
|
||||||
Select **Activate a connection** :
|
|
||||||
|
|
||||||
![nmtui Menu Select "Activate a connection"][6]
|
|
||||||
|
|
||||||
Press **Enter**. This should now open the **connections** menu.
|
|
||||||
|
|
||||||
![nmtui Connections Menu][7]
|
|
||||||
|
|
||||||
Here, go ahead and select the network with a **star (*)** next to it. In my case, it’s MGEO72.
|
|
||||||
|
|
||||||
![Select your connection in the nmtui connections menu.][8]
|
|
||||||
|
|
||||||
Press **Enter**. This should **deactivate** your connection.
|
|
||||||
|
|
||||||
![nmtui Connections Menu with no active connection][9]
|
|
||||||
|
|
||||||
Select the connection you want to activate:
|
|
||||||
|
|
||||||
![Select the connection you want in the nmtui connections menu.][10]
|
|
||||||
|
|
||||||
Press **Enter**. This should reactivate the selected connection.
|
|
||||||
|
|
||||||
![nmtui Connections Menu][11]
|
|
||||||
|
|
||||||
Press **Tab** twice to select **Back** :
|
|
||||||
|
|
||||||
![Select "Back" in the nmtui connections menu.][12]
|
|
||||||
|
|
||||||
Press **Enter**. This should bring you back to the **nmtui** main menu.
|
|
||||||
|
|
||||||
![nmtui Main Menu][13]
|
|
||||||
|
|
||||||
Select **Quit** :
|
|
||||||
|
|
||||||
![nmtui Quit Main Menu][14]
|
|
||||||
|
|
||||||
This should exit the application and bring you back to your terminal.
|
|
||||||
|
|
||||||
That’s it! You have successfully restarted your network
|
|
||||||
|
|
||||||
### Restart network in Ubuntu graphically
|
|
||||||
|
|
||||||
This is, of course, the easiest way of restarting the network for Ubuntu desktop users. If this one doesn’t work, you can of course check the command line options mentioned in the previous section.
|
|
||||||
|
|
||||||
NM-applet is the system tray applet indicator for [NetworkManager][15]. That’s what we’re going to use to restart our network.
|
|
||||||
|
|
||||||
First of all, check out your top panel. You should find a network icon in your system tray (in my case, it is a Wi-Fi icon, since that’s what I use).
|
|
||||||
|
|
||||||
Go ahead and click on that icon (or the sound or battery icon). This will open up the menu. Select “Turn Off” here.
|
|
||||||
|
|
||||||
![Restart network in Ubuntu][16]Turn off your network
|
|
||||||
|
|
||||||
The network icon should now disappear from the top panel. This means the network has been successfully turned off.
|
|
||||||
|
|
||||||
Click again on your systray to reopen the menu. Select “Turn On”.
|
|
||||||
|
|
||||||
![Restarting network in Ubuntu][17]Turn the network back on
|
|
||||||
|
|
||||||
Congratulations! You have now restarted your network.
|
|
||||||
|
|
||||||
#### Bonus Tip: Refresh available network list
|
|
||||||
|
|
||||||
Suppose you are connected to a network already but you want to connect to another network. How do you refresh the WiFi to see what other networks are available? Let me show you that.
|
|
||||||
|
|
||||||
Ubuntu doesn’t have a ‘refresh wifi networks’ option directly. It’s sort of hidden.
|
|
||||||
|
|
||||||
You’ll have to open the setting menu again and this time, click on “Select Network”.
|
|
||||||
|
|
||||||
![Refresh wifi network list in Ubuntu][18]Select Network to change your WiFi connection
|
|
||||||
|
|
||||||
Now, you won’t see the list of available wireless networks immediately. When you open the networks list, it takes around 5 seconds to refresh and show up other available wireless networks.
|
|
||||||
|
|
||||||
![Select another wifi network in Ubuntu][19]Wait for around 5- seconds to see other available networks
|
|
||||||
|
|
||||||
And here, you can select the network of your choice and click connect. That’s it.
|
|
||||||
|
|
||||||
**Wrapping Up**
|
|
||||||
|
|
||||||
Restarting your network or connection is something that every Linux user has to go through at some point in their experience.
|
|
||||||
|
|
||||||
We hope that we helped you with plenty of methods for handling such issues!
|
|
||||||
|
|
||||||
What do you use to restart/handle your network? Is there something we missed? Leave us a comment below.
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://itsfoss.com/restart-network-ubuntu
|
|
||||||
|
|
||||||
作者:[Sergiu][a]
|
|
||||||
选题:[lujun9972][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://itsfoss.com/author/sergiu/
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://itsfoss.com/fix-no-wireless-network-ubuntu/
|
|
||||||
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/ubuntu-restart-network.png?resize=800%2C450&ssl=1
|
|
||||||
[3]: https://itsfoss.com/ubuntu-shortcuts/
|
|
||||||
[4]: https://itsfoss.com/basic-linux-networking-commands/
|
|
||||||
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/nmtui_menu.png?fit=800%2C602&ssl=1
|
|
||||||
[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/03/nmtui_menu_select_option.png?fit=800%2C579&ssl=1
|
|
||||||
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/nmui_connection_menu_on.png?fit=800%2C585&ssl=1
|
|
||||||
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/nmui_select_connection_on.png?fit=800%2C576&ssl=1
|
|
||||||
[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/nmui_connection_menu_off.png?fit=800%2C572&ssl=1
|
|
||||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/03/nmui_select_connection_off.png?fit=800%2C566&ssl=1
|
|
||||||
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/nmui_connection_menu_on-1.png?fit=800%2C585&ssl=1
|
|
||||||
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/nmui_connection_menu_back.png?fit=800%2C585&ssl=1
|
|
||||||
[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/nmtui_menu_select_option-1.png?fit=800%2C579&ssl=1
|
|
||||||
[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/03/nmui_menu_quit.png?fit=800%2C580&ssl=1
|
|
||||||
[15]: https://wiki.gnome.org/Projects/NetworkManager
|
|
||||||
[16]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/03/restart-network-ubuntu-1.jpg?resize=800%2C400&ssl=1
|
|
||||||
[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/03/restart-network-ubuntu-2.jpg?resize=800%2C400&ssl=1
|
|
||||||
[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/03/select-wifi-network-ubuntu.jpg?resize=800%2C400&ssl=1
|
|
||||||
[19]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/select-wifi-network-ubuntu-1.jpg?resize=800%2C400&ssl=1
|
|
||||||
[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/ubuntu-restart-network.png?fit=800%2C450&ssl=1
|
|
@ -1,171 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: ( )
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (What is 5G? How is it better than 4G?)
|
|
||||||
[#]: via: (https://www.networkworld.com/article/3203489/what-is-5g-how-is-it-better-than-4g.html#tk.rss_all)
|
|
||||||
[#]: author: (Josh Fruhlinger https://www.networkworld.com/author/Josh-Fruhlinger/)
|
|
||||||
|
|
||||||
What is 5G? How is it better than 4G?
|
|
||||||
======
|
|
||||||
|
|
||||||
### 5G networks will boost wireless throughput by a factor of 10 and may replace wired broadband. But when will they be available, and why are 5G and IoT so linked together?
|
|
||||||
|
|
||||||
![Thinkstock][1]
|
|
||||||
|
|
||||||
[5G wireless][2] is an umbrella term to describe a set of standards and technologies for a radically faster wireless internet that ideally is up to 20 times faster with 120 times less latency than 4G, setting the stage for IoT networking advances and support for new high-bandwidth applications.
|
|
||||||
|
|
||||||
## What is 5G? Technology or buzzword?
|
|
||||||
|
|
||||||
It will be years before the technology reaches its full potential worldwide, but meanwhile some 5G network services are being rolled out today. 5G is as much a marketing buzzword as a technical term, and not all services marketed as 5G are standard.
|
|
||||||
|
|
||||||
**[From Mobile World Congress:[The time of 5G is almost here][3].]**
|
|
||||||
|
|
||||||
## 5G speed vs 4G
|
|
||||||
|
|
||||||
With every new generation of wireless technology, the biggest appeal is increased speed. 5G networks have potential peak download speeds of [20 Gbps, with 10 Gbps being seen as typical][4]. That's not just faster than current 4G networks, which currently top out at around 1 Gbps, but also faster than cable internet connections that deliver broadband to many people's homes. 5G offers network speeds that rival optical-fiber connections.
|
|
||||||
|
|
||||||
Throughput alone isn't 5G's only important speed improvement; it also features a huge reduction in network latency*.* That's an important distinction: throughput measures how long it would take to download a large file, while latency is determined by network bottlenecks and delays that slow down responses in back-and-forth communication.
|
|
||||||
|
|
||||||
Latency can be difficult to quantify because it varies based on myriad network conditions, but 5G networks are capable of latency rates that are less than a millisecond in ideal conditions. Overall, 5G latency will be lower than 4G's by a factor of 60 to 120. That will make possible a number of applications such as virtual reality that delay makes impractical today.
|
|
||||||
|
|
||||||
## 5G technology
|
|
||||||
|
|
||||||
The technology underpinnings of 5G are defined by a series of standards that have been in the works for the better part of a decade. One of the most important of these is 5G New Radio, or 5G NR*,* formalized by the 3rd Generation Partnership Project, a standards organization that develops protocols for mobile telephony. 5G NR will dictate many of the ways in which consumer 5G devices will operate, and was [finalized in June of 2018][5].
|
|
||||||
|
|
||||||
**[[Take this mobile device management course from PluralSight and learn how to secure devices in your company without degrading the user experience.][6] ]**
|
|
||||||
|
|
||||||
A number of individual technologies have come together to make the speed and latency improvements of 5G possible, and below are some of the most important.
|
|
||||||
|
|
||||||
## Millimeter waves
|
|
||||||
|
|
||||||
5G networks will for the most part use frequencies in the 30 to 300 GHz range. (Wavelengths at these frequencies are between 1 and 10 millimeters, thus the name.) This high-frequency band can [carry much more information per unit of time than the lower-frequency signals][7] currently used by 4G LTE, which is generally below 1 GHz, or Wi-Fi, which tops out at 6 GHz.
|
|
||||||
|
|
||||||
Millimeter-wave technology has traditionally been expensive and difficult to deploy. Technical advances have overcome those difficulties, which is part of what's made 5G possible today.
|
|
||||||
|
|
||||||
## Small cells
|
|
||||||
|
|
||||||
One drawback of millimeter wave transmission is that it's more prone to interference than Wi-Fi or 4G signals as they pass through physical objects.
|
|
||||||
|
|
||||||
To overcome this, the model for 5G infrastructure will be different from 4G's. Instead of the large cellular-antenna masts we've come to accept as part of the landscape, 5G networks will be powered by [much smaller base stations spread throughout cities about 250 meters apart][8], creating cells of service that are also smaller.
|
|
||||||
|
|
||||||
These 5G base stations have lower power requirements than those for 4G and can be attached to buildings and utility poles more easily.
|
|
||||||
|
|
||||||
## Massive MIMO
|
|
||||||
|
|
||||||
Despite 5G base stations being much smaller than their 4G counterparts, they pack in many more antennas. These antennas are [multiple-input multiple-output (MIMO)][9], meaning that they can handle multiple two-way conversations over the same data signal simultaneously. 5G networks can handle more than [20 times more conversations in this way than 4G networks][10].
|
|
||||||
|
|
||||||
Massive MIMO promises to [radically improve on base station capacity limits][11], allowing individual base stations to have conversations with many more devices. This in particular is why 5G may drive wider adoption of IoT. In theory, a lot more internet-connected wireless gadgets will be able to be deployed in the same space without overwhelming the network.
|
|
||||||
|
|
||||||
## Beamforming
|
|
||||||
|
|
||||||
Making sure all these conversations go back and forth to the right places is tricky, especially with the aforementioned problems millimeter-wave signals have with interference. To overcome those issues, 5G stations deploy advanced beamforming techniques, which use constructive and destructive radio interference to make signals directional rather than broadcast. That effectively boosts signal strength and range in a particular direction.
|
|
||||||
|
|
||||||
## 5G availability
|
|
||||||
|
|
||||||
The first commercial 5G network was [rolled out in Qatar in May 2018][12]. Since then, networks have been popping up across the world, from Argentina to Vietnam. [Lifewire has a good, frequently updated list][13].
|
|
||||||
|
|
||||||
One thing to keep in mind, though, is that not all 5G networks deliver on all the technology's promises yet. Some early 5G offerings piggyback on existing 4G infrastructure, which reduces the potential speed gains; other services dubbed 5G for marketing purposes don't even comply with the standard. A closer look at offerings from U.S. wireless carriers will demonstrate some of the pitfalls.
|
|
||||||
|
|
||||||
## Wireless carriers and 5G
|
|
||||||
|
|
||||||
Technically, 5G is available in the U.S. today. But the caveats involved in that statement vary from carrier to carrier, demonstrating the long road that still lies ahead before 5G becomes omnipresent.
|
|
||||||
|
|
||||||
Verizon is making probably the biggest early 5G push. It announced [5G Home][14] in parts of four cities in October of 2018, a service that requires using a special 5G hotspot to connect to the network and feed it to your other devices via Wi-Fi.
|
|
||||||
|
|
||||||
Verizon planned an April rollout of a [mobile service in Minneapolis and Chicago][15], which will spread to other cities over the course of the year. Accessing the 5G network will cost customers an extra monthly fee plus what they’ll have to spend on a phone that can actually connect to it (more on that in a moment). As an added wrinkle, Verizon is deploying what it calls [5G TF][16], which doesn't match up with the 5G NR standard.
|
|
||||||
|
|
||||||
AT&T [announced the availability of 5G in 12 U.S. cities in December 2018][17], with nine more coming by the end of 2019, but even in those cities, availability is limited to the downtown areas. To use the network requires a special Netgear hotspot that connects to the service, then provides a Wi-Fi signal to phones and other devices.
|
|
||||||
|
|
||||||
Meanwhile, AT&T is also rolling out speed boosts to its 4G network, which it's dubbed 5GE even though these improvements aren't related to 5G networking. ([This is causing backlash][18].)
|
|
||||||
|
|
||||||
Sprint will have 5G service in parts of four cities by May of 2019, and five more by the end of the year. But while Sprint's 5G offering makes use of massive MIMO cells, they [aren't using millimeter-wave signals][19], meaning that Sprint users won't see as much of a speed boost as customers of other carriers.
|
|
||||||
|
|
||||||
T-Mobile is pursuing a similar model,and it [won't roll out its service until the end of 2019][20] because there won't be any phones to connect to it.
|
|
||||||
|
|
||||||
One kink that might stop a rapid spread of 5G is the need to spread out all those small-cell base stations. Their small size and low power requirements make them easier to deploy than current 4G tech in a technical sense, but that doesn't mean it's simple to convince governments and property owners to install dozens of them everywhere. Verizon actually set up a [website that you can use to petition your local elected officials][21] to speed up 5G base station deployment.
|
|
||||||
|
|
||||||
## **5G phones: When available? When to buy?**
|
|
||||||
|
|
||||||
The first major 5G phone to be announced is the Samsung Galaxy S10 5G, which should be available by the end of the summer of 2019. You can also order a "[Moto Mod][22]" from Verizon, which [transforms Moto Z3 phones into 5G-compatible device][23]s.
|
|
||||||
|
|
||||||
But unless you can't resist the lure of being an early adopter, you may wish to hold off for a bit; some of the quirks and looming questions about carrier rollout may mean that you end up with a phone that [isn't compatible with your carrier's entire 5G network][24].
|
|
||||||
|
|
||||||
One laggard that may surprise you is Apple: analysts believe that there won't be a [5G-compatible iPhone until 2020 at the earliest][25]. But this isn't out of character for the company; Apple [also lagged behind Samsung in releasing 4G-compatible phones][26] in back in 2012.
|
|
||||||
|
|
||||||
Still, the 5G flood is coming. 5G-compatible devices [dominated Barcelona's Mobile World Congress in 2019][3], so expect to have a lot more choice on the horizon.
|
|
||||||
|
|
||||||
## Why are people talking about 6G already?
|
|
||||||
|
|
||||||
Some experts say [5G won’t be able to meet the latency and reliability targets][27] it is shooting for. These skeptics are already looking ahead to 6G, which they say will try to address these projected shortcomings.
|
|
||||||
|
|
||||||
There is [a group that is researching new technologies that can be rolled into 6G][28] that calls itself
|
|
||||||
|
|
||||||
The Center for Converged TeraHertz Communications and Sensing (ComSenTer). Part of the spec they’re working on calls for 100Gbps speed for every device.
|
|
||||||
|
|
||||||
In addition to adding reliability, overcoming reliability and boosting speed, 6G is also trying to enable thousands of simultaneous connections. If successful, this feature could help to network IoT devices, which can be deployed in the thousands as sensors in a variety of industrial settings.
|
|
||||||
|
|
||||||
Even in its embryonic form, 6G may already be facing security concerns due to the emergence of newly discovered [potential for man-in-the-middle attacks in tera-hertz based networks][29]. The good news is that there’s plenty of time to find solutions to the problem. 6G networks aren’t expected to start rolling out until 2030.
|
|
||||||
|
|
||||||
**More about 5g networks:**
|
|
||||||
|
|
||||||
* [How enterprises can prep for 5G networks][30]
|
|
||||||
* [5G vs 4G: How speed, latency and apps support differ][31]
|
|
||||||
* [Private 5G networks are coming][32]
|
|
||||||
* [5G and 6G wireless have security issues][33]
|
|
||||||
* [How millimeter-wave wireless could help support 5G and IoT][34]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Join the Network World communities on [Facebook][35] and [LinkedIn][36] to comment on topics that are top of mind.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://www.networkworld.com/article/3203489/what-is-5g-how-is-it-better-than-4g.html#tk.rss_all
|
|
||||||
|
|
||||||
作者:[Josh Fruhlinger][a]
|
|
||||||
选题:[lujun9972][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://www.networkworld.com/author/Josh-Fruhlinger/
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://images.techhive.com/images/article/2017/04/5g-100718139-large.jpg
|
|
||||||
[2]: https://www.networkworld.com/article/3203489/what-is-5g-wireless-networking-benefits-standards-availability-versus-lte.html
|
|
||||||
[3]: https://www.networkworld.com/article/3354477/mobile-world-congress-the-time-of-5g-is-almost-here.html
|
|
||||||
[4]: https://www.networkworld.com/article/3330603/5g-versus-4g-how-speed-latency-and-application-support-differ.html
|
|
||||||
[5]: https://www.theverge.com/2018/6/15/17467734/5g-nr-standard-3gpp-standalone-finished
|
|
||||||
[6]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fmobile-device-management-big-picture
|
|
||||||
[7]: https://www.networkworld.com/article/3291323/millimeter-wave-wireless-could-help-support-5g-and-iot.html
|
|
||||||
[8]: https://spectrum.ieee.org/video/telecom/wireless/5g-bytes-small-cells-explained
|
|
||||||
[9]: https://www.networkworld.com/article/3250268/what-is-mu-mimo-and-why-you-need-it-in-your-wireless-routers.html
|
|
||||||
[10]: https://spectrum.ieee.org/tech-talk/telecom/wireless/5g-researchers-achieve-new-spectrum-efficiency-record
|
|
||||||
[11]: https://www.networkworld.com/article/3262991/future-wireless-networks-will-have-no-capacity-limits.html
|
|
||||||
[12]: https://venturebeat.com/2018/05/14/worlds-first-commercial-5g-network-launches-in-qatar/
|
|
||||||
[13]: https://www.lifewire.com/5g-availability-world-4156244
|
|
||||||
[14]: https://www.digitaltrends.com/computing/verizon-5g-home-promises-up-to-gigabit-internet-speeds-for-50/
|
|
||||||
[15]: https://lifehacker.com/heres-your-cheat-sheet-for-verizons-new-5g-data-plans-1833278817
|
|
||||||
[16]: https://www.theverge.com/2018/10/2/17927712/verizon-5g-home-internet-real-speed-meaning
|
|
||||||
[17]: https://www.cnn.com/2018/12/18/tech/5g-mobile-att/index.html
|
|
||||||
[18]: https://www.networkworld.com/article/3339720/like-4g-before-it-5g-is-being-hyped.html?nsdr=true
|
|
||||||
[19]: https://www.digitaltrends.com/mobile/sprint-5g-rollout/
|
|
||||||
[20]: https://www.cnet.com/news/t-mobile-delays-full-600-mhz-5g-launch-until-second-half/
|
|
||||||
[21]: https://lets5g.com/
|
|
||||||
[22]: https://www.verizonwireless.com/support/5g-moto-mod-faqs/?AID=11365093&SID=100098X1555750Xbc2e857934b22ebca1a0570d5ba93b7c&vendorid=CJM&PUBID=7105813&cjevent=2e2150cb478c11e98183013b0a1c0e0c
|
|
||||||
[23]: https://www.digitaltrends.com/cell-phone-reviews/moto-z3-review/
|
|
||||||
[24]: https://www.businessinsider.com/samsung-galaxy-s10-5g-which-us-cities-have-5g-networks-2019-2
|
|
||||||
[25]: https://www.cnet.com/news/why-apples-in-no-rush-to-sell-you-a-5g-iphone/
|
|
||||||
[26]: https://mashable.com/2012/09/09/iphone-5-4g-lte/#hYyQUelYo8qq
|
|
||||||
[27]: https://www.networkworld.com/article/3305359/6g-will-achieve-terabits-per-second-speeds.html
|
|
||||||
[28]: https://www.networkworld.com/article/3285112/get-ready-for-upcoming-6g-wireless-too.html
|
|
||||||
[29]: https://www.networkworld.com/article/3315626/5g-and-6g-wireless-technologies-have-security-issues.html
|
|
||||||
[30]: https://%20https//www.networkworld.com/article/3306720/mobile-wireless/how-enterprises-can-prep-for-5g.html
|
|
||||||
[31]: https://%20https//www.networkworld.com/article/3330603/mobile-wireless/5g-versus-4g-how-speed-latency-and-application-support-differ.html
|
|
||||||
[32]: https://%20https//www.networkworld.com/article/3319176/mobile-wireless/private-5g-networks-are-coming.html
|
|
||||||
[33]: https://www.networkworld.com/article/3315626/network-security/5g-and-6g-wireless-technologies-have-security-issues.html
|
|
||||||
[34]: https://www.networkworld.com/article/3291323/mobile-wireless/millimeter-wave-wireless-could-help-support-5g-and-iot.html
|
|
||||||
[35]: https://www.facebook.com/NetworkWorld/
|
|
||||||
[36]: https://www.linkedin.com/company/network-world
|
|
@ -1,91 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: ( )
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (Command line quick tips: Cutting content out of files)
|
|
||||||
[#]: via: (https://fedoramagazine.org/command-line-quick-tips-cutting-content-out-of-files/)
|
|
||||||
[#]: author: (Stephen Snow https://fedoramagazine.org/author/jakfrost/)
|
|
||||||
|
|
||||||
Command line quick tips: Cutting content out of files
|
|
||||||
======
|
|
||||||
|
|
||||||
![][1]
|
|
||||||
|
|
||||||
The Fedora distribution is a full featured operating system with an excellent graphical desktop environment. A user can point and click their way through just about any typical task easily. All of this wonderful ease of use masks the details of a powerful command line under the hood. This article is part of a series that shows you some common command line utilities. So let’s drop into the shell, and have a look at **cut**.
|
|
||||||
|
|
||||||
Often when you work in the command line, you are working with text files. Sometimes these files may be quite long. Reading them in their entirety, while feasible, can be time consuming and prone to errors. In this installment you’ll learn how to extract content from text files, and get the information you want from them.
|
|
||||||
|
|
||||||
It’s important to recognize that there are many ways to accomplish similar command line tasks in Fedora. The Fedora repositories include entire language systems for parsing and working with text, as an example. Also, there are multiple command line utilities available for just about any purpose conceivable in the shell. This article will only focus on using a few of those utility choices, to extract some information from a file and present it in a readable format.
|
|
||||||
|
|
||||||
### Making the cut
|
|
||||||
|
|
||||||
To illustrate this example use a standard sizable file on the system like _/etc/passwd_. As seen in a prior article in this series, you can execute the _cat_ command to view an entire file:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ cat /etc/passwd
|
|
||||||
root:x:0:0:root:/root:/bin/bash
|
|
||||||
bin:x:1:1:bin:/bin:/sbin/nologin
|
|
||||||
daemon:x:2:2:daemon:/sbin:/sbin/nologin
|
|
||||||
adm:x:3:4:adm:/var/adm:/sbin/nologin
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
This file contains information on all accounts present on the system. It has a specific format:
|
|
||||||
|
|
||||||
```
|
|
||||||
name:password:user-id:group-id:comment:home-directory:shell
|
|
||||||
```
|
|
||||||
|
|
||||||
Imagine that you want to simply have a list of all the account names on the system. If you could only cut out the _name_ value from each line. This is where the _cut_ command comes in handy! This command treats any input one line at a time, and extracts a specific part of the line.
|
|
||||||
|
|
||||||
The _cut_ command provides options for selecting parts of a line differently, and in this example two of them are needed, _-d_ which is an option to specify a delimiter type to use, and _-f_ which is an option to specify which field of the line to cut. The _-d_ option lets you declare the _delimiter_ that separates values in a line. In this case a colon (:) is used to separate values. The _-f_ option lets you choose which field value or values to extract. So for this example the command entered would be:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ cut -d: -f1 /etc/passwd
|
|
||||||
root
|
|
||||||
bin
|
|
||||||
daemon
|
|
||||||
adm
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
That’s great, it worked! But you get the printout to the standard output, which in a terminal session at least means the screen. What if you needed the information for another task to be done later? It would be really nice if there was a way to put the output of the _cut_ command into a text file to save it. There is an easy builtin shell function for such a task, the redirect function ( _>_ ).
|
|
||||||
|
|
||||||
```
|
|
||||||
$ cut -d: -f1 /etc/passwd > names.txt
|
|
||||||
```
|
|
||||||
|
|
||||||
This will place the output of cut into a file called _names.txt_ and you can check the contents with _cat:_
|
|
||||||
|
|
||||||
```
|
|
||||||
$ cat names.txt
|
|
||||||
root
|
|
||||||
bin
|
|
||||||
daemon
|
|
||||||
adm
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
With two commands and one shell function, it was easy to identify using _cat_ , extract using _cut_ , and redirect the extracted information from one file, saving it to another file for later use.
|
|
||||||
|
|
||||||
* * *
|
|
||||||
|
|
||||||
_Photo by _[ _Joel Mbugua_][2]_ on _[_Unsplash_][3]_._
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://fedoramagazine.org/command-line-quick-tips-cutting-content-out-of-files/
|
|
||||||
|
|
||||||
作者:[Stephen Snow][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/jakfrost/
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://fedoramagazine.org/wp-content/uploads/2019/04/commandline-cutting-816x345.jpg
|
|
||||||
[2]: https://unsplash.com/photos/tA5eSY_hay8?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
|
||||||
[3]: https://unsplash.com/search/photos/command-line?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
|
@ -1,262 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: (arrowfeng)
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (How To Install And Configure NTP Server And NTP Client In Linux?)
|
|
||||||
[#]: via: (https://www.2daygeek.com/install-configure-ntp-server-ntp-client-in-linux/)
|
|
||||||
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
|
|
||||||
|
|
||||||
How To Install And Configure NTP Server And NTP Client In Linux?
|
|
||||||
======
|
|
||||||
|
|
||||||
You might heard this word many times and also you might had worked on this.
|
|
||||||
|
|
||||||
However, i will tell you clearly in this article about NTP Server setup and NTP Client setup
|
|
||||||
|
|
||||||
We will see about **[Chrony NTP Client setup][1]** later.
|
|
||||||
|
|
||||||
### What Is NTP Server?
|
|
||||||
|
|
||||||
NTP stands for Network Time Protocol.
|
|
||||||
|
|
||||||
It is a networking protocol that synchronize the clock between computer systems over the network.
|
|
||||||
|
|
||||||
In other hand I can say. It will keep the same time (It keep an accurate time) to all the systems which are connected to NTP server through NTP or Chrony client.
|
|
||||||
|
|
||||||
NTP can usually maintain time to within tens of milliseconds over the public Internet, and can achieve better than one millisecond accuracy in local area networks under ideal conditions.
|
|
||||||
|
|
||||||
It uses User Datagram Protocol (UDP) on port number 123 for send and receive timestamps. It’s a client/server application.
|
|
||||||
|
|
||||||
It send and receive timestamps using the User Datagram Protocol (UDP) on port number 123.
|
|
||||||
|
|
||||||
### What Is NTP Client?
|
|
||||||
|
|
||||||
NTP client will synchronize its clock to the network time server.
|
|
||||||
|
|
||||||
### What Is Chrony Client?
|
|
||||||
|
|
||||||
Chrony is replacement of NTP client. It can synchronize the system clock faster with better time accuracy and it can be particularly useful for the systems which are not online all the time.
|
|
||||||
|
|
||||||
### Why We Need NTP Server?
|
|
||||||
|
|
||||||
To keep all the servers in your organization in-sync with an accurate time to perform time based jobs.
|
|
||||||
|
|
||||||
To clarify this, I will tell you a scenario. Say for example, we have two servers (Server1 and Server2). The server1 usually complete the batch jobs at 10:55 then the server2 needs to run another job at 11:00 based on the server1 job completion report.
|
|
||||||
|
|
||||||
If both the system is using in a different time (if one system is ahead of the others, the others are behind that particular one) then we can’t perform this. To achieve this, we should setup NTP. Hope it cleared your doubts about NTP.
|
|
||||||
|
|
||||||
In this article, we are going to use the following setup to test this.
|
|
||||||
|
|
||||||
* **`NTP Server:`** HostName: CentOS7.2daygeek.com, IP:192.168.1.8, OS:CentOS 7
|
|
||||||
* **`NTP Client:`** HostName: Ubuntu18.2daygeek.com, IP:192.168.1.5, OS:Ubuntu 18.04
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### NTP SERVER SIDE: How To Install NTP Server In Linux?
|
|
||||||
|
|
||||||
There is no different packages for NTP server and NTP client since it’s a client/server model. The NTP package is available in distribution official repository so, use the distribution package manger to install it.
|
|
||||||
|
|
||||||
For **`Fedora`** system, use **[DNF Command][2]** to install ntp.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo dnf install ntp
|
|
||||||
```
|
|
||||||
|
|
||||||
For **`Debian/Ubuntu`** systems, use **[APT-GET Command][3]** or **[APT Command][4]** to install ntp.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo apt install ntp
|
|
||||||
```
|
|
||||||
|
|
||||||
For **`Arch Linux`** based systems, use **[Pacman Command][5]** to install ntp.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo pacman -S ntp
|
|
||||||
```
|
|
||||||
|
|
||||||
For **`RHEL/CentOS`** systems, use **[YUM Command][6]** to install ntp.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo yum install ntp
|
|
||||||
```
|
|
||||||
|
|
||||||
For **`openSUSE Leap`** system, use **[Zypper Command][7]** to install ntp.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo zypper install ntp
|
|
||||||
```
|
|
||||||
|
|
||||||
### How To Configure The NTP Server In Linux?
|
|
||||||
|
|
||||||
Once you have installed the NTP package, make sure you have to uncomment the following configuration in the `/etc/ntp.conf` file on server side.
|
|
||||||
|
|
||||||
By default the NTP server configuration relies on `X.distribution_name.pool.ntp.org`. If you want you can use the default configuration or you can change it as per your location (country specific) by visiting <https://www.ntppool.org/zone/@> site.
|
|
||||||
|
|
||||||
Say for example. If you are in India then your NTP server will be `0.in.pool.ntp.org` and it will work for most of the countries.
|
|
||||||
|
|
||||||
```
|
|
||||||
# vi /etc/ntp.conf
|
|
||||||
|
|
||||||
restrict default kod nomodify notrap nopeer noquery
|
|
||||||
restrict -6 default kod nomodify notrap nopeer noquery
|
|
||||||
restrict 127.0.0.1
|
|
||||||
restrict -6 ::1
|
|
||||||
server 0.asia.pool.ntp.org
|
|
||||||
server 1.asia.pool.ntp.org
|
|
||||||
server 2.asia.pool.ntp.org
|
|
||||||
server 3.asia.pool.ntp.org
|
|
||||||
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
|
|
||||||
driftfile /var/lib/ntp/drift
|
|
||||||
keys /etc/ntp/keys
|
|
||||||
```
|
|
||||||
|
|
||||||
We have allowed only `192.168.1.0/24` subnet clients to access the NTP server.
|
|
||||||
|
|
||||||
Since firewall is enabled by default on RHEL 7 based distributions so, allow the ntp server/service.
|
|
||||||
|
|
||||||
```
|
|
||||||
# firewall-cmd --add-service=ntp --permanent
|
|
||||||
# firewall-cmd --reload
|
|
||||||
```
|
|
||||||
|
|
||||||
Bounce the service once you update the configuration.
|
|
||||||
|
|
||||||
For sysvinit systems. For Debian based system we need to run `ntp` instead of ntpd.
|
|
||||||
|
|
||||||
```
|
|
||||||
# service ntpd restart
|
|
||||||
|
|
||||||
# chkconfig ntpd on
|
|
||||||
```
|
|
||||||
|
|
||||||
For systemctl systems. For Debian based system we need to run `ntp` instead of ntpd.
|
|
||||||
|
|
||||||
```
|
|
||||||
# systemctl restart ntpd
|
|
||||||
|
|
||||||
# systemctl enable ntpd
|
|
||||||
```
|
|
||||||
|
|
||||||
### NTP CLIENT SIDE: How To Install NTP Client On Linux?
|
|
||||||
|
|
||||||
As I mentioned earlier in this article. There is no specific package for NTP server and client. So, install the same package on client also.
|
|
||||||
|
|
||||||
For **`Fedora`** system, use **[DNF Command][2]** to install ntp.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo dnf install ntp
|
|
||||||
```
|
|
||||||
|
|
||||||
For **`Debian/Ubuntu`** systems, use **[APT-GET Command][3]** or **[APT Command][4]** to install ntp.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo apt install ntp
|
|
||||||
```
|
|
||||||
|
|
||||||
For **`Arch Linux`** based systems, use **[Pacman Command][5]** to install ntp.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo pacman -S ntp
|
|
||||||
```
|
|
||||||
|
|
||||||
For **`RHEL/CentOS`** systems, use **[YUM Command][6]** to install ntp.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo yum install ntp
|
|
||||||
```
|
|
||||||
|
|
||||||
For **`openSUSE Leap`** system, use **[Zypper Command][7]** to install ntp.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo zypper install ntp
|
|
||||||
```
|
|
||||||
|
|
||||||
I have installed and configured the NTP server on `CentOS7.2daygeek.com` so, append the same into all the client machines.
|
|
||||||
|
|
||||||
```
|
|
||||||
# vi /etc/ntp.conf
|
|
||||||
|
|
||||||
restrict default kod nomodify notrap nopeer noquery
|
|
||||||
restrict -6 default kod nomodify notrap nopeer noquery
|
|
||||||
restrict 127.0.0.1
|
|
||||||
restrict -6 ::1
|
|
||||||
server CentOS7.2daygeek.com prefer iburst
|
|
||||||
driftfile /var/lib/ntp/drift
|
|
||||||
keys /etc/ntp/keys
|
|
||||||
```
|
|
||||||
|
|
||||||
Bounce the service once you update the configuration.
|
|
||||||
|
|
||||||
For sysvinit systems. For Debian based system we need to run `ntp` instead of ntpd.
|
|
||||||
|
|
||||||
```
|
|
||||||
# service ntpd restart
|
|
||||||
|
|
||||||
# chkconfig ntpd on
|
|
||||||
```
|
|
||||||
|
|
||||||
For systemctl systems. For Debian based system we need to run `ntp` instead of ntpd.
|
|
||||||
|
|
||||||
```
|
|
||||||
# systemctl restart ntpd
|
|
||||||
|
|
||||||
# systemctl enable ntpd
|
|
||||||
```
|
|
||||||
|
|
||||||
Wait for few minutes post restart of the NTP service to get synchronize time from the NTP server.
|
|
||||||
|
|
||||||
Run the following commands to verify the NTP server synchronization status on Linux.
|
|
||||||
|
|
||||||
```
|
|
||||||
# ntpq –p
|
|
||||||
Or
|
|
||||||
# ntpq -pn
|
|
||||||
|
|
||||||
remote refid st t when poll reach delay offset jitter
|
|
||||||
==============================================================================
|
|
||||||
*CentOS7.2daygee 133.243.238.163 2 u 14 64 37 0.686 0.151 16.432
|
|
||||||
```
|
|
||||||
|
|
||||||
Run the following command to get the current status of ntpd.
|
|
||||||
|
|
||||||
```
|
|
||||||
# ntpstat
|
|
||||||
synchronised to NTP server (192.168.1.8) at stratum 3
|
|
||||||
time correct to within 508 ms
|
|
||||||
polling server every 64 s
|
|
||||||
```
|
|
||||||
|
|
||||||
Finally run the `date` command.
|
|
||||||
|
|
||||||
```
|
|
||||||
# date
|
|
||||||
Tue Mar 26 23:17:05 CDT 2019
|
|
||||||
```
|
|
||||||
|
|
||||||
If you are observing a significant offset in the NTP output. Run the following command to sync clock manually from the NTP server. Make sure that your NTP client should be inactive state when you perform the command.
|
|
||||||
|
|
||||||
```
|
|
||||||
# ntpdate –uv CentOS7.2daygeek.com
|
|
||||||
```
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://www.2daygeek.com/install-configure-ntp-server-ntp-client-in-linux/
|
|
||||||
|
|
||||||
作者:[Magesh Maruthamuthu][a]
|
|
||||||
选题:[lujun9972][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://www.2daygeek.com/author/magesh/
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://www.2daygeek.com/configure-ntp-client-using-chrony-in-linux/
|
|
||||||
[2]: https://www.2daygeek.com/dnf-command-examples-manage-packages-fedora-system/
|
|
||||||
[3]: https://www.2daygeek.com/apt-get-apt-cache-command-examples-manage-packages-debian-ubuntu-systems/
|
|
||||||
[4]: https://www.2daygeek.com/apt-command-examples-manage-packages-debian-ubuntu-systems/
|
|
||||||
[5]: https://www.2daygeek.com/pacman-command-examples-manage-packages-arch-linux-system/
|
|
||||||
[6]: https://www.2daygeek.com/yum-command-examples-manage-packages-rhel-centos-systems/
|
|
||||||
[7]: https://www.2daygeek.com/zypper-command-examples-manage-packages-opensuse-system/
|
|
@ -1,135 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: ( )
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (Installing Ubuntu MATE on a Raspberry Pi)
|
|
||||||
[#]: via: (https://itsfoss.com/ubuntu-mate-raspberry-pi/)
|
|
||||||
[#]: author: (Chinmay https://itsfoss.com/author/chinmay/)
|
|
||||||
|
|
||||||
Installing Ubuntu MATE on a Raspberry Pi
|
|
||||||
======
|
|
||||||
|
|
||||||
_**Brief: This quick tutorial shows you how to install Ubuntu MATE on Raspberry Pi devices.**_
|
|
||||||
|
|
||||||
[Raspberry Pi][1] is by far the most popular SBC (Single Board Computer) and the go-to board for makers. [Raspbian][2] which is based on Debian is the official operating system for the Pi. It is lightweight, comes bundled with educational tools and gets the job done for most scenarios.
|
|
||||||
|
|
||||||
[Installing Raspbian][3] is easy as well but the problem with [Debian][4] is its slow upgrade cycles and older packages.
|
|
||||||
|
|
||||||
Running Ubuntu on the Raspberry Pi gives you a richer experience and up to date software. We have a few options when it comes to running Ubuntu on your Pi.
|
|
||||||
|
|
||||||
1. [Ubuntu MATE][5] : Ubuntu MATE is the only distribution which natively supports the Raspberry Pi with a complete desktop environment.
|
|
||||||
2. [Ubuntu Server 18.04][6] \+ Installing a desktop environment manually.
|
|
||||||
3. Using Images built by the [Ubuntu Pi Flavor Maker][7] community, _these images only support the Raspberry Pi 2B and 3B variants_ and are **not** updated to the latest LTS release.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
The first option is the easiest and the quickest to set up while the second option gives you the freedom to install the desktop environment of your choice. I recommend going with either of the first two options.
|
|
||||||
|
|
||||||
Here are the links to download the Disc Images. In this article I’ll be covering Ubuntu MATE installation only.
|
|
||||||
|
|
||||||
### Installing Ubuntu MATE on Raspberry Pi
|
|
||||||
|
|
||||||
Go to the download page of Ubuntu MATE and get the recommended images.
|
|
||||||
|
|
||||||
![][8]
|
|
||||||
|
|
||||||
The experimental ARM64 version should only be used if you need to run 64-bit only applications like MongoDB on a Raspberry Pi server.
|
|
||||||
|
|
||||||
[Download Ubuntu MATE for Raspberry Pi][9]
|
|
||||||
|
|
||||||
#### Step 1: Setting Up the SD Card
|
|
||||||
|
|
||||||
The image file needs to be decompressed once downloaded. You can simply right click on it to extract it.
|
|
||||||
|
|
||||||
Alternatively, the following command will do the job.
|
|
||||||
|
|
||||||
```
|
|
||||||
xz -d ubuntu-mate***.img.xz
|
|
||||||
```
|
|
||||||
|
|
||||||
Alternatively you can use [7-zip][10] if you are on Windows.
|
|
||||||
|
|
||||||
Install **[Balena Etcher][11]** , we’ll use this tool to write the image to the SD card. Make sure that your SD card is at least 8 GB capacity.
|
|
||||||
|
|
||||||
Launch Etcher and select the image file and your SD card.
|
|
||||||
|
|
||||||
![][12]
|
|
||||||
|
|
||||||
Once the flashing process is complete the SD card is ready.
|
|
||||||
|
|
||||||
#### Step 2: Setting Up the Raspberry Pi
|
|
||||||
|
|
||||||
You probably already know that you need a few things to get started with Raspberry Pi such as a mouse, keyboard, HDMI cable etc. You can also [install Raspberry Pi headlessly without keyboard and mouse][13] but this tutorial is not about that.
|
|
||||||
|
|
||||||
* Plug in a mouse and a keyboard.
|
|
||||||
* Connect the HDMI cable.
|
|
||||||
* Insert the SD card into the SD card slot.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Power it on by plugging in the power cable. Make sure you have a good power supply (5V, 3A minimum). A bad power supply can reduce the performance.
|
|
||||||
|
|
||||||
#### Ubuntu MATE installation
|
|
||||||
|
|
||||||
Once you power on the Raspberry Pi, you’ll be greeted with a very familiar Ubuntu installation process. The process is pretty much straight forward from here.
|
|
||||||
|
|
||||||
![Select your keyboard layout][14]
|
|
||||||
|
|
||||||
![Select Your Timezone][15]
|
|
||||||
|
|
||||||
Select your WiFi network and enter the password in the network connection screen.
|
|
||||||
|
|
||||||
![Add Username and Password][16]
|
|
||||||
|
|
||||||
After setting the keyboard layout, timezone and user credentials you’ll be taken to the login screen after a few minutes. And voila! you are almost done.
|
|
||||||
|
|
||||||
![][17]
|
|
||||||
|
|
||||||
Once logged in, the first thing you should do is to [update Ubuntu][18]. You can use the command line for that.
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo apt update
|
|
||||||
sudo apt upgrade
|
|
||||||
```
|
|
||||||
|
|
||||||
You can also use the Software Updater.
|
|
||||||
|
|
||||||
![][19]
|
|
||||||
|
|
||||||
Once the updates are finished installing you are good to go. You can also go ahead and install Raspberry Pi specific packages for GPIO and other I/O depending on your needs.
|
|
||||||
|
|
||||||
What made you think about installing Ubuntu on the Raspberry and how has your experience been with Raspbian? Let me know in the comments below.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://itsfoss.com/ubuntu-mate-raspberry-pi/
|
|
||||||
|
|
||||||
作者:[Chinmay][a]
|
|
||||||
选题:[lujun9972][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://itsfoss.com/author/chinmay/
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://www.raspberrypi.org/
|
|
||||||
[2]: https://www.raspberrypi.org/downloads/
|
|
||||||
[3]: https://itsfoss.com/tutorial-how-to-install-raspberry-pi-os-raspbian-wheezy/
|
|
||||||
[4]: https://www.debian.org/
|
|
||||||
[5]: https://ubuntu-mate.org/
|
|
||||||
[6]: https://wiki.ubuntu.com/ARM/RaspberryPi#Recovering_a_system_using_the_generic_kernel
|
|
||||||
[7]: https://ubuntu-pi-flavour-maker.org/download/
|
|
||||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/04/ubuntu-mate-raspberry-pi-download.jpg?ssl=1
|
|
||||||
[9]: https://ubuntu-mate.org/download/
|
|
||||||
[10]: https://www.7-zip.org/download.html
|
|
||||||
[11]: https://www.balena.io/etcher/
|
|
||||||
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/04/Screenshot-from-2019-04-08-01-36-16.png?ssl=1
|
|
||||||
[13]: https://linuxhandbook.com/raspberry-pi-headless-setup/
|
|
||||||
[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/Keyboard-layout-ubuntu.jpg?fit=800%2C467&ssl=1
|
|
||||||
[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/select-time-zone-ubuntu.jpg?fit=800%2C468&ssl=1
|
|
||||||
[16]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/Credentials-ubuntu.jpg?fit=800%2C469&ssl=1
|
|
||||||
[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/Desktop-ubuntu.jpg?fit=800%2C600&ssl=1
|
|
||||||
[18]: https://itsfoss.com/update-ubuntu/
|
|
||||||
[19]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/04/update-software.png?ssl=1
|
|
@ -1,36 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: (geekpi)
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (What's your primary backup strategy for the /home directory in Linux?)
|
|
||||||
[#]: via: (https://opensource.com/poll/19/4/backup-strategy-home-directory-linux)
|
|
||||||
[#]: author: ( https://opensource.com/users/dboth/users/don-watkins/users/greg-p)
|
|
||||||
|
|
||||||
What's your primary backup strategy for the /home directory in Linux?
|
|
||||||
======
|
|
||||||
|
|
||||||
![Linux keys on the keyboard for a desktop computer][1]
|
|
||||||
|
|
||||||
I frequently upgrade to newer releases of Fedora, which is my primary distribution. I also upgrade other distros but much less frequently. I have also had many crashes of various types over the years, including a large portion of self-inflicted ones. Past experience with data loss has made me very aware of the need for good backups.
|
|
||||||
|
|
||||||
I back up many parts of my Linux hosts but my **/home** directory is especially important. Losing any of the data in **/home** on my primary workstation due to a crash or an upgrade could be disastrous.
|
|
||||||
|
|
||||||
My backup strategy for **/home** is to back up everything every day. There are other things on every Linux system to back up but **/home **is the center of everything I do on my workstation. I keep my documents and financial records there as well as off-line emails, address books for different apps, calendar and task data, and most importantly for me these days, the working copies of my next two Linux books.
|
|
||||||
|
|
||||||
I can think of a number of approaches to doing backups and restores of **/home** which would allow an easy and complete recovery after a data loss ranging from a single file to the entire directory. Which approach do you take? Which tools do you use?
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://opensource.com/poll/19/4/backup-strategy-home-directory-linux
|
|
||||||
|
|
||||||
作者:[][a]
|
|
||||||
选题:[lujun9972][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://opensource.com/users/dboth/users/don-watkins/users/greg-p
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_keyboard_desktop.png?itok=I2nGw78_ (Linux keys on the keyboard for a desktop computer)
|
|
@ -1,354 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: ( )
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (12 Single Board Computers: Alternative to Raspberry Pi)
|
|
||||||
[#]: via: (https://itsfoss.com/raspberry-pi-alternatives/)
|
|
||||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
|
||||||
|
|
||||||
12 Single Board Computers: Alternative to Raspberry Pi
|
|
||||||
======
|
|
||||||
|
|
||||||
_**Brief: Looking for a Raspberry Pi alternative? Here are some other single board computers to satisfy your DIY cravings.**_
|
|
||||||
|
|
||||||
Raspberry Pi is the most popular single board computer right now. You can use it for your DIY projects or can use it as a cost effective system to learn coding or maybe utilize a [media server software][1] on it to stream media at your convenience.
|
|
||||||
|
|
||||||
You can do a lot of things with Raspberry Pi but it is not the ultimate solution for all kinds of tinkerers. Some might be looking for a cheaper board and some might be on the lookout for a powerful one.
|
|
||||||
|
|
||||||
Whatever be the case, we do need Raspberry Pi alternatives for a variety of reasons. So, in this article, we will talk about the best ten single board computers that we think are the best Raspberry Pi alternatives.
|
|
||||||
|
|
||||||
![][2]
|
|
||||||
|
|
||||||
### Raspberry Pi alternatives to satisfy your DIY craving
|
|
||||||
|
|
||||||
The list is in no particular order of ranking. Some of the links here are affiliate links. Please read our [affiliate policy][3].
|
|
||||||
|
|
||||||
#### 1\. Onion Omega2+
|
|
||||||
|
|
||||||
![][4]
|
|
||||||
|
|
||||||
For just **$13** , the Omega2+ is one of the cheapest IoT single board computers you can find out there. It runs on LEDE (Linux Embedded Development Environment) Linux OS – a distribution based on [OpenWRT][5].
|
|
||||||
|
|
||||||
Its form factor, cost, and the flexibility that comes from running a customized version of Linux OS makes it a perfect fit for almost any type of IoT applications.
|
|
||||||
|
|
||||||
You can find [Onion Omega kit on Amazon][6] or order from their own website that would cost you extra shipping charges.
|
|
||||||
|
|
||||||
**Key Specifications**
|
|
||||||
|
|
||||||
* MT7688 SoC
|
|
||||||
* 2.4 GHz IEEE 802.11 b/g/n WiFi
|
|
||||||
* 128 MB DDR2 RAM
|
|
||||||
* 32 MB on-board flash storage
|
|
||||||
* MicroSD Slot
|
|
||||||
* USB 2.0
|
|
||||||
* 12 GPIO Pins
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[Visit WEBSITE
|
|
||||||
][7]
|
|
||||||
|
|
||||||
#### 2\. NVIDIA Jetson Nano Developer Kit
|
|
||||||
|
|
||||||
![][8]
|
|
||||||
|
|
||||||
This is a very unique and interesting Raspberry Pi alternative from NVIDIA for just **$99**. Yes, it’s not something that everyone can make use of – but for a specific group of tinkerers or developers.
|
|
||||||
|
|
||||||
NVIDIA explains it for the following use-case:
|
|
||||||
|
|
||||||
> NVIDIA® Jetson Nano™ Developer Kit is a small, powerful computer that lets you run multiple neural networks in parallel for applications like image classification, object detection, segmentation, and speech processing. All in an easy-to-use platform that runs in as little as 5 watts.
|
|
||||||
>
|
|
||||||
> nvidia
|
|
||||||
|
|
||||||
So, basically, if you are into AI and deep learning, you can make use of the developer kit. If you are curious, the production compute module of this will be arriving in June 2019.
|
|
||||||
|
|
||||||
**Key Specifications:**
|
|
||||||
|
|
||||||
* CPU: Quad-core ARM A57 @ 1.43 GHz
|
|
||||||
* GPU: 128-core Maxwell
|
|
||||||
* RAM: 4 GB 64-bit LPDDR4 25.6 GB/s
|
|
||||||
* Display: HDMI 2.0
|
|
||||||
* 4 x USB 3.0 and eDP 1.4
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[VISIT WEBSITE
|
|
||||||
][9]
|
|
||||||
|
|
||||||
#### 3\. ASUS Tinker Board S
|
|
||||||
|
|
||||||
![][10]
|
|
||||||
|
|
||||||
ASUS Tinker Board S isn’t the most affordable Raspberry Pi alternative at **$82** (on [Amazon][11]) but it is a powerful alternative. It features the same 40-pin connector that you’d normally find in the standard Raspberry Pi 3 Model but offers a powerful processor and a GPU.Also, the size of the Tinker Board S is exactly the same as a standard Raspberry Pi 3.
|
|
||||||
|
|
||||||
The main highlight of this board is the presence of 16 GB [eMMC][12] (in layman terms, it has got SSD-like storage on board that makes it faster while working on it).
|
|
||||||
|
|
||||||
**Key Specifications:**
|
|
||||||
|
|
||||||
* Rockchip Quad-Core RK3288 processor
|
|
||||||
* 2 GB DDR3 RAM
|
|
||||||
* Integrated Graphics Processor
|
|
||||||
* ARM® Mali™-T764 GPU
|
|
||||||
* 16 GB eMMC
|
|
||||||
* MicroSD Card Slot
|
|
||||||
* 802.11 b/g/n, Bluetooth V4.0 + EDR
|
|
||||||
* USB 2.0
|
|
||||||
* 28 GPIO pins
|
|
||||||
* HDMI Interface
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[Visit website
|
|
||||||
][13]
|
|
||||||
|
|
||||||
#### 4\. ClockworkPi
|
|
||||||
|
|
||||||
![][14]
|
|
||||||
|
|
||||||
Clockwork Pi is usually a part of the [GameShell Kit][15] if you are looking to assemble a modular retro gaming console. However, you can purchase the board separately for $49.
|
|
||||||
|
|
||||||
Its compact size, WiFi connectivity, and the presence of micro HDMI port make it a great choice for a lot of things.
|
|
||||||
|
|
||||||
**Key Specifications:**
|
|
||||||
|
|
||||||
* Allwinner R16-J Quad-core Cortex-A7 CPU @1.2GHz
|
|
||||||
* Mali-400 MP2 GPU
|
|
||||||
* RAM: 1GB DDR3
|
|
||||||
* WiFi & Bluetooth v4.0
|
|
||||||
* Micro HDMI output
|
|
||||||
* MicroSD Card Slot
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[visit website
|
|
||||||
][16]
|
|
||||||
|
|
||||||
#### 5\. Arduino Mega 2560
|
|
||||||
|
|
||||||
![][17]
|
|
||||||
|
|
||||||
If you are into robotic projects or you want something for a 3D printer – Arduino Mega 2560 will be a handy replacement to Raspberry Pi. Unlike Raspberry Pi, it is based on a microcontroller and not a microprocessor.
|
|
||||||
|
|
||||||
It would cost you $38.50 on their [official site][18] and and around [$33 on Amazon][19].
|
|
||||||
|
|
||||||
**Key Specifications:**
|
|
||||||
|
|
||||||
* Microcontroller: ATmega2560
|
|
||||||
* Clock Speed: 16 MHz
|
|
||||||
* Digital I/O Pins: 54
|
|
||||||
* Analog Input Pins: 16
|
|
||||||
* Flash Memory: 256 KB of which 8 KB used by bootloader
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[visit website
|
|
||||||
][18]
|
|
||||||
|
|
||||||
#### 6\. Rock64 Media Board
|
|
||||||
|
|
||||||
![][20]
|
|
||||||
|
|
||||||
For the same investment as you would on a Raspberry Pi 3 B+, you will be getting a faster processor and double the memory on Rock64 Media Board. In addition, it also offers a cheaper alternative to Raspberry Pi if you want the 1 GB RAM model – which would cost $10 less.
|
|
||||||
|
|
||||||
Unlike Raspberry Pi, you do not have wireless connectivity support here but the presence of USB 3.0 and HDMI 2.0 does make a good difference if that matters to you.
|
|
||||||
|
|
||||||
**Key Specifications:**
|
|
||||||
|
|
||||||
* Rockchip RK3328 Quad-Core ARM Cortex A53 64-Bit Processor
|
|
||||||
* Supports up to 4GB 1600MHz LPDDR3 RAM
|
|
||||||
* eMMC module socket
|
|
||||||
* MicroSD Card slot
|
|
||||||
* USB 3.0
|
|
||||||
* HDMI 2.0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[visit website
|
|
||||||
][21]
|
|
||||||
|
|
||||||
#### 7\. Odroid-XU4
|
|
||||||
|
|
||||||
![][22]
|
|
||||||
|
|
||||||
Odroid-XU4 is the perfect alternative to Raspberry Pi if you have room to spend a little more ($80-$100 or even lower, depending on the store/availability).
|
|
||||||
|
|
||||||
It is indeed a powerful replacement and technically a bit smaller in size. The support for eMMC and USB 3.0 makes it faster to work with.
|
|
||||||
|
|
||||||
**Key Specifications:**
|
|
||||||
|
|
||||||
* Samsung Exynos 5422 Octa ARM Cortex™-A15 Quad 2Ghz and Cortex™-A7 Quad 1.3GHz CPUs
|
|
||||||
* 2Gbyte LPDDR3 RAM
|
|
||||||
* GPU: Mali-T628 MP6
|
|
||||||
* USB 3.0
|
|
||||||
* HDMI 1.4a
|
|
||||||
* eMMC 5.0 module socket
|
|
||||||
* MicroSD Card Slot
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[visit website
|
|
||||||
][23]
|
|
||||||
|
|
||||||
#### 8\. **PocketBeagle**
|
|
||||||
|
|
||||||
![][24]
|
|
||||||
|
|
||||||
It is an incredibly small SBC – almost similar to the Raspberry Pi Zero. However, it would cost you the same as that of a full-sized Raspberry Pi 3 model. The main highlight here is that you can use it as a USB key-fob and then access the Linux terminal to work on it.
|
|
||||||
|
|
||||||
**Key Specifications:**
|
|
||||||
|
|
||||||
* Processor: Octavo Systems OSD3358 1GHz ARM® Cortex-A8
|
|
||||||
* RAM: 512 MB DDR3
|
|
||||||
* 72 expansion pin headers
|
|
||||||
* microUSB
|
|
||||||
* USB 2.0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[visit website
|
|
||||||
][25]
|
|
||||||
|
|
||||||
#### 9\. Le Potato
|
|
||||||
|
|
||||||
![][26]
|
|
||||||
|
|
||||||
Le Potato by [Libre Computer][27], also identified by its model number AML-S905X-CC. It would [cost you $45][28].
|
|
||||||
|
|
||||||
If you want double the memory along with HDMI 2.0 interface by spending a bit more than a Raspberry Pi – this would be the perfect choice. Although, you won’t find wireless connectivity baked in.
|
|
||||||
|
|
||||||
**Key Specifications:**
|
|
||||||
|
|
||||||
* Amlogic S905X SoC
|
|
||||||
* 2GB DDR3 SDRAM
|
|
||||||
* USB 2.0
|
|
||||||
* HDMI 2.0
|
|
||||||
* microUSB
|
|
||||||
* MicroSD Card Slot
|
|
||||||
* eMMC Interface
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[visit website
|
|
||||||
][29]
|
|
||||||
|
|
||||||
#### 10\. Banana Pi M64
|
|
||||||
|
|
||||||
![][30]
|
|
||||||
|
|
||||||
It comes loaded with 8 Gigs of eMMC – which is the key highlight of this Raspberry Pi alternative. For the very same reason, it would cost you $60.
|
|
||||||
|
|
||||||
The presence of HDMI interface makes it 4K-ready. In addition, Banana Pi offers a lot more variety of open source SBCs as an alternative to Raspberry Pi.
|
|
||||||
|
|
||||||
**Key Specifications:**
|
|
||||||
|
|
||||||
* 1.2 Ghz Quad-Core ARM Cortex A53 64-Bit Processor-R18
|
|
||||||
* 2GB DDR3 SDRAM
|
|
||||||
* 8 GB eMMC
|
|
||||||
* WiFi & Bluetooth
|
|
||||||
* USB 2.0
|
|
||||||
* HDMI
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[visit website
|
|
||||||
][31]
|
|
||||||
|
|
||||||
#### 11\. Orange Pi Zero
|
|
||||||
|
|
||||||
![][32]
|
|
||||||
|
|
||||||
The Orange Pi Zero is an incredibly cheap alternative to Raspberry Pi. You will be able to get it for almost $10 on Aliexpress or Amazon. For a [little more investment, you can get 512 MB RAM][33].
|
|
||||||
|
|
||||||
If that isn’t sufficient, you can also go for Orange Pi 3 with better specifications which will cost you around $25.
|
|
||||||
|
|
||||||
**Key Specifications:**
|
|
||||||
|
|
||||||
* H2 Quad-core Cortex-A7
|
|
||||||
* Mali400MP2 GPU
|
|
||||||
* RAM: Up to 512 MB
|
|
||||||
* TF Card support
|
|
||||||
* WiFi
|
|
||||||
* USB 2.0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[Visit website
|
|
||||||
][34]
|
|
||||||
|
|
||||||
#### 12\. VIM 2 SBC by Khadas
|
|
||||||
|
|
||||||
![][35]
|
|
||||||
|
|
||||||
VIM 2 by Khadas is one of the latest SBCs that you can grab with Bluetooth 5.0 on board. It [starts from $99 (the basic model) and goes up to $140][36].
|
|
||||||
|
|
||||||
The basic model includes 2 GB RAM, 16 GB eMMC and Bluetooth 4.1. However, the Pro/Max versions would include Bluetooth 5.0, more memory, and more eMMC storage.
|
|
||||||
|
|
||||||
**Key Specifications:**
|
|
||||||
|
|
||||||
* Amlogic S912 1.5GHz 64-bit Octa-Core CPU
|
|
||||||
* T820MP3 GPU
|
|
||||||
* Up to 3 GB DDR4 RAM
|
|
||||||
* Up to 64 GB eMMC
|
|
||||||
* Bluetooth 5.0 (Pro/Max)
|
|
||||||
* Bluetooth 4.1 (Basic)
|
|
||||||
* HDMI 2.0a
|
|
||||||
* WiFi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**Wrapping Up**
|
|
||||||
|
|
||||||
We do know that there are different types of single board computers. Some are better than Raspberry Pi – and some scaled down versions of it for a cheaper price tag. Also, SBCs like Jetson Nano have been tailored for a specific use. So, depending on what you require – you should verify the specifications of the single board computer.
|
|
||||||
|
|
||||||
If you think that you know about something that is better than the ones mentioned above, feel free to let us know in the comments below.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://itsfoss.com/raspberry-pi-alternatives/
|
|
||||||
|
|
||||||
作者:[Ankush Das][a]
|
|
||||||
选题:[lujun9972][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://itsfoss.com/author/ankush/
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://itsfoss.com/best-linux-media-server/
|
|
||||||
[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/raspberry-pi-alternatives.png?resize=800%2C450&ssl=1
|
|
||||||
[3]: https://itsfoss.com/affiliate-policy/
|
|
||||||
[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/omega-2-plus-e1555306748755-800x444.jpg?resize=800%2C444&ssl=1
|
|
||||||
[5]: https://openwrt.org/
|
|
||||||
[6]: https://amzn.to/2Xj8pkn
|
|
||||||
[7]: https://onion.io/store/omega2p/
|
|
||||||
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/Jetson-Nano-e1555306350976-800x590.jpg?resize=800%2C590&ssl=1
|
|
||||||
[9]: https://developer.nvidia.com/embedded/buy/jetson-nano-devkit
|
|
||||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/04/asus-tinker-board-s-e1555304945760-800x450.jpg?resize=800%2C450&ssl=1
|
|
||||||
[11]: https://amzn.to/2XfkOFT
|
|
||||||
[12]: https://en.wikipedia.org/wiki/MultiMediaCard
|
|
||||||
[13]: https://www.asus.com/in/Single-Board-Computer/Tinker-Board-S/
|
|
||||||
[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/clockwork-pi-e1555305016242-800x506.jpg?resize=800%2C506&ssl=1
|
|
||||||
[15]: https://itsfoss.com/gameshell-console/
|
|
||||||
[16]: https://www.clockworkpi.com/product-page/cpi-v3-1
|
|
||||||
[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/arduino-mega-2560-e1555305257633.jpg?ssl=1
|
|
||||||
[18]: https://store.arduino.cc/usa/mega-2560-r3
|
|
||||||
[19]: https://amzn.to/2KCi041
|
|
||||||
[20]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/04/ROCK64_board-e1555306092845-800x440.jpg?resize=800%2C440&ssl=1
|
|
||||||
[21]: https://www.pine64.org/?product=rock64-media-board-computer
|
|
||||||
[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/04/odroid-xu4.jpg?fit=800%2C354&ssl=1
|
|
||||||
[23]: https://www.hardkernel.com/shop/odroid-xu4-special-price/
|
|
||||||
[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/04/PocketBeagle.jpg?fit=800%2C450&ssl=1
|
|
||||||
[25]: https://beagleboard.org/p/products/pocketbeagle
|
|
||||||
[26]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/04/aml-libre.-e1555306237972-800x514.jpg?resize=800%2C514&ssl=1
|
|
||||||
[27]: https://libre.computer/
|
|
||||||
[28]: https://amzn.to/2DpG3xl
|
|
||||||
[29]: https://libre.computer/products/boards/aml-s905x-cc/
|
|
||||||
[30]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/banana-pi-m6.jpg?fit=800%2C389&ssl=1
|
|
||||||
[31]: http://www.banana-pi.org/m64.html
|
|
||||||
[32]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/orange-pi-zero.jpg?fit=800%2C693&ssl=1
|
|
||||||
[33]: https://amzn.to/2IlI81g
|
|
||||||
[34]: http://www.orangepi.org/orangepizero/index.html
|
|
||||||
[35]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/04/khadas-vim-2-e1555306505640-800x563.jpg?resize=800%2C563&ssl=1
|
|
||||||
[36]: https://amzn.to/2UDvrFE
|
|
@ -1,5 +1,5 @@
|
|||||||
[#]: collector: (lujun9972)
|
[#]: collector: (lujun9972)
|
||||||
[#]: translator: ( )
|
[#]: translator: (bodhix)
|
||||||
[#]: reviewer: ( )
|
[#]: reviewer: ( )
|
||||||
[#]: publisher: ( )
|
[#]: publisher: ( )
|
||||||
[#]: url: ( )
|
[#]: url: ( )
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: ( )
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (Move Data to the Cloud with Azure Data Migration)
|
|
||||||
[#]: via: (https://www.linux.com/blog/move-data-cloud-azure-data-migration)
|
|
||||||
[#]: author: (InfoWorld https://www.linux.com/users/infoworld)
|
|
||||||
|
|
||||||
Move Data to the Cloud with Azure Data Migration
|
|
||||||
======
|
|
||||||
|
|
||||||
Despite more than a decade of cloud migration, there’s still a vast amount of data running on-premises. That’s not surprising since data migrations, even between similar systems, are complex, slow, and add risk to your day-to-day operations. Moving to the cloud adds additional management overhead, raising questions of network connectivity and bandwidth, as well as the variable costs associated with running cloud databases.
|
|
||||||
|
|
||||||
Read more at: [InfoWorld][1]
|
|
||||||
|
|
||||||
Despite more than a decade of cloud migration, there’s still a vast amount of data running on-premises. That’s not surprising since data migrations, even between similar systems, are complex, slow, and add risk to your day-to-day operations. Moving to the cloud adds additional management overhead, raising questions of network connectivity and bandwidth, as well as the variable costs associated with running cloud databases.
|
|
||||||
|
|
||||||
Read more at: [InfoWorld][1]
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://www.linux.com/blog/move-data-cloud-azure-data-migration
|
|
||||||
|
|
||||||
作者:[InfoWorld][a]
|
|
||||||
选题:[lujun9972][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://www.linux.com/users/infoworld
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://www.infoworld.com/article/3388312/move-data-to-the-cloud-with-azure-data-migration.html
|
|
@ -1,99 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: ( )
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (Managing RAID arrays with mdadm)
|
|
||||||
[#]: via: (https://fedoramagazine.org/managing-raid-arrays-with-mdadm/)
|
|
||||||
[#]: author: (Gregory Bartholomew https://fedoramagazine.org/author/glb/)
|
|
||||||
|
|
||||||
Managing RAID arrays with mdadm
|
|
||||||
======
|
|
||||||
|
|
||||||
![][1]
|
|
||||||
|
|
||||||
Mdadm stands for Multiple Disk and Device Administration. It is a command line tool that can be used to manage software [RAID][2] arrays on your Linux PC. This article outlines the basics you need to get started with it.
|
|
||||||
|
|
||||||
The following five commands allow you to make use of mdadm’s most basic features:
|
|
||||||
|
|
||||||
1. **Create a RAID array** :
|
|
||||||
### mdadm --create /dev/md/test --homehost=any --metadata=1.0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
|
|
||||||
2. **Assemble (and start) a RAID array** :
|
|
||||||
### mdadm --assemble /dev/md/test /dev/sda1 /dev/sdb1
|
|
||||||
3. **Stop a RAID array** :
|
|
||||||
### mdadm --stop /dev/md/test
|
|
||||||
4. **Delete a RAID array** :
|
|
||||||
### mdadm --zero-superblock /dev/sda1 /dev/sdb1
|
|
||||||
5. **Check the status of all assembled RAID arrays** :
|
|
||||||
### cat /proc/mdstat
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### Notes on features
|
|
||||||
|
|
||||||
##### `mdadm --create`
|
|
||||||
|
|
||||||
The _create_ command shown above includes the following four parameters in addition to the create parameter itself and the device names:
|
|
||||||
|
|
||||||
1. **–homehost** :
|
|
||||||
By default, mdadm stores your computer’s name as an attribute of the RAID array. If your computer name does not match the stored name, the array will not automatically assemble. This feature is useful in server clusters that share hard drives because file system corruption usually occurs if multiple servers attempt to access the same drive at the same time. The name _any_ is reserved and disables the _homehost_ restriction.
|
|
||||||
2. **–metadata** :
|
|
||||||
_mdadm_ reserves a small portion of each RAID device to store information about the RAID array itself. The _metadata_ parameter specifies the format and location of the information. The value _1.0_ indicates to use version-1 formatting and store the metadata at the end of the device.
|
|
||||||
3. **–level** :
|
|
||||||
The _level_ parameter specifies how the data should be distributed among the underlying devices. Level _1_ indicates each device should contain a complete copy of all the data. This level is also known as [disk mirroring][3].
|
|
||||||
4. **–raid-devices** :
|
|
||||||
The _raid-devices_ parameter specifies the number of devices that will be used to create the RAID array.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
By using _level=1_ (mirroring) in combination with _metadata=1.0_ (store the metadata at the end of the device), you create a RAID1 array whose underlying devices appear normal if accessed without the aid of the mdadm driver. This is useful in the case of disaster recovery, because you can access the device even if the new system doesn’t support mdadm arrays. It’s also useful in case a program needs _read-only_ access to the underlying device before mdadm is available. For example, the [UEFI][4] firmware in a computer may need to read the bootloader from the [ESP][5] before mdadm is started.
|
|
||||||
|
|
||||||
##### `mdadm --assemble`
|
|
||||||
|
|
||||||
The _assemble_ command above fails if a member device is missing or corrupt. To force the RAID array to assemble and start when one of its members is missing, use the following command:
|
|
||||||
|
|
||||||
```
|
|
||||||
# mdadm --assemble --run /dev/md/test /dev/sda1
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Other important notes
|
|
||||||
|
|
||||||
Avoid writing directly to any devices that underlay a mdadm RAID1 array. That causes the devices to become out-of-sync and mdadm won’t know that they are out-of-sync. If you access a RAID1 array with a device that’s been modified out-of-band, you can cause file system corruption. If you modify a RAID1 device out-of-band and need to force the array to re-synchronize, delete the mdadm metadata from the device to be overwritten and then re-add it to the array as demonstrated below:
|
|
||||||
|
|
||||||
```
|
|
||||||
# mdadm --zero-superblock /dev/sdb1
|
|
||||||
# mdadm --assemble --run /dev/md/test /dev/sda1
|
|
||||||
# mdadm /dev/md/test --add /dev/sdb1
|
|
||||||
```
|
|
||||||
|
|
||||||
These commands completely overwrite the contents of sdb1 with the contents of sda1.
|
|
||||||
|
|
||||||
To specify any RAID arrays to automatically activate when your computer starts, create an _/etc/mdadm.conf_ configuration file.
|
|
||||||
|
|
||||||
For the most up-to-date and detailed information, check the man pages:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ man mdadm
|
|
||||||
$ man mdadm.conf
|
|
||||||
```
|
|
||||||
|
|
||||||
The next article of this series will show a step-by-step guide on how to convert an existing single-disk Linux installation to a mirrored-disk installation, that will continue running even if one of its hard drives suddenly stops working!
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://fedoramagazine.org/managing-raid-arrays-with-mdadm/
|
|
||||||
|
|
||||||
作者:[Gregory Bartholomew][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/glb/
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://fedoramagazine.org/wp-content/uploads/2019/04/mdadm-816x345.jpg
|
|
||||||
[2]: https://en.wikipedia.org/wiki/RAID
|
|
||||||
[3]: https://en.wikipedia.org/wiki/Disk_mirroring
|
|
||||||
[4]: https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface
|
|
||||||
[5]: https://en.wikipedia.org/wiki/EFI_system_partition
|
|
@ -1,105 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: ( )
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (Ubuntu 19.04 ‘Disco Dingo’ Has Arrived: Downloads Available Now!)
|
|
||||||
[#]: via: (https://itsfoss.com/ubuntu-19-04-release/)
|
|
||||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
|
||||||
|
|
||||||
Ubuntu 19.04 ‘Disco Dingo’ Has Arrived: Downloads Available Now!
|
|
||||||
======
|
|
||||||
|
|
||||||
It’s the time to disco! Why? Well, Ubuntu 19.04 ‘Disco Dingo’ is here and finally available to download. Although, we are aware of the [new features in Ubuntu 19.04][1] – I will mention a few important things below and would also point you to the official links to download it and get started.
|
|
||||||
|
|
||||||
### Ubuntu 19.04: What You Need To Know
|
|
||||||
|
|
||||||
Here are a few things you should know about Ubuntu 19.04 Disco Dingo release.
|
|
||||||
|
|
||||||
#### Ubuntu 19.04 is not an LTS Release
|
|
||||||
|
|
||||||
Unlike Ubuntu 18.04 LTS, this will not be [supported for 10 years][2]. Instead, the non-LTS 19.04 will be supported for **9 months until January 2020.**
|
|
||||||
|
|
||||||
So, if you have a production environment, we may not recommend upgrading it right away. For example, if you have a server that runs on Ubuntu 18.04 LTS – it may not be a good idea to upgrade it to 19.04 just because it is an exciting release.
|
|
||||||
|
|
||||||
However, for users who want the latest and greatest installed on their machines can try it out.
|
|
||||||
|
|
||||||
![][3]
|
|
||||||
|
|
||||||
#### Ubuntu 19.04 is a sweet update for NVIDIA GPU Owners
|
|
||||||
|
|
||||||
_Martin Wimpress_ (from Canonical) mentioned that Ubuntu 19.04 is particularly a big deal for NVIDIA GPU owners in the final release notes of Ubuntu MATE 19.04 (one of the Ubuntu flavors) on [GitHub][4].
|
|
||||||
|
|
||||||
In other words, while installing the proprietary graphics driver – it now selects the best driver compatible with your particular GPU model.
|
|
||||||
|
|
||||||
#### Ubuntu 19.04 Features
|
|
||||||
|
|
||||||
Even though we have already discussed the [best features of Ubuntu 19.04][1] Disco Dingo, it is worth mentioning that I’m exciting about the desktop updates (GNOME 3.32) and the Linux Kernel (5.0) that comes as one of the major changes in this release.
|
|
||||||
|
|
||||||
#### Upgrading from Ubuntu 18.10 to 19.04
|
|
||||||
|
|
||||||
If you have Ubuntu 18.10 installed, you should upgrade it for obvious reasons. 18.10 will reach its end of life in July 2019 – so we recommend you to upgrade it to 19.04.
|
|
||||||
|
|
||||||
To do that, you can simply head on to the “ **Software and Updates** ” settings and then navigate your way to the “ **Updates** ” tab.
|
|
||||||
|
|
||||||
Now, change the option for – **Notify me of a new Ubuntu version** to “ _For any new version_ “.
|
|
||||||
|
|
||||||
When you run the update manager now, you should see that Ubuntu 19.04 is available now.
|
|
||||||
|
|
||||||
![][5]
|
|
||||||
|
|
||||||
#### Upgrading from Ubuntu 18.04 to 19.04
|
|
||||||
|
|
||||||
It is not recommended to directly upgrade from 18.04 to 19.04 because you will have to update the OS to 18.10 first and then proceed to get 19.04 on board.
|
|
||||||
|
|
||||||
Instead, you can simply download the official ISO image of Ubuntu 19.04 and then re-install Ubuntu on your system.
|
|
||||||
|
|
||||||
### Ubuntu 19.04: Downloads Available for all flavors
|
|
||||||
|
|
||||||
As per the [release notes][6], Ubuntu 19.04 is available to download now. You can get the torrent or the ISO file on its official release download page.
|
|
||||||
|
|
||||||
[Download Ubuntu 19.04][7]
|
|
||||||
|
|
||||||
If you need a different desktop environment or need something specific, you should check out the official flavors of Ubuntu available:
|
|
||||||
|
|
||||||
* [Ubuntu MATE][8]
|
|
||||||
* [Kubuntu][9]
|
|
||||||
* [Lubuntu][10]
|
|
||||||
* [Ubuntu Budgie][11]
|
|
||||||
* [Ubuntu Studio][12]
|
|
||||||
* [Xubuntu][13]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Some of the above mentioned Ubuntu flavors haven’t put the 19.04 release on their download yet. But you can [still find the ISOs on the Ubuntu’s release note webpage][6]. Personally, I use Ubuntu with GNOME desktop. You can choose whatever you like.
|
|
||||||
|
|
||||||
**Wrapping Up**
|
|
||||||
|
|
||||||
What do you think about Ubuntu 19.04 Disco Dingo? Are the new features exciting enough? Have you tried it yet? Let us know in the comments below.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://itsfoss.com/ubuntu-19-04-release/
|
|
||||||
|
|
||||||
作者:[Ankush Das][a]
|
|
||||||
选题:[lujun9972][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://itsfoss.com/author/ankush/
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://itsfoss.com/ubuntu-19-04-release-features/
|
|
||||||
[2]: https://itsfoss.com/ubuntu-18-04-ten-year-support/
|
|
||||||
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/11/ubuntu-19-04-Disco-Dingo-default-wallpaper.jpg?resize=800%2C450&ssl=1
|
|
||||||
[4]: https://github.com/ubuntu-mate/ubuntu-mate.org/blob/master/blog/20190418-ubuntu-mate-disco-final-release.md
|
|
||||||
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/04/ubuntu-19-04-upgrade-available.jpg?ssl=1
|
|
||||||
[6]: https://wiki.ubuntu.com/DiscoDingo/ReleaseNotes
|
|
||||||
[7]: https://www.ubuntu.com/download/desktop
|
|
||||||
[8]: https://ubuntu-mate.org/download/
|
|
||||||
[9]: https://kubuntu.org/getkubuntu/
|
|
||||||
[10]: https://lubuntu.me/cosmic-released/
|
|
||||||
[11]: https://ubuntubudgie.org/downloads
|
|
||||||
[12]: https://ubuntustudio.org/2019/04/ubuntu-studio-19-04-released/
|
|
||||||
[13]: https://xubuntu.org/download/
|
|
@ -1,110 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: (geekpi)
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (4 cool new projects to try in COPR for April 2019)
|
|
||||||
[#]: via: (https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-for-april-2019/)
|
|
||||||
[#]: author: (Dominik Turecek https://fedoramagazine.org/author/dturecek/)
|
|
||||||
|
|
||||||
4 cool new projects to try in COPR for April 2019
|
|
||||||
======
|
|
||||||
|
|
||||||
![][1]
|
|
||||||
|
|
||||||
COPR is a [collection][2] of personal repositories for software that isn’t carried in Fedora. Some software doesn’t conform to standards that allow easy packaging. Or it may not meet other Fedora standards, despite being free and open source. COPR can offer these projects outside the Fedora set of packages. Software in COPR isn’t supported by Fedora infrastructure or signed by the project. However, it can be a neat way to try new or experimental software.
|
|
||||||
|
|
||||||
Here’s a set of new and interesting projects in COPR.
|
|
||||||
|
|
||||||
### Joplin
|
|
||||||
|
|
||||||
[Joplin][3] is a note-taking and to-do app. Notes are written in the Markdown format, and organized by sorting them into various notebooks and using tags.
|
|
||||||
Joplin can import notes from any Markdown source or exported from Evernote. In addition to the desktop app, there’s an Android version with the ability to synchronize notes between them — using Nextcloud, Dropbox or other cloud services. Finally, there’s a browser extension for Chrome and Firefox to save web pages and screenshots.
|
|
||||||
|
|
||||||
![][4]
|
|
||||||
|
|
||||||
#### Installation instructions
|
|
||||||
|
|
||||||
The [repo][5] currently provides Joplin for Fedora 29 and 30, and for EPEL 7. To install Joplin, use these commands [with sudo][6]:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo dnf copr enable taw/joplin
|
|
||||||
sudo dnf install joplin
|
|
||||||
```
|
|
||||||
|
|
||||||
### Fzy
|
|
||||||
|
|
||||||
[Fzy][7] is a command-line utility for fuzzy string searching. It reads from a standard input and sorts the lines based on what is most likely the sought after text, and then prints the selected line. In addition to command-line, fzy can be also used within vim. You can try fzy in this online [demo][8].
|
|
||||||
|
|
||||||
#### Installation instructions
|
|
||||||
|
|
||||||
The [repo][9] currently provides fzy for Fedora 29, 30, and Rawhide, and other distributions. To install fzy, use these commands:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo dnf copr enable lehrenfried/fzy
|
|
||||||
sudo dnf install fzy
|
|
||||||
```
|
|
||||||
|
|
||||||
### Fondo
|
|
||||||
|
|
||||||
Fondo is a program for browsing many photographs from the [unsplash.com][10] website. It has a simple interface that allows you to look for pictures of one of several themes, or all of them at once. You can then set a found picture as a wallpaper with a single click, or share it.
|
|
||||||
|
|
||||||
* ![][11]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### Installation instructions
|
|
||||||
|
|
||||||
The [repo][12] currently provides Fondo for Fedora 29, 30, and Rawhide. To install Fondo, use these commands:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo dnf copr enable atim/fondo
|
|
||||||
sudo dnf install fondo
|
|
||||||
```
|
|
||||||
|
|
||||||
### YACReader
|
|
||||||
|
|
||||||
[YACReader][13] is a digital comic book reader that supports many comics and image formats, such as _cbz_ , _cbr_ , _pdf_ and others. YACReader keeps track of reading progress, and can download comics’ information from [Comic Vine.][14] It also comes with a YACReader Library for organizing and browsing your comic book collection.
|
|
||||||
|
|
||||||
* ![][15]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### Installation instructions
|
|
||||||
|
|
||||||
The [repo][16] currently provides YACReader for Fedora 29, 30, and Rawhide. To install YACReader, use these commands:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo dnf copr enable atim/yacreader
|
|
||||||
sudo dnf install yacreader
|
|
||||||
```
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-for-april-2019/
|
|
||||||
|
|
||||||
作者:[Dominik Turecek][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/dturecek/
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://fedoramagazine.org/wp-content/uploads/2017/08/4-copr-945x400.jpg
|
|
||||||
[2]: https://copr.fedorainfracloud.org/
|
|
||||||
[3]: https://joplin.cozic.net/
|
|
||||||
[4]: https://fedoramagazine.org/wp-content/uploads/2019/04/joplin.png
|
|
||||||
[5]: https://copr.fedorainfracloud.org/coprs/taw/joplin/
|
|
||||||
[6]: https://fedoramagazine.org/howto-use-sudo/
|
|
||||||
[7]: https://github.com/jhawthorn/fzy
|
|
||||||
[8]: https://jhawthorn.github.io/fzy-demo/
|
|
||||||
[9]: https://copr.fedorainfracloud.org/coprs/lehrenfried/fzy/
|
|
||||||
[10]: https://unsplash.com/
|
|
||||||
[11]: https://fedoramagazine.org/wp-content/uploads/2019/04/fondo.png
|
|
||||||
[12]: https://copr.fedorainfracloud.org/coprs/atim/fondo/
|
|
||||||
[13]: https://www.yacreader.com/
|
|
||||||
[14]: https://comicvine.gamespot.com/
|
|
||||||
[15]: https://fedoramagazine.org/wp-content/uploads/2019/04/yacreader.png
|
|
||||||
[16]: https://copr.fedorainfracloud.org/coprs/atim/yacreader/
|
|
@ -1,5 +1,5 @@
|
|||||||
[#]: collector: (lujun9972)
|
[#]: collector: (lujun9972)
|
||||||
[#]: translator: ( )
|
[#]: translator: (MjSeven)
|
||||||
[#]: reviewer: ( )
|
[#]: reviewer: ( )
|
||||||
[#]: publisher: ( )
|
[#]: publisher: ( )
|
||||||
[#]: url: ( )
|
[#]: url: ( )
|
||||||
|
@ -1,78 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: ( )
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (This is how System76 does open hardware)
|
|
||||||
[#]: via: (https://opensource.com/article/19/4/system76-hardware)
|
|
||||||
[#]: author: (Don Watkins https://opensource.com/users/don-watkins)
|
|
||||||
|
|
||||||
This is how System76 does open hardware
|
|
||||||
======
|
|
||||||
What sets the new Thelio line of desktops apart from the rest.
|
|
||||||
![metrics and data shown on a computer screen][1]
|
|
||||||
|
|
||||||
Most people know very little about the hardware in their computers. As a long-time Linux user, I've had my share of frustration while getting my wireless cards, video cards, displays, and other hardware working with my chosen distribution. Proprietary hardware often makes it difficult to determine why an Ethernet controller, wireless controller, or mouse performs differently than we expect. As Linux distributions have matured, this has become less of a problem, but we still see some quirks with touchpads and other peripherals, especially when we don't know much—if anything—about our underlying hardware.
|
|
||||||
|
|
||||||
Companies like [System76][2] aim to take these types of problems out of the Linux user experience. System76 manufactures a line of Linux laptops, desktops, and servers, and even offers its own Linux distro, [Pop! OS][3], as an option for buyers, Recently I had the privilege of visiting System76's plant in Denver for [the unveiling][4] of [Thelio][5], its new desktop product line.
|
|
||||||
|
|
||||||
### About Thelio
|
|
||||||
|
|
||||||
System76 says Thelio's open hardware daughterboard, named Thelio Io after the fifth moon of Jupiter, is one thing that makes the computer unique in the marketplace. Thelio Io is certified [OSHWA #us000145][6] and has four SATA ports for storage and an embedded controller for fan and power button control. Thelio Io SAS is certified [OSHWA #us000146][7] and has four U.2 ports for storage and no embedded controller. During a demonstration, System76 showed how these components adjust fans throughout the chassis to optimize the unit's performance.
|
|
||||||
|
|
||||||
The controller also runs the power button and the LED ring around the button, which glows at 100% brightness when it is pressed. This provides both tactile and visual confirmation that the unit is being powered on. While the computer is in use, the button is set to 35% brightness, and when it's in suspend mode, it pulses between 2.35% and 25%. When the computer is off, the LED remains dimly lit so that it's easy to find the power control in a dark room.
|
|
||||||
|
|
||||||
Thelio's embedded controller is a low-power [ATmega32U4][8] microchip, and the controller's setup can be prototyped with an Arduino Micro. The number of Thelio Io boards changes depending on which Thelio model you purchase.
|
|
||||||
|
|
||||||
Thelio is also perhaps the best-designed computer case and system I have ever seen. You'll probably agree if you have ever skinned your knuckles trying to operate inside a typical PC case. I have done this a number of times, and I have the scars to prove it.
|
|
||||||
|
|
||||||
### Why open hardware?
|
|
||||||
|
|
||||||
The boards were designed in [KiCAD][9], and you can access all of Thelio's design files under GPL on [GitHub][10]. So, why would a company that competes with other PC manufacturers design a unique interface then license it openly? It's because the company recognizes the value of open design and the ability to share and adjust an I/O board to your needs, even if you're a competitor in the marketplace.
|
|
||||||
|
|
||||||
![Don Watkins speaks with System76 CEO Carl Richell at the Thelio launch event.][11]
|
|
||||||
|
|
||||||
Don Watkins speaks with System76 CEO Carl Richell at the [Thelio launch event][12].
|
|
||||||
|
|
||||||
I asked [Carl Richell][13], System76's founder and CEO, whether the company is concerned that openly licensing its hardware designs means someone could take its unique design and use it to drive System76 out of business. He said:
|
|
||||||
|
|
||||||
> Open hardware benefits all of us. It's how we further advance technology and make it more available to everyone. We welcome anyone who wishes to improve on Thelio's design to do so. Opening the hardware not only helps advance improvements of our computers more quickly, but it also empowers our customers to truly own 100% of their device. Our goal is to remove as much proprietary functioning as we can, while still producing a competitive Linux computer for customers.
|
|
||||||
>
|
|
||||||
> We've been working with the Linux community for over 13 years to create a flawless and digestible experience on all of our laptops, desktops, and servers. Our long tenure serving the Linux community, providing our customers with a high level of service, and our personability are what makes System76 unique.
|
|
||||||
|
|
||||||
I also asked Carl why open hardware makes sense for System76 and the PC business in general. He replied:
|
|
||||||
|
|
||||||
> System76 was founded on the idea that technology should be open and accessible to everyone. We're not yet at the point where we can create a computer that is 100% open source, but with open hardware, we're one large, essential step closer to reaching that point.
|
|
||||||
>
|
|
||||||
> We live in an era where technology has become a utility. Computers are tools for people at every level of education and across many industries. With everyone's needs specific, each person has their own ideas on how they might improve the computer and its software as their primary tool. Having our computers open allows these ideas to come to fruition, which in turn makes the technology a more powerful tool. In an open environment, we constantly get to iterate a better PC. And that's kind of cool.
|
|
||||||
|
|
||||||
We wrapped up our conversation by talking about System76's roadmap, which includes open hardware mini PCs and, eventually, laptops. Existing mini PCs and laptops sold under the System76 brand are manufactured by other vendors and are not based on open hardware (although their Linux software is, of course, open source).
|
|
||||||
|
|
||||||
Designing and supporting open hardware is a game-changer in the PC business, and it is what sets System76's new Thelio line of desktop computers apart.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://opensource.com/article/19/4/system76-hardware
|
|
||||||
|
|
||||||
作者:[Don Watkins ][a]
|
|
||||||
选题:[lujun9972][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://opensource.com/users/don-watkins
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_data_dashboard_system_computer_analytics.png?itok=oxAeIEI- (metrics and data shown on a computer screen)
|
|
||||||
[2]: https://system76.com/
|
|
||||||
[3]: https://opensource.com/article/18/1/behind-scenes-popos-linux
|
|
||||||
[4]: /article/18/11/system76-thelio-desktop-computer
|
|
||||||
[5]: https://system76.com/desktops
|
|
||||||
[6]: https://certification.oshwa.org/us000145.html
|
|
||||||
[7]: https://certification.oshwa.org/us000146.html
|
|
||||||
[8]: https://www.microchip.com/wwwproducts/ATmega32u4
|
|
||||||
[9]: http://kicad-pcb.org/
|
|
||||||
[10]: https://github.com/system76/thelio-io
|
|
||||||
[11]: https://opensource.com/sites/default/files/uploads/don_system76_ceo.jpg (Don Watkins speaks with System76 CEO Carl Richell at the Thelio launch event.)
|
|
||||||
[12]: https://trevgstudios.smugmug.com/System76/121418-Thelio-Press-Event/i-FKWFxFv
|
|
||||||
[13]: https://www.linkedin.com/in/carl-richell-9435781
|
|
@ -1,147 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: ( )
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (New Features Coming to Debian 10 Buster Release)
|
|
||||||
[#]: via: (https://itsfoss.com/new-features-coming-to-debian-10-buster-release/)
|
|
||||||
[#]: author: (Shirish https://itsfoss.com/author/shirish/)
|
|
||||||
|
|
||||||
New Features Coming to Debian 10 Buster Release
|
|
||||||
======
|
|
||||||
|
|
||||||
Debian 10 Buster is nearing its release. The first release candidate is already out and we should see the final release, hopefully, in a few weeks.
|
|
||||||
|
|
||||||
If you are excited about this major new release, let me tell you what’s in it for you.
|
|
||||||
|
|
||||||
### Debian 10 Buster Release Schedule
|
|
||||||
|
|
||||||
There is no set release date for [Debian 10 Buster][1]. Why is that so? Unlike other distributions, [Debian][2] doesn’t do time-based releases. It instead focuses on fixing release-critical bugs. Release-critical bugs are bugs which have either security issues [CVE’s][3] or some other critical issues which prevent Debian from releasing.
|
|
||||||
|
|
||||||
Debian has three parts in its archive, called Main, contrib and non-free. Of the three, Debian Developers and Release Managers are most concerned that the packages which form the bedrock of the distribution i.e. Main is rock stable. So they make sure that there aren’t any major functional or security issues. They are also given priority values such as Essential, Required, Important, Standard, Optional and Extra. More on this in some later Debian article.
|
|
||||||
|
|
||||||
This is necessary because Debian is used as a server in many different environments and people have come to depend on Debian. They also look at upgrade cycles to see nothing breaks for which they look for people to test and see if something breaks while upgrading and inform Debian of the same.
|
|
||||||
|
|
||||||
This commitment to stability is one of the [many reasons why I love to use Debian][4].
|
|
||||||
|
|
||||||
### What’s new in Debian 10 Buster Release
|
|
||||||
|
|
||||||
Here are a few visual and under the hood changes in the upcoming major release of Debian.
|
|
||||||
|
|
||||||
#### New theme and wallpaper
|
|
||||||
|
|
||||||
The Debian theme for Buster is called [FuturePrototype][5] and can be seen below:
|
|
||||||
|
|
||||||
![Debian Buster FuturePrototype Theme][6]
|
|
||||||
|
|
||||||
#### 1\. GNOME Desktop 3.30
|
|
||||||
|
|
||||||
The GNOME desktop which was 1.3.22 in Debian Stretch is updated to 1.3.30 in Buster. Some of the new packages included in this GNOME desktop release are gnome-todo, tracker instead of tracker-gui , dependency against gstreamer1.0-packagekit so there is automatic codec installation for playing movies etc. The big move has been all packages being moved from libgtk2+ to libgtk3+ .
|
|
||||||
|
|
||||||
#### 2\. Linux Kernel 4.19.0-4
|
|
||||||
|
|
||||||
Debian uses LTS Kernel versions so you can expect much better hardware support and long 5 year maintainance and support cycle from Debian. From kernel 4.9.0.3 we have come to 4.19.0-4 .
|
|
||||||
|
|
||||||
```
|
|
||||||
$ uname -r
|
|
||||||
4.19.0-4-amd64
|
|
||||||
```
|
|
||||||
|
|
||||||
#### 3\. OpenJDK 11.0
|
|
||||||
|
|
||||||
For a long time Debian was stuck on OpenJDK 8.0. Now in Debian Buster we have moved to OpenJDK 11.0 and have a team which will take care of new versions.
|
|
||||||
|
|
||||||
#### 4\. AppArmor Enabled by Default
|
|
||||||
|
|
||||||
In Debian Buster [AppArmor][7] will be enabled by default. While this is a good thing, care would have to be taken care by system administrators to enable correct policies. This is only the first step and would need fixing probably lot of scripts to be as useful as been envisioned for the user.
|
|
||||||
|
|
||||||
#### 5\. Nodejs 10.15.2
|
|
||||||
|
|
||||||
For a long time Debian had Nodejs 4.8 in the repo. In this cycle Debian has moved to Nodejs 10.15.2 . In fact, Debian Buster has many javascript libraries such as yarnpkg (an npm alternative) and many others.
|
|
||||||
|
|
||||||
Of course, you can [install latest Nodejs in Debian][8] from the project’s repository but it’s good to see newer version in Debian repository.
|
|
||||||
|
|
||||||
#### 6\. NFtables replaces iptables
|
|
||||||
|
|
||||||
Debian buster provides nftables as a full replacement to iptables which means better and easier syntax, better support for dual-stack ipv4-v6 firewalls and more.
|
|
||||||
|
|
||||||
#### 7\. Support for lot of ARM 64 and ARMHF SBC Boards.
|
|
||||||
|
|
||||||
There has been a constant stream of new SBC boards which Debian is supporting, the latest amongst these are pine64_plus, pinebook for ARM64, while Firefly-RK3288, u-boot-rockchip for ARMHF 64 as well as Odroid HC1/HC2 boards, SolidRun Cubox-i Dual/Quad (1.5som), and SolidRun Cubox-i Dual/Quad (1.5som+emmc) boards, Cubietruckplus as well. There is support for Rock 64, Banana Pi M2 Berry, Pine A64 LTS Board, Olimex A64 Teres-1 as well as Raspberry Pi 1, Zero and Pi 3. Support will be out-of-the box for RISC-V systems as well.
|
|
||||||
|
|
||||||
#### 8\. Python 2 is dead, long live Python 3
|
|
||||||
|
|
||||||
Python 2 will be [deprecated][9] on January 1, 2020 by python.org . While Debian does have Python 2.7 efforts are on to remove after moving all packages to Python 3 to remove it from the repo. This may happen either at Buster release or in a future point release but this is imminent. So Python developers are encouraged to move their code-base to be compatible with Python 3. At the moment of writing, both python2 and python3 are supported in Debian buster.
|
|
||||||
|
|
||||||
#### 9\. Mailman 3
|
|
||||||
|
|
||||||
Mailman3 is finally available in Debian. While [Mailman][10] has been further sub-divided into components. To install the whole stack, install mailman3-full to get all the components.
|
|
||||||
|
|
||||||
#### 10\. Any existing Postgresql databases used will need to be reindexed
|
|
||||||
|
|
||||||
Due to updates in glibc locale data, the way the information is sorted in put in text indexes will change hence it would be beneficial to reindex the data so no data corruption arises in near future.
|
|
||||||
|
|
||||||
#### 11\. Bash 5.0 by Default
|
|
||||||
|
|
||||||
You probably have already about the [new features in Bash 5.0][11], this version is already in Debian.
|
|
||||||
|
|
||||||
#### 12\. Debian implementing /usr/merge
|
|
||||||
|
|
||||||
An excellent freedesktop [primer][12] on what /usr/merge brings is already shared. Couple of things to note though. While Debian would like to do the whole transition, there is possibility that due to unforseen circumstances, some binaries may not be in a position to do the change. One point to note though, /var and /etc/ will be left alone so people who are using containers or cloud would not have to worry too much :)
|
|
||||||
|
|
||||||
#### 13\. Secure-boot support
|
|
||||||
|
|
||||||
With Buster RC1, Debian now has secure-boot support. Which means machines which have the secure-boot bit turned on in the machine should be easily able to install Debian on such machines. No need to disable or workaround Secure boot anymore :)
|
|
||||||
|
|
||||||
#### 14\. Calameres Live-installer for Debian-Live images
|
|
||||||
|
|
||||||
For Debian buster, Debian Live, Debian introduces [Calameres Installer][13] instead of plain old debian-installer. While the Debian-installer has lot many features than Calameres, for newbies Calameres provides a fresh alternative to install than debian-installer. Some screenshots from the installation process.
|
|
||||||
|
|
||||||
![Calamares Partitioning Stage][14]
|
|
||||||
|
|
||||||
As can be seen it is pretty easy to Install Debian under Calamares, only 5 stages to go through and you can have Debian installed at your end.
|
|
||||||
|
|
||||||
### Download Debian 10 Live Images (only for testing)
|
|
||||||
|
|
||||||
Don’t use it on production machines just yet. Try it on a test machine or a virtual machine.
|
|
||||||
|
|
||||||
You can get Debian 64-bit and 32 bit images from Debian Live [directory][15]. If you want the 64-bit look into 64-bit directory, if you want the 32-bit, you can look into the 32-bit directory.
|
|
||||||
|
|
||||||
[Debian 10 Buster Live Images][15]
|
|
||||||
|
|
||||||
If you upgrade from existing stable and something breaks, see if it is reported against the [upgrade-reports][16] psuedo-package using [reportbug][17] you saw the issue with. If the bug has not reported in the package then report it and share as much information as you can.
|
|
||||||
|
|
||||||
**In Conclusion**
|
|
||||||
|
|
||||||
While thousands of packages have been updated and it is virtually impossible to list them all. I have tired to list some of the major changes that you can look for in Debian buster. What do you think of it?
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://itsfoss.com/new-features-coming-to-debian-10-buster-release/
|
|
||||||
|
|
||||||
作者:[Shirish][a]
|
|
||||||
选题:[lujun9972][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://itsfoss.com/author/shirish/
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://wiki.debian.org/DebianBuster
|
|
||||||
[2]: https://www.debian.org/
|
|
||||||
[3]: https://en.wikipedia.org/wiki/Common_Vulnerabilities_and_Exposures
|
|
||||||
[4]: https://itsfoss.com/reasons-why-i-love-debian/
|
|
||||||
[5]: https://wiki.debian.org/DebianArt/Themes/futurePrototype
|
|
||||||
[6]: https://itsfoss.com/wp-content/uploads/2019/04/debian-buster-theme-800x450.png
|
|
||||||
[7]: https://wiki.debian.org/AppArmor
|
|
||||||
[8]: https://itsfoss.com/install-nodejs-ubuntu/
|
|
||||||
[9]: https://www.python.org/dev/peps/pep-0373/
|
|
||||||
[10]: https://www.list.org/
|
|
||||||
[11]: https://itsfoss.com/bash-5-release/
|
|
||||||
[12]: https://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/
|
|
||||||
[13]: https://calamares.io/about/
|
|
||||||
[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/04/calamares-partitioning-wizard.jpg?fit=800%2C538&ssl=1
|
|
||||||
[15]: https://cdimage.debian.org/cdimage/weekly-live-builds/
|
|
||||||
[16]: https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=upgrade-reports;dist=unstable
|
|
||||||
[17]: https://itsfoss.com/bug-report-debian/
|
|
@ -1,66 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: ( )
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (8 environment-friendly open software projects you should know)
|
|
||||||
[#]: via: (https://opensource.com/article/19/4/environment-projects)
|
|
||||||
[#]: author: (Laura Hilliger https://opensource.com/users/laurahilliger)
|
|
||||||
|
|
||||||
8 environment-friendly open software projects you should know
|
|
||||||
======
|
|
||||||
Celebrate Earth Day by contributing to these projects dedicated to
|
|
||||||
improving our environment.
|
|
||||||
![][1]
|
|
||||||
|
|
||||||
For the last few years, I've been helping [Greenpeace][2] build its first fully open source software project, Planet 4. [Planet 4][3] is a global engagement platform where Greenpeace supporters and activists can interact and engage with the organization. The goal is to drive people to action on behalf of our planet. We want to invite participation and use people power to battle global issues like climate change and plastic pollution. Developers, designers, writers, contributors, and others who are looking for an open source way to support environmentalism are more than welcome to [get involved][4]!
|
|
||||||
|
|
||||||
Planet 4 is far from the only open source project focused on the environment. For Earth Day, I thought I'd share seven other open source projects that have our planet in mind.
|
|
||||||
|
|
||||||
**[Eco Hacker Farm][5]** works to support sustainable communities. It advises and supports projects combining hackerspaces/hackbases and permaculture living. The organization also has online software projects. Visit its [wiki][6] or reach out on [Twitter][7] to learn more about what Eco Hacker Farm is doing.
|
|
||||||
|
|
||||||
**[Public Lab][8]** is an open community and nonprofit organization that works to put science in the hands of citizens. Formed after the BP oil disaster in 2010, Public Lab works with open source to aid environmental exploration and investigation. It's a diverse community with lots of ways to [contribute][9].
|
|
||||||
|
|
||||||
A while back, Don Watkins, a community moderator here on Opensource.com, wrote about **[Open Climate Workbench][10]** , a project from the Apache Foundation. The [OCW][11] provides software to do climate modeling and evaluation, which can have all sorts of applications.
|
|
||||||
|
|
||||||
**[Open Source Ecology][12]** is a project that aims to improve how our economy functions. With an eye on environmental regeneration and social justice, the project seeks to redefine some of our dirty production and distribution techniques to create a more sustainable civilization.
|
|
||||||
|
|
||||||
Fostering collaboration around open source and big data tools to enable research in ocean, atmosphere, land, and climate, " **[Pangeo][13]** is first and foremost a community promoting open, reproducible, and scalable science." Big data can change the world!
|
|
||||||
|
|
||||||
**[**Leaflet**][14]** is a well-known open source JavaScript library. It can be used for all sorts of things, including environmentally friendly projects like the [Arctic Web Map][15], which allows scientists to accurately visualize and analyze the arctic region, a critical ability for climate research.
|
|
||||||
|
|
||||||
And of course, no list would be complete (not that this is a complete list!) without pointing to my friends at Mozilla. The **[Mozilla Science Lab][16]** community is, like all of Mozilla, fiercely open, and it's committed to bringing open source principles to the scientific community. Its projects and communities enable scientists to do the sorts of research our world needs to address some of the most pervasive environmental issues.
|
|
||||||
|
|
||||||
### How you can contribute
|
|
||||||
|
|
||||||
This Earth Day, make a six-month commitment to contribute some of your time to an open source project that helps fight climate change or otherwise encourages people to step up for Mother Earth. There must be scores of environmentally minded open source projects out there, so please leave your favorites in the comments!
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://opensource.com/article/19/4/environment-projects
|
|
||||||
|
|
||||||
作者:[Laura Hilliger][a]
|
|
||||||
选题:[lujun9972][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://opensource.com/users/laurahilliger
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/world_hands_diversity.png?itok=zm4EDxgE
|
|
||||||
[2]: http://www.greenpeace.org
|
|
||||||
[3]: http://medium.com/planet4
|
|
||||||
[4]: https://planet4.greenpeace.org/community/#partners-open-sourcers
|
|
||||||
[5]: https://wiki.ecohackerfarm.org/start
|
|
||||||
[6]: https://wiki.ecohackerfarm.org/
|
|
||||||
[7]: https://twitter.com/EcoHackerFarm
|
|
||||||
[8]: https://publiclab.org/
|
|
||||||
[9]: https://publiclab.org/contribute
|
|
||||||
[10]: https://opensource.com/article/17/1/apache-open-climate-workbench
|
|
||||||
[11]: https://climate.apache.org/
|
|
||||||
[12]: https://wiki.opensourceecology.org/wiki/Project_needs
|
|
||||||
[13]: http://pangeo.io/
|
|
||||||
[14]: https://leafletjs.com/
|
|
||||||
[15]: https://webmap.arcticconnect.ca/#ac_3573/2/20.8/-65.5
|
|
||||||
[16]: https://science.mozilla.org/
|
|
@ -1,341 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: ( )
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (How To Monitor Disk I/O Activity Using iotop And iostat Commands In Linux?)
|
|
||||||
[#]: via: (https://www.2daygeek.com/monitor-disk-io-activity-using-iotop-iostat-command-in-linux/)
|
|
||||||
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
|
|
||||||
|
|
||||||
How To Monitor Disk I/O Activity Using iotop And iostat Commands In Linux?
|
|
||||||
======
|
|
||||||
|
|
||||||
Do you know what are the tools we can use for troubleshooting or monitoring real-time disk activity in Linux?
|
|
||||||
|
|
||||||
If **[Linux system performance][1]** gets slow down we may use **[top command][2]** to see the system performance.
|
|
||||||
|
|
||||||
It is used to check what are the processes are consuming high utilization on server.
|
|
||||||
|
|
||||||
It’s common for most of the Linux administrator.
|
|
||||||
|
|
||||||
It’s widely used by Linux administrator in the real world.
|
|
||||||
|
|
||||||
If you don’t see much difference in the process output still you have an option to check other things.
|
|
||||||
|
|
||||||
I would like to advise you to check `wa` status in the top output because most of the time the server performance will be degraded due to high I/O Read and Write on hard disk.
|
|
||||||
|
|
||||||
If it’s high or fluctuation, it could be a cause. So, we need to check I/O activity on hard drive.
|
|
||||||
|
|
||||||
We can monitory disk I/O statistics for all disks and file system in Linux system using `iotop` and `iostat` commands.
|
|
||||||
|
|
||||||
### What Is iotop?
|
|
||||||
|
|
||||||
iotop is a top-like utility for displaying real-time disk activity.
|
|
||||||
|
|
||||||
iotop watches I/O usage information output by the Linux kernel and displays a table of current I/O usage by processes or threads on the system.
|
|
||||||
|
|
||||||
It displays the I/O bandwidth read and written by each process/thread. It also displays the percentage of time the thread/process spent while swapping in and while waiting on I/O.
|
|
||||||
|
|
||||||
Total DISK READ and Total DISK WRITE values represent total read and write bandwidth between processes and kernel threads on the one side and kernel block device subsystem on the other.
|
|
||||||
|
|
||||||
Actual DISK READ and Actual DISK WRITE values represent corresponding bandwidths for actual disk I/O between kernel block device subsystem and underlying hardware (HDD, SSD, etc.).
|
|
||||||
|
|
||||||
### How To Install iotop In Linux?
|
|
||||||
|
|
||||||
We can easily install it with help of package manager since the package is available in all the Linux distributions repository.
|
|
||||||
|
|
||||||
For **`Fedora`** system, use **[DNF Command][3]** to install iotop.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo dnf install iotop
|
|
||||||
```
|
|
||||||
|
|
||||||
For **`Debian/Ubuntu`** systems, use **[APT-GET Command][4]** or **[APT Command][5]** to install iotop.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo apt install iotop
|
|
||||||
```
|
|
||||||
|
|
||||||
For **`Arch Linux`** based systems, use **[Pacman Command][6]** to install iotop.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo pacman -S iotop
|
|
||||||
```
|
|
||||||
|
|
||||||
For **`RHEL/CentOS`** systems, use **[YUM Command][7]** to install iotop.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo yum install iotop
|
|
||||||
```
|
|
||||||
|
|
||||||
For **`openSUSE Leap`** system, use **[Zypper Command][8]** to install iotop.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo zypper install iotop
|
|
||||||
```
|
|
||||||
|
|
||||||
### How To Monitor Disk I/O Activity/Statistics In Linux Using iotop Command?
|
|
||||||
|
|
||||||
There are many options are available in iotop command to check varies statistics about disk I/O.
|
|
||||||
|
|
||||||
Run the iotop command without any arguments to see each process or thread current I/O usage.
|
|
||||||
|
|
||||||
```
|
|
||||||
# iotop
|
|
||||||
```
|
|
||||||
|
|
||||||
[![][9]![][9]][10]
|
|
||||||
|
|
||||||
If you would like to check which process are actually doing IO then run the iotop command with `-o` or `--only` option.
|
|
||||||
|
|
||||||
```
|
|
||||||
# iotop --only
|
|
||||||
```
|
|
||||||
|
|
||||||
[![][9]![][9]][11]
|
|
||||||
|
|
||||||
**Details:**
|
|
||||||
|
|
||||||
* **`IO:`** It shows I/O utilization for each process, which includes disk and swap.
|
|
||||||
* **`SWAPIN:`** It shows only the swap usage of each process.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### What Is iostat?
|
|
||||||
|
|
||||||
iostat is used to report Central Processing Unit (CPU) statistics and input/output statistics for devices and partitions.
|
|
||||||
|
|
||||||
The iostat command is used for monitoring system input/output device loading by observing the time the devices are active in relation to their average transfer rates.
|
|
||||||
|
|
||||||
The iostat command generates reports that can be used to change system configuration to better balance the input/output load between physical disks.
|
|
||||||
|
|
||||||
All statistics are reported each time the iostat command is run. The report consists of a CPU header row followed by a row of CPU statistics.
|
|
||||||
|
|
||||||
On multiprocessor systems, CPU statistics are calculated system-wide as averages among all processors. A device header row is displayed followed by a line of statistics for each device that is configured.
|
|
||||||
|
|
||||||
The iostat command generates two types of reports, the CPU Utilization report and the Device Utilization report.
|
|
||||||
|
|
||||||
### How To Install iostat In Linux?
|
|
||||||
|
|
||||||
iostat tool is part of sysstat package so, We can easily install it with help of package manager since the package is available in all the Linux distributions repository.
|
|
||||||
|
|
||||||
For **`Fedora`** system, use **[DNF Command][3]** to install sysstat.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo dnf install sysstat
|
|
||||||
```
|
|
||||||
|
|
||||||
For **`Debian/Ubuntu`** systems, use **[APT-GET Command][4]** or **[APT Command][5]** to install sysstat.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo apt install sysstat
|
|
||||||
```
|
|
||||||
|
|
||||||
For **`Arch Linux`** based systems, use **[Pacman Command][6]** to install sysstat.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo pacman -S sysstat
|
|
||||||
```
|
|
||||||
|
|
||||||
For **`RHEL/CentOS`** systems, use **[YUM Command][7]** to install sysstat.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo yum install sysstat
|
|
||||||
```
|
|
||||||
|
|
||||||
For **`openSUSE Leap`** system, use **[Zypper Command][8]** to install sysstat.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo zypper install sysstat
|
|
||||||
```
|
|
||||||
|
|
||||||
### How To Monitor Disk I/O Activity/Statistics In Linux Using sysstat Command?
|
|
||||||
|
|
||||||
There are many options are available in iostat command to check varies statistics about disk I/O and CPU.
|
|
||||||
|
|
||||||
Run the iostat command without any arguments to see complete statistics of the system.
|
|
||||||
|
|
||||||
```
|
|
||||||
# iostat
|
|
||||||
|
|
||||||
Linux 4.19.32-1-MANJARO (daygeek-Y700) Thursday 18 April 2019 _x86_64_ (8 CPU)
|
|
||||||
|
|
||||||
avg-cpu: %user %nice %system %iowait %steal %idle
|
|
||||||
29.45 0.02 16.47 0.12 0.00 53.94
|
|
||||||
|
|
||||||
Device tps kB_read/s kB_wrtn/s kB_dscd/s kB_read kB_wrtn kB_dscd
|
|
||||||
nvme0n1 6.68 126.95 124.97 0.00 58420014 57507206 0
|
|
||||||
sda 0.18 6.77 80.24 0.00 3115036 36924764 0
|
|
||||||
loop0 0.00 0.00 0.00 0.00 2160 0 0
|
|
||||||
loop1 0.00 0.00 0.00 0.00 1093 0 0
|
|
||||||
loop2 0.00 0.00 0.00 0.00 1077 0 0
|
|
||||||
```
|
|
||||||
|
|
||||||
Run the iostat command with `-d` option to see I/O statistics for all the devices
|
|
||||||
|
|
||||||
```
|
|
||||||
# iostat -d
|
|
||||||
|
|
||||||
Linux 4.19.32-1-MANJARO (daygeek-Y700) Thursday 18 April 2019 _x86_64_ (8 CPU)
|
|
||||||
|
|
||||||
Device tps kB_read/s kB_wrtn/s kB_dscd/s kB_read kB_wrtn kB_dscd
|
|
||||||
nvme0n1 6.68 126.95 124.97 0.00 58420030 57509090 0
|
|
||||||
sda 0.18 6.77 80.24 0.00 3115292 36924764 0
|
|
||||||
loop0 0.00 0.00 0.00 0.00 2160 0 0
|
|
||||||
loop1 0.00 0.00 0.00 0.00 1093 0 0
|
|
||||||
loop2 0.00 0.00 0.00 0.00 1077 0 0
|
|
||||||
```
|
|
||||||
|
|
||||||
Run the iostat command with `-p` option to see I/O statistics for all the devices and their partitions.
|
|
||||||
|
|
||||||
```
|
|
||||||
# iostat -p
|
|
||||||
|
|
||||||
Linux 4.19.32-1-MANJARO (daygeek-Y700) Thursday 18 April 2019 _x86_64_ (8 CPU)
|
|
||||||
|
|
||||||
avg-cpu: %user %nice %system %iowait %steal %idle
|
|
||||||
29.42 0.02 16.45 0.12 0.00 53.99
|
|
||||||
|
|
||||||
Device tps kB_read/s kB_wrtn/s kB_dscd/s kB_read kB_wrtn kB_dscd
|
|
||||||
nvme0n1 6.68 126.94 124.96 0.00 58420062 57512278 0
|
|
||||||
nvme0n1p1 6.40 124.46 118.36 0.00 57279753 54474898 0
|
|
||||||
nvme0n1p2 0.27 2.47 6.60 0.00 1138069 3037380 0
|
|
||||||
sda 0.18 6.77 80.23 0.00 3116060 36924764 0
|
|
||||||
sda1 0.00 0.01 0.00 0.00 3224 0 0
|
|
||||||
sda2 0.18 6.76 80.23 0.00 3111508 36924764 0
|
|
||||||
loop0 0.00 0.00 0.00 0.00 2160 0 0
|
|
||||||
loop1 0.00 0.00 0.00 0.00 1093 0 0
|
|
||||||
loop2 0.00 0.00 0.00 0.00 1077 0 0
|
|
||||||
```
|
|
||||||
|
|
||||||
Run the iostat command with `-x` option to see detailed I/O statistics for all the devices.
|
|
||||||
|
|
||||||
```
|
|
||||||
# iostat -x
|
|
||||||
|
|
||||||
Linux 4.19.32-1-MANJARO (daygeek-Y700) Thursday 18 April 2019 _x86_64_ (8 CPU)
|
|
||||||
|
|
||||||
avg-cpu: %user %nice %system %iowait %steal %idle
|
|
||||||
29.41 0.02 16.45 0.12 0.00 54.00
|
|
||||||
|
|
||||||
Device r/s rkB/s rrqm/s %rrqm r_await rareq-sz w/s wkB/s wrqm/s %wrqm w_await wareq-sz d/s dkB/s drqm/s %drqm d_await dareq-sz aqu-sz %util
|
|
||||||
nvme0n1 2.45 126.93 0.60 19.74 0.40 51.74 4.23 124.96 5.12 54.76 3.16 29.54 0.00 0.00 0.00 0.00 0.00 0.00 0.31 30.28
|
|
||||||
sda 0.06 6.77 0.00 0.00 8.34 119.20 0.12 80.23 19.94 99.40 31.84 670.73 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.13
|
|
||||||
loop0 0.00 0.00 0.00 0.00 0.08 19.64 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
|
||||||
loop1 0.00 0.00 0.00 0.00 0.40 12.86 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
|
||||||
loop2 0.00 0.00 0.00 0.00 0.38 19.58 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
|
||||||
```
|
|
||||||
|
|
||||||
Run the iostat command with `-d [Device_Name]` option to see I/O statistics of particular device and their partitions.
|
|
||||||
|
|
||||||
```
|
|
||||||
# iostat -p [Device_Name]
|
|
||||||
|
|
||||||
# iostat -p sda
|
|
||||||
|
|
||||||
Linux 4.19.32-1-MANJARO (daygeek-Y700) Thursday 18 April 2019 _x86_64_ (8 CPU)
|
|
||||||
|
|
||||||
avg-cpu: %user %nice %system %iowait %steal %idle
|
|
||||||
29.38 0.02 16.43 0.12 0.00 54.05
|
|
||||||
|
|
||||||
Device tps kB_read/s kB_wrtn/s kB_dscd/s kB_read kB_wrtn kB_dscd
|
|
||||||
sda 0.18 6.77 80.21 0.00 3117468 36924764 0
|
|
||||||
sda2 0.18 6.76 80.21 0.00 3112916 36924764 0
|
|
||||||
sda1 0.00 0.01 0.00 0.00 3224 0 0
|
|
||||||
```
|
|
||||||
|
|
||||||
Run the iostat command with `-m` option to see I/O statistics with `MB` for all the devices instead of `KB`. By default it shows the output with KB.
|
|
||||||
|
|
||||||
```
|
|
||||||
# iostat -m
|
|
||||||
|
|
||||||
Linux 4.19.32-1-MANJARO (daygeek-Y700) Thursday 18 April 2019 _x86_64_ (8 CPU)
|
|
||||||
|
|
||||||
avg-cpu: %user %nice %system %iowait %steal %idle
|
|
||||||
29.36 0.02 16.41 0.12 0.00 54.09
|
|
||||||
|
|
||||||
Device tps MB_read/s MB_wrtn/s MB_dscd/s MB_read MB_wrtn MB_dscd
|
|
||||||
nvme0n1 6.68 0.12 0.12 0.00 57050 56176 0
|
|
||||||
sda 0.18 0.01 0.08 0.00 3045 36059 0
|
|
||||||
loop0 0.00 0.00 0.00 0.00 2 0 0
|
|
||||||
loop1 0.00 0.00 0.00 0.00 1 0 0
|
|
||||||
loop2 0.00 0.00 0.00 0.00 1 0 0
|
|
||||||
```
|
|
||||||
|
|
||||||
Run the iostat command with certain interval then use the following format. In this example, we are going to capture totally two reports at five seconds interval.
|
|
||||||
|
|
||||||
```
|
|
||||||
# iostat [Interval] [Number Of Reports]
|
|
||||||
|
|
||||||
# iostat 5 2
|
|
||||||
|
|
||||||
Linux 4.19.32-1-MANJARO (daygeek-Y700) Thursday 18 April 2019 _x86_64_ (8 CPU)
|
|
||||||
|
|
||||||
avg-cpu: %user %nice %system %iowait %steal %idle
|
|
||||||
29.35 0.02 16.41 0.12 0.00 54.10
|
|
||||||
|
|
||||||
Device tps kB_read/s kB_wrtn/s kB_dscd/s kB_read kB_wrtn kB_dscd
|
|
||||||
nvme0n1 6.68 126.89 124.95 0.00 58420116 57525344 0
|
|
||||||
sda 0.18 6.77 80.20 0.00 3118492 36924764 0
|
|
||||||
loop0 0.00 0.00 0.00 0.00 2160 0 0
|
|
||||||
loop1 0.00 0.00 0.00 0.00 1093 0 0
|
|
||||||
loop2 0.00 0.00 0.00 0.00 1077 0 0
|
|
||||||
|
|
||||||
avg-cpu: %user %nice %system %iowait %steal %idle
|
|
||||||
3.71 0.00 2.51 0.05 0.00 93.73
|
|
||||||
|
|
||||||
Device tps kB_read/s kB_wrtn/s kB_dscd/s kB_read kB_wrtn kB_dscd
|
|
||||||
nvme0n1 19.00 0.20 311.40 0.00 1 1557 0
|
|
||||||
sda 0.20 25.60 0.00 0.00 128 0 0
|
|
||||||
loop0 0.00 0.00 0.00 0.00 0 0 0
|
|
||||||
loop1 0.00 0.00 0.00 0.00 0 0 0
|
|
||||||
loop2 0.00 0.00 0.00 0.00 0 0 0
|
|
||||||
```
|
|
||||||
|
|
||||||
Run the iostat command with `-N` option to see the LVM disk I/O statistics report.
|
|
||||||
|
|
||||||
```
|
|
||||||
# iostat -N
|
|
||||||
|
|
||||||
Linux 4.15.0-47-generic (Ubuntu18.2daygeek.com) Thursday 18 April 2019 _x86_64_ (2 CPU)
|
|
||||||
|
|
||||||
avg-cpu: %user %nice %system %iowait %steal %idle
|
|
||||||
0.38 0.07 0.18 0.26 0.00 99.12
|
|
||||||
|
|
||||||
Device tps kB_read/s kB_wrtn/s kB_read kB_wrtn
|
|
||||||
sda 3.60 57.07 69.06 968729 1172340
|
|
||||||
sdb 0.02 0.33 0.00 5680 0
|
|
||||||
sdc 0.01 0.12 0.00 2108 0
|
|
||||||
2g-2gvol1 0.00 0.07 0.00 1204 0
|
|
||||||
```
|
|
||||||
|
|
||||||
Run the nfsiostat command to see the I/O statistics for Network File System(NFS).
|
|
||||||
|
|
||||||
```
|
|
||||||
# nfsiostat
|
|
||||||
```
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://www.2daygeek.com/monitor-disk-io-activity-using-iotop-iostat-command-in-linux/
|
|
||||||
|
|
||||||
作者:[Magesh Maruthamuthu][a]
|
|
||||||
选题:[lujun9972][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://www.2daygeek.com/author/magesh/
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://www.2daygeek.com/category/monitoring-tools/
|
|
||||||
[2]: https://www.2daygeek.com/linux-top-command-linux-system-performance-monitoring-tool/
|
|
||||||
[3]: https://www.2daygeek.com/dnf-command-examples-manage-packages-fedora-system/
|
|
||||||
[4]: https://www.2daygeek.com/apt-get-apt-cache-command-examples-manage-packages-debian-ubuntu-systems/
|
|
||||||
[5]: https://www.2daygeek.com/apt-command-examples-manage-packages-debian-ubuntu-systems/
|
|
||||||
[6]: https://www.2daygeek.com/pacman-command-examples-manage-packages-arch-linux-system/
|
|
||||||
[7]: https://www.2daygeek.com/yum-command-examples-manage-packages-rhel-centos-systems/
|
|
||||||
[8]: https://www.2daygeek.com/zypper-command-examples-manage-packages-opensuse-system/
|
|
||||||
[9]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
|
|
||||||
[10]: https://www.2daygeek.com/wp-content/uploads/2015/03/monitor-disk-io-activity-using-iotop-iostat-command-in-linux-1.jpg
|
|
||||||
[11]: https://www.2daygeek.com/wp-content/uploads/2015/03/monitor-disk-io-activity-using-iotop-iostat-command-in-linux-2.jpg
|
|
@ -1,98 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: ( )
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (Tracking the weather with Python and Prometheus)
|
|
||||||
[#]: via: (https://opensource.com/article/19/4/weather-python-prometheus)
|
|
||||||
[#]: author: (Moshe Zadka https://opensource.com/users/moshez)
|
|
||||||
|
|
||||||
Tracking the weather with Python and Prometheus
|
|
||||||
======
|
|
||||||
Create a custom Prometheus integration to keep track of the biggest
|
|
||||||
cloud provider of all: Mother Earth.
|
|
||||||
![Tree clouds][1]
|
|
||||||
|
|
||||||
Open source monitoring system [Prometheus][2] has integrations to track many types of time-series data, but if you want an integration that doesn't yet exist, it's easy to build one. An often-used example is a custom integration with a cloud provider that uses the provider's APIs to grab specific metrics. In this example, though, we will integrate with the biggest cloud provider of all: Earth.
|
|
||||||
|
|
||||||
Luckily, the US government already measures the weather and provides an easy API for integrations. Getting the weather forecast for the next hour at Red Hat headquarters is simple.
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
import requests
|
|
||||||
HOURLY_RED_HAT = "<https://api.weather.gov/gridpoints/RAH/73,57/forecast/hourly>"
|
|
||||||
def get_temperature():
|
|
||||||
result = requests.get(HOURLY_RED_HAT)
|
|
||||||
return result.json()["properties"]["periods"][0]["temperature"]
|
|
||||||
```
|
|
||||||
|
|
||||||
Now that our integration with Earth is done, it's time to make sure Prometheus can understand what we are saying. We can use the [Prometheus Python library][3] to create a registry with one _gauge_ : the temperature at Red Hat HQ.
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
from prometheus_client import CollectorRegistry, Gauge
|
|
||||||
def prometheus_temperature(num):
|
|
||||||
registry = CollectorRegistry()
|
|
||||||
g = Gauge("red_hat_temp", "Temperature at Red Hat HQ", registry=registry)
|
|
||||||
g.set(num)
|
|
||||||
return registry
|
|
||||||
```
|
|
||||||
|
|
||||||
Finally, we need to connect this to Prometheus in some way. That depends a little on the network topology for Prometheus: whether it is easier for Prometheus to talk to our service, or whether the reverse is easier.
|
|
||||||
|
|
||||||
The first case is the one usually recommended, if possible, so we need to build a web server exposing the registry and then configure Prometheus to _scrape_ it.
|
|
||||||
|
|
||||||
We can build a simple web server with [Pyramid][4].
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
from pyramid.config import Configurator
|
|
||||||
from pyramid.response import Response
|
|
||||||
from prometheus_client import generate_latest, CONTENT_TYPE_LATEST
|
|
||||||
def metrics_web(request):
|
|
||||||
registry = prometheus_temperature(get_temperature())
|
|
||||||
return Response(generate_latest(registry),
|
|
||||||
content_type=CONTENT_TYPE_LATEST)
|
|
||||||
config = Configurator()
|
|
||||||
config.add_route('metrics', '/metrics')
|
|
||||||
config.add_view(metrics_web, route_name='metrics')
|
|
||||||
app = config.make_wsgi_app()
|
|
||||||
```
|
|
||||||
|
|
||||||
This can be run with any Web Server Gateway Interface (WSGI) server. For example, we can use **python -m twisted web --wsgi earth.app** to run it, assuming we put the code in **earth.py**.
|
|
||||||
|
|
||||||
Alternatively, if it is easier for our code to connect to Prometheus, we can push it to Prometheus's [Push gateway][5] periodically.
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
import time
|
|
||||||
from prometheus_client import push_to_gateway
|
|
||||||
def push_temperature(url):
|
|
||||||
while True:
|
|
||||||
registry = prometheus_temperature(get_temperature())
|
|
||||||
push_to_gateway(url, "temperature collector", registry)
|
|
||||||
time.sleep(60*60)
|
|
||||||
```
|
|
||||||
|
|
||||||
The URL is the one for the Push gateway; it often ends in **:9091**.
|
|
||||||
|
|
||||||
Good luck building your own custom Prometheus integration so you can track all the things!
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://opensource.com/article/19/4/weather-python-prometheus
|
|
||||||
|
|
||||||
作者:[Moshe Zadka ][a]
|
|
||||||
选题:[lujun9972][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://opensource.com/users/moshez
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life_tree_clouds.png?itok=b_ftihhP (Tree clouds)
|
|
||||||
[2]: https://prometheus.io/
|
|
||||||
[3]: https://github.com/prometheus/client_python
|
|
||||||
[4]: https://trypyramid.com/
|
|
||||||
[5]: https://github.com/prometheus/pushgateway
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user