From ced4e88ae3a82f4ff0a63a61e9f1c84d4a07b0c5 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 29 Jun 2017 08:56:15 +0800 Subject: [PATCH 001/100] translated --- ...nd Maintenance Tool For UbuntuLinuxMint.md | 44 +++++++++---------- 1 file changed, 21 insertions(+), 23 deletions(-) rename {sources => translated}/tech/20170607 uCareSystem - All-In-One System Update And Maintenance Tool For UbuntuLinuxMint.md (63%) diff --git a/sources/tech/20170607 uCareSystem - All-In-One System Update And Maintenance Tool For UbuntuLinuxMint.md b/translated/tech/20170607 uCareSystem - All-In-One System Update And Maintenance Tool For UbuntuLinuxMint.md similarity index 63% rename from sources/tech/20170607 uCareSystem - All-In-One System Update And Maintenance Tool For UbuntuLinuxMint.md rename to translated/tech/20170607 uCareSystem - All-In-One System Update And Maintenance Tool For UbuntuLinuxMint.md index 7f430b613e..bf5492d71c 100644 --- a/sources/tech/20170607 uCareSystem - All-In-One System Update And Maintenance Tool For UbuntuLinuxMint.md +++ b/translated/tech/20170607 uCareSystem - All-In-One System Update And Maintenance Tool For UbuntuLinuxMint.md @@ -1,40 +1,38 @@ -translating---geekpi - -uCareSystem – All-In-One System Update And Maintenance Tool For Ubuntu/LinuxMint +uCareSystem - Ubuntu/Linux Mint 的一体化系统更新和维护工具 ============================================================ -[uCareSystem Core][2] is a thin utility that automates the basic system maintenance activity, in other hand it will reduce system administrator task in many ways and save some good amount of time. It doesn’t have any GUI and offers purely command line interface to perform the activity. +[uCareSystem Core][2] 是一种能够自动执行基本系统维护活动的轻型实用程序,另一方面它可以通过多种方式减少系统管理员的任务,节省大量时间。它没有任何 GUI,并提供纯粹的命令行界面来执行活动。 -There are several utilities available in Ubuntu to perform system maintenance activity. Each tool has their own unique features and designed accordingly. You can automate this task by adding a cron-job. +Ubuntu 中有几种实用程序来执行系统维护活动。每种工具有它们相应的独特功能和设计。你可以添加一个 cron 任务来自动化这些任务。 -uCareSystem Core will automatically refresh distribution repository, Updates the list of available packages, uninstall packages (obsolete, orphaned & old Linux Kernels) & Clears the retrieved packages to save some disk space on system. +uCareSystem Core 会自动刷新发行版仓库、更新可用包列表、卸载包(过期包、孤儿包和旧的 Linux 内核)以及清理取回的包来节省系统磁盘空间。 -Suggested Read : [Stacer – Linux System Optimizer and Monitoring Tool][3] +建议阅读:[Stacer - Linux 系统优化器及监控工具][3] -Suggested Read : [BleachBit – A Quick And Best Way to Clean Up Your System In Linux][4] +建议阅读:[BleachBit – 快速及最佳的方式清理你的 Linux 系统][4] -Suggested Read : [Free Up Some Space in Ubuntu/LinuxMint With Ubuntu Cleaner (Fork of Janitor Module)][5] +建议阅读:[用 Ubuntu Cleaner(Janitor Module 的分支)在 Ubuntu/LinuxMint 中释放一些空间][5] -#### uCareSystem Core Features +#### uCareSystem Core 功能 -* Update package lists (It will refresh package index) +* 更新包列表(它将刷新包索引) -* Downloads and install updates +* 下载及安装更新 -* Update packages and system libraries to latest available version +* 更新包及系统库到最新版本 -* Remove unneeded, obsolete & orphaned packages +* 移除不需要的、过期和孤儿包。 -* Remove old kernels (It keeps the current and previous one for safety purpose) +* 移除旧内核(它为了安全保留当前和之前一个内核) -* Remove unused config files +* 移除不需要的配置文件 -* Clean downloaded temporary packages +* 清理已下载的临时包 -#### Install uCareSystem Core In Ubuntu/LinuxMint +#### 在 Ubuntu/LinuxMint 中安装 uCareSystem Core -We can easily install uCareSystem Core in Ubuntu/LinuxMint through PPA since developer offering the own PPA. +因为开发者提供了自己的 PPA,因此我们可以轻易地通过 PPA 在 Ubuntu/LinuxMint 中安装 uCareSystem Core。 ``` $ sudo add-apt-repository ppa:utappia/stable @@ -42,7 +40,7 @@ $ sudo apt update $ sudo apt install ucaresystem-core ``` -We have successfully installed `uCareSystem Core` package and going to check current disk space utilization with help of `df -h`command before executing uCareSystem Core command to know whether it will save some disk space or not? +我们已经成功安装了 `uCareSystem Core` 包并且在执行 CareSystem Core 命令之前要了解它是否会节省磁盘空间,使用 `df -h` 命令检查当前磁盘利用率。 ``` $ df -h @@ -56,7 +54,7 @@ tmpfs 999M 0 999M 0% /sys/fs/cgroup tmpfs 200M 112K 200M 1% /run/user/1000 ``` -Just run an `ucaresystem-core` command in terminal and sitback reset it will take care automatically and no human interaction requires till the end. +只需在终端中运行 `ucaresystem-core` 命令, 在结束之前它会自动执行而不需要人类交互。 ``` $ sudo ucaresystem-core @@ -117,7 +115,7 @@ Del terminix 1.5.6-1~webupd8~yakkety1 [13.7 kB] ######################### ``` -I could see that, it does the job as expected. Also found it saved almost `2GB` in `/ partition`. +我可以看见它如预期那样工作。同样也可以发现大概在`/ 分区`节省了 `2GB`。 ``` $ df -h @@ -136,7 +134,7 @@ tmpfs 200M 112K 200M 1% /run/user/1000 via: http://www.2daygeek.com/ucaresystem-system-update-and-maintenance-tool-for-ubuntu-linuxmint/ 作者:[2DAYGEEK ][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 41562579d7eca0b99d7368a1fbff1dc9b6bda51e Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 29 Jun 2017 08:58:21 +0800 Subject: [PATCH 002/100] translating --- .../20161214 BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20161214 BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md b/sources/tech/20161214 BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md index f1a9fdbcfb..98a0b62fbf 100644 --- a/sources/tech/20161214 BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md +++ b/sources/tech/20161214 BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md @@ -1,3 +1,5 @@ +translating---geekpi + BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3 ============================================================ From 13fd74f8b3ac4b664b848b0c42a500e3bcbd3d34 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 29 Jun 2017 10:37:21 +0800 Subject: [PATCH 003/100] =?UTF-8?q?PRF&PUB:20170623=20Pass=20=E2=80=93=20A?= =?UTF-8?q?=20Simple=20command-line=20Password=20Manager=20for=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @chenxinlong --- ...e command-line Password Manager for Linux.md | 69 ++++++++++--------- 1 file changed, 35 insertions(+), 34 deletions(-) rename {translated/tech => published}/20170623 Pass – A Simple command-line Password Manager for Linux.md (72%) diff --git a/translated/tech/20170623 Pass – A Simple command-line Password Manager for Linux.md b/published/20170623 Pass – A Simple command-line Password Manager for Linux.md similarity index 72% rename from translated/tech/20170623 Pass – A Simple command-line Password Manager for Linux.md rename to published/20170623 Pass – A Simple command-line Password Manager for Linux.md index c4c3ab510b..4e00246f57 100644 --- a/translated/tech/20170623 Pass – A Simple command-line Password Manager for Linux.md +++ b/published/20170623 Pass – A Simple command-line Password Manager for Linux.md @@ -1,56 +1,55 @@ -Pass – 一款 Linux 的简单命令行密码管理工具 +pass:一款简单的基于 Linux 命令行的密码管理工具 ============================================================ - 现如今要记住类似 email、银行、社交媒体、在线支付、ftp 等等这么多的密码相信对每一个人来说都是一个巨大的挑战。 由于需求和使用,密码管理器现如今变得非常的流行。在 Linux 中我们可以有很多选择,包括基于 GUI 和基于 CLI 两种。今天我们要讲的是一款基于 CLI 的密码管理器叫做 pass 。 -[pass][2] 是 Linux 上的一个简单的命令行密码管理器,它将密码存储在一个 `gpg` 加密后的文件里。这些加密后的文件会被按照良好的目录结构组织存放。 +[pass][2] 是 Linux 上的一个简单的命令行密码管理器,它将密码存储在一个 `gpg` 加密后的文件里。这些加密后的文件很好地组织按目录结构存放。 -所有密码都存在于 `〜/ .password-store` 中,它提供了添加、编辑、生成和检索密码等简单命令。 +所有密码都存在于 `~/.password-store` 中,它提供了添加、编辑、生成和检索密码等简单命令。 -建议阅读:[KeePass - 存储/安全密码的最佳密码管理工具][3] +- 建议阅读:[KeePass - 存储/安全密码的最佳密码管理工具][3] -它是一个非常简短和简单的 shell 脚本。 它能够临时将密码放在剪贴板上,并使用 git 跟踪密码的修改。 +它是一个非常简短和简单的 shell 脚本。 它能够临时将密码放在剪贴板上,并使用 `git` 跟踪密码的修改。 -这是一个很小的 shell 脚本,它还使用了少量的默认工具比如 gnupg、tree 和 git,同时还有活跃的社区为它提供 GUI 和扩展。 +这是一个很小的 shell 脚本,它还使用了少量的默认工具比如 `gnupg`、`tree` 和 `git`,同时还有活跃的社区为它提供 GUI 和扩展。 -#### 如何在 Linux 中安装 Pass +### 如何在 Linux 中安装 Pass Pass 可从大多数 Linux 的主要发行版的仓库中获得。 所以,你可以使用你的分布式包管理器来安装它。 -对于基于 Debian 的系统,你可以使用 [apt-get][4] 或 [apt package manager][5] 命令来安装 pass。 +对于基于 Debian 的系统,你可以使用 [apt-get][4] 或 [apt][5] 包管理器命令来安装 pass。 ``` $ sudo apt-get install pass ``` -对于基于 RHEL/CentOS 的操作系统, 使用 [yum package manager][6] 命令来安装它。 +对于基于 RHEL/CentOS 的操作系统, 使用 [yum][6] 包管理器命令来安装它。 ``` $ sudo yum install pass ``` -Fedora 系统可用 [dnf package manager][7] 命令来安装。 +Fedora 系统可用 [dnf][7] 包管理器命令来安装。 ``` $ sudo dnf install pass ``` -openSUSE 系统可以用 [zypper package manager][8] 命令来安装。 +openSUSE 系统可以用 [zypper][8] 包管理器命令来安装。 ``` $ sudo zypper in password-store ``` -对于基于 Arch Linux 的操作系统用 [pacman package manager][9] 来安装它。 +对于基于 Arch Linux 的操作系统用 [pacman][9] 包管理器来安装它。 ``` $ pacman -S pass ``` -#### 如何生成 GPG 密钥对 +### 如何生成 GPG 密钥对 确保你拥有你个人的 GPG 密钥对。如果没有的话,你可以通过在终端中输入以下的命令并安装指导来创建你的 GPG 密钥对。 @@ -58,12 +57,12 @@ $ pacman -S pass $ gpg --gen-key ``` -运行以上的命令以生成 GPG 密钥对时会有一系列的问题询问,谨慎输入问题的答案,其中有一些只要使用默认值即可。、 +运行以上的命令以生成 GPG 密钥对时会有一系列的问题询问,谨慎输入问题的答案,其中有一些只要使用默认值即可。 -#### 初始化密码存储 +### 初始化密码存储 -如果你已经有了 GPG 密钥对,请通过运行以下命令初始化本地密码存储,你可以 pass `email-id` 或 `gpg-id`。 +如果你已经有了 GPG 密钥对,请通过运行以下命令初始化本地密码存储,你可以使用 email-id 或 gpg-id 初始化。 ``` $ pass init 2daygeek@gmail.com @@ -71,9 +70,9 @@ mkdir: created directory '/home/magi/.password-store/' Password store initialized for 2daygeek@gmail.com ``` -上述命令将在 `〜/ .password-store` 目录下创建一个密码存储区。 +上述命令将在 `~/.password-store` 目录下创建一个密码存储区。 -pass 命令提供了简单的语法来管理密码。 我们一个个来看,如何添加、编辑、生成和检索密码。 +`pass` 命令提供了简单的语法来管理密码。 我们一个个来看,如何添加、编辑、生成和检索密码。 通过下面的命令检查目录结构树。 @@ -88,9 +87,9 @@ Password Store 我没有看到任何树型结构,所以我们将根据我们的需求来创建一个。 -#### 插入一个新的密码信息 +### 插入一个新的密码信息 -我们将通过运行以下命令来保存 gmail id 及其密码。 +我们将通过运行以下命令来保存 gmail 的 id 及其密码。 ``` $ pass insert eMail/2daygeek@gmail.com @@ -98,7 +97,8 @@ mkdir: created directory '/home/magi/.password-store/eMail' Enter password for eMail/2daygeek@gmail.com: Retype password for eMail/2daygeek@gmail.com: ``` -执行重复操作,直到所有的密码插入完成。 必入保存 Facebook 密码。 + +执行重复操作,直到所有的密码插入完成。 比如保存 Facebook 密码。 ``` $ pass insert Social/Facebook_2daygeek @@ -106,6 +106,7 @@ mkdir: created directory '/home/magi/.password-store/Social' Enter password for Social/Facebook_2daygeek: Retype password for Social/Facebook_2daygeek: ``` + 我们可以列出存储中的所有现有的密码。 ``` @@ -125,18 +126,18 @@ Password Store └── sudha21.magesh@gmail.com ``` -#### 显示已有密码 +### 显示已有密码 运行以下命令从密码存储中检索密码信息,它会询问你输入密码以解锁。 - [![](http://www.2daygeek.com/wp-content/uploads/2017/06/pass-command-line-package-manager-for-linux-1.png)][10] +[![](http://www.2daygeek.com/wp-content/uploads/2017/06/pass-command-line-package-manager-for-linux-1.png)][10] ``` $ pass eMail/2daygeek@gmail.com ******* ``` -#### 在剪贴板中复制密码 +### 在剪贴板中复制密码 要直接将密码直接复制到剪贴板上,而不是在终端上输入,请使用以下更安全的命令,它会在 45 秒后自动清除密码。 @@ -145,9 +146,9 @@ $ pass -c eMail/magesh.maruthamuthu@gmail.com Copied eMail/magesh.maruthamuthu@gmail.com to clipboard. Will clear in 45 seconds. ``` -#### 生成一个新密码 +### 生成一个新密码 -如果你想生成一些比较难以猜测的密码用于代替原有的奇怪的密码,可以通过其内部的 pwgen 程序来实现。 +如果你想生成一些比较难以猜测的密码用于代替原有的奇怪密码,可以通过其内部的 `pwgen` 功能来实现。 ``` $ pass generate eMail/2daygeek@gmail.com 15 @@ -165,9 +166,9 @@ The generated password for eMail/2daygeek@gmail.com is: TP9ACLyzUZUwBwO ``` -#### 编辑现有的密码 +### 编辑现有的密码 -使用编辑器插入新密码或编辑现有密码。 当你运行下面的命令时,将会在包含密码的文本编辑器中打开文件`/ dev / shm / pass.wUyGth1Hv0rnh / 6kOBG-eMail-2daygeek @ gmail.com.txt`。 只需在其中添加新密码,然后保存并退出即可。 +使用编辑器插入新密码或编辑现有密码。 当你运行下面的命令时,将会在包含密码的文本编辑器中打开文件 `/dev/shm/pass.wUyGth1Hv0rnh/6kOBG-eMail-2daygeek@gmail.com.txt`。 只需在其中添加新密码,然后保存并退出即可。 ``` $ pass edit eMail/2daygeek@gmail.com @@ -176,9 +177,9 @@ File: /dev/shm/pass.wUyGth1Hv0rnh/6kOBG-eMail-2daygeek@gmail.com.txt TP9ACLyzUZUwBwO ``` -#### 移除密码 +### 移除密码 -删除现有密码。 它将从 `〜/ .password-store` 中删除包含 `.gpg` 的条目 +删除现有密码。 它将从 `~/.password-store` 中删除包含 `.gpg` 的条目。 ``` $ pass rm eMail/2daygeek@gmail.com @@ -186,7 +187,7 @@ Are you sure you would like to delete eMail/2daygeek@gmail.com? [y/N] y removed '/home/magi/.password-store/eMail/2daygeek@gmail.com.gpg' ``` -#### 多选项功能 +### 多选项功能 要保存详细信息,如 URL、用户名、密码、引脚等信息,可以使用以下格式。 首先确保你要将第一项设置为密码,因为它用于在使用剪贴板选项时将第一行复制为密码,以及后续行中的附加信息。 @@ -205,9 +206,9 @@ Ftp User : 2g via: http://www.2daygeek.com/pass-command-line-password-manager-linux/ -作者:[2DAYGEEK ][a] +作者:[2DAYGEEK][a] 译者:[chenxinlong](https://github.com/chenxinlong) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From a74da6f55fd4cf2d040c0a043193c40765a94fe2 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 29 Jun 2017 11:32:53 +0800 Subject: [PATCH 004/100] =?UTF-8?q?PRF&PUB:20170609=20Powerline=20?= =?UTF-8?q?=E2=80=93=20A=20Powerful=20Statusline=20Plugin=20For=20Vim=20?= =?UTF-8?q?=20Bash=20Terminal.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @geekpi --- ... Statusline Plugin For Vim Bash Terminal.md | 45 +++++++++---------- 1 file changed, 22 insertions(+), 23 deletions(-) rename {translated/tech => published}/20170609 Powerline – A Powerful Statusline Plugin For Vim Bash Terminal.md (70%) diff --git a/translated/tech/20170609 Powerline – A Powerful Statusline Plugin For Vim Bash Terminal.md b/published/20170609 Powerline – A Powerful Statusline Plugin For Vim Bash Terminal.md similarity index 70% rename from translated/tech/20170609 Powerline – A Powerful Statusline Plugin For Vim Bash Terminal.md rename to published/20170609 Powerline – A Powerful Statusline Plugin For Vim Bash Terminal.md index fec4b94145..9ea81badc5 100644 --- a/translated/tech/20170609 Powerline – A Powerful Statusline Plugin For Vim Bash Terminal.md +++ b/published/20170609 Powerline – A Powerful Statusline Plugin For Vim Bash Terminal.md @@ -1,54 +1,53 @@ -Powerline - Vim 和 Bash 中的一个强大状态栏插件 +Powerline:Vim 和 Bash 中的一个强大状态栏插件 ============================================================ - -[Powerline][2] 是 vim、zsh、bash、tmux、IPython、Awesome、bar、fish、lemonbar、pdb、rc、shell、tcsh、wm、i3 和 Qtil 中的一个状态栏插件。它给程序提供状态栏,并使程序更好看。它用 Python 写成。 +[Powerline][2] 是 vim、zsh、bash、tmux、IPython、Awesome、bar、fish、lemonbar、pdb、rc、shell、tcsh、wm、i3 和 Qtil 中的一个状态栏插件。它给程序提供了状态栏,并使程序更好看。它用 Python 写成。 它是可扩展的并且功能丰富,它用 Python 写成,非常轻便不需要任何第三方的依赖,只需要一个 Python 解释器。 -稳定以及可测试代码库经过完整的测试,并且在 Python 2.6+ 和 Python 3 中工作良好。 +它的稳定以及可测试的代码库经过完整的测试,并且在 Python 2.6+ 和 Python 3 中工作良好。 -最初状态栏只在 vim 中可用,随后项目进化为为许多 Linux 程序如 zsh、bash、tmux、IPython、Awesome、i3 和 Qtil 提供状态栏。 +最初该状态栏只在 vim 中可用,随后项目进化为许多 Linux 程序如 zsh、bash、tmux、IPython、Awesome、i3 和 Qtil 提供状态栏。 -配置以及配色方案用 JSON 写成。它是一种标准简易的文件格式,允许用户配置 Powerline 支持的程序。 +其配置以及配色方案用 JSON 写成。它是一种标准简易的文件格式,可以让用户配置 Powerline 支持的程序。 -快速并且轻量级,支持守护进程为了更好的性能。 +快速并且轻量级,支持守护进程可以提供更好的性能。 -#### 安装预先要求 +### 安装预先要求 确保你的系统有下面预先要求的包。如果没有,在安装 powerline 之前先安装它们。 -对于 Debian 用户,使用[ APT 包管理器][3]或者[ Apt-Get 包管理器][4]安装需要的包。 +对于 Debian 用户,使用 [APT 包管理器][3]或者[Apt-Get 包管理器][4]安装需要的包。 ``` $ sudo apt-get install python-pip git ``` -对于 openSUSE 用户,使用 [ Zypper 包管理器][5]安装需要的包。 +对于 openSUSE 用户,使用 [Zypper 包管理器][5]安装需要的包。 ``` $ sudo zypper install python-pip git ``` -对于 Fedora 用户,使用[ dnf 包管理器][6]安装需要的包。 +对于 Fedora 用户,使用 [dnf 包管理器][6]安装需要的包。 ``` $ sudo dnf install python-pip git ``` -对于 Arch Linux 用户,使用[ pacman 包管理器][7]安装需要的包。 +对于 Arch Linux 用户,使用 [pacman 包管理器][7]安装需要的包。 ``` $ sudo pacman -S python-pip git ``` -对于 CentOS/RHEL 用户,使用[ yum 包管理器][8]安装需要的包。 +对于 CentOS/RHEL 用户,使用 [yum 包管理器][8]安装需要的包。 ``` $ sudo yum install python-pip git ``` -#### 如何在 Linux 中安装 Powerline +### 如何在 Linux 中安装 Powerline 在本篇中,我们将向你展示如何安装 Powerline。以及如何在基于 Debian 以及 RHEL 的系统中在 Bash、tumx 和 Vim 中使用。 @@ -71,7 +70,7 @@ Location: /usr/lib/python2.7/site-packages Requires: ``` -#### 在 Bash Shell 中添加/启用 Powerline +### 在 Bash Shell 中添加/启用 Powerline 添加下面的行到 `.bashrc` 中,它会默认在基础 shell 中启用 powerline。 @@ -90,9 +89,9 @@ fi $ source ~/.bashrc ``` - [![](http://www.2daygeek.com/wp-content/uploads/2017/06/install-powerline-in-linux-1.png)][9] +[![](http://www.2daygeek.com/wp-content/uploads/2017/06/install-powerline-in-linux-1.png)][9] -#### 在 tmux 中添加/启用 Powerline +### 在 tmux 中添加/启用 Powerline tmux 是最好的终端仿真程序之一,它提供多窗口以及状态栏,但是相比 powerline 的状态栏看上去不那么好。添加下面的的行到 `.tmux.conf` 中,它会默认在 tmux 中启用 powerline。如果你没有找到 `.tmux.conf` 文件,那么创建一个新的。 @@ -102,9 +101,9 @@ tmux 是最好的终端仿真程序之一,它提供多窗口以及状态栏, source "/usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf" ``` - [![](http://www.2daygeek.com/wp-content/uploads/2017/06/install-powerline-in-linux-2.png)][10] +[![](http://www.2daygeek.com/wp-content/uploads/2017/06/install-powerline-in-linux-2.png)][10] -#### 在 Vim 中添加/启用 Powerline +### 在 Vim 中添加/启用 Powerline vim 是管理员最爱的文本编辑器之一。添加下面的行到 `.vmrc` 中,启用 powerline 使 vim 更加强大。注意,在 vim 7.x 中,你可能不会在系统中发现 .vimrc 文件,因此不必担心,创建一个新的文件,并添加下面行。 @@ -116,17 +115,17 @@ set laststatus=2 set t_Co=256 ``` - [![](http://www.2daygeek.com/wp-content/uploads/2017/06/install-powerline-in-linux-3.png)][11] +[![](http://www.2daygeek.com/wp-content/uploads/2017/06/install-powerline-in-linux-3.png)][11] - [![](http://www.2daygeek.com/wp-content/uploads/2017/06/install-powerline-in-linux-4.png)][12] +[![](http://www.2daygeek.com/wp-content/uploads/2017/06/install-powerline-in-linux-4.png)][12] -------------------------------------------------------------------------------- via: http://www.2daygeek.com/powerline-adds-powerful-statusline-to-vim-bash-tumx-in-ubuntu-fedora-debian-arch-linux-mint/ -作者:[ 2DAYGEEK · ][a] +作者:[2DAYGEEK][a] 译者:[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/) 荣誉推出 From b7d33ec2083a0f29c3d6553bdd19d22f9c7c2dcb Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 30 Jun 2017 09:00:03 +0800 Subject: [PATCH 005/100] translated --- ...A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md | 143 ------------------ ...A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md | 142 +++++++++++++++++ 2 files changed, 142 insertions(+), 143 deletions(-) delete mode 100644 sources/tech/20161214 BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md create mode 100644 translated/tech/20161214 BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md diff --git a/sources/tech/20161214 BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md b/sources/tech/20161214 BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md deleted file mode 100644 index 98a0b62fbf..0000000000 --- a/sources/tech/20161214 BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md +++ /dev/null @@ -1,143 +0,0 @@ -translating---geekpi - -BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3 -============================================================ - - -> EDIT : After writing this blog post I’ve started a 64-bit OS for the Raspberry Pi 3, based on Debian. You can [find it here][3]. - -The **Raspberry Pi 3** ships with a Broadcom BCM2837 64bit ARMv8 quad core Cortex A53 processor, which is a **64-bit CPU**. If you own one of these, running the following command might surprise you : - -> > uname -a -> Linux raspberrypi 4.4.34-v7+ #930 SMP Wed Nov 23 15:20:41 GMT 2016 armv7l GNU/Linux - -Yes, this is a **32-bit kernel**. The reason for this is that the Raspberry Pi foundation doesn’t yet provides a 64-bit version of Raspbian, the official OS for Raspberry Pi. It is however possible to build one, thanks to the various patches sent by [Electron752][9]. - -# Build the Kernel - -The Raspberry Pi foundation maintains [their own fork ][10]of the Linux Kernel which is especially tailored for their devices, while upstream gets merged regularly. - -We’re going to adapt instructions from [that page][11] to **build a 64-bit Kernel**. - -We cannot use the “Local building” method as it’d require a 64-bit Raspberry Pi, which we obviously don’t have yet. So we have to **cross-compile** it, **Ubuntu**is the recommended OS for this. I personally don’t have Ubuntu so I’ll make my build on a 2 CPUs Ubuntu 16.04 Digital Ocean droplet, which should cost me $0.03\. If you also want to proceed like this, you can get $10 free credits through [this link][12]. Alternatively, you could use a Ubuntu VM through Virtualbox for instance. - -First, we’d need a few **build tools** and the **aarch64 cross-compiler** : - -> > apt-get update -> > apt-get install -y bc build-essential gcc-aarch64-linux-gnu git unzip - -Then we can download the **Linux Kernel sources** : - -> > git clone –depth=1 -b rpi-4.8.y https://github.com/raspberrypi/linux.git - -Enter now inside the created git directory. Optionally, you can add an extra version tag for your kernel. This is done by editing the beginning of the Makefile : - -> VERSION = 4 -> PATCHLEVEL = 8 -> SUBLEVEL = 13 -> EXTRAVERSION = +bilal - -In order to **build it**, run the following commands : - -> > make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- bcmrpi3_defconfig -> > make -j 3 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- - -The first one should be pretty fast. For the second one it’s a whole different story, I haven’t timed it exactly but it was around 30 minutes for me. Make sure to adapt the -j flag depending on your number of CPUs (nproc * 1.5). - -# Choose a Linux distribution - -While the Kernel is being built, we can start preparing a Linux distribution for it. I’ll be using **Raspbian** for simplicity in this tutorial, even though this is a 32-bit only distribution. - - _If you want to go 64-bit all the way you should pick up a distribution available in aarch64, Debian has a robust [ARM64Port][4]. To grab it there are basically 3 options :_ - _– download a pre-built root filesystem, this would most likely give you an outdated one as mentioned in that page_ - _– build your own with debootstrap if you’re familiar with it (otherwise it can be tricky as it requires some manual tweaks, the original purpose of it is to chroot from an already running host, not build a root filesystem for another machine)._ - _– the one I’d recommend, using multistrap, there seems to be a nice tutorial on this page : http://free-electrons.com/blog/embdebian-with-multistrap/_ - -Back to Raspbian, we can now download the official OS and start preparing it. - -Open a new shell session and run the following commands : - -> > wget -O raspbian.zip https://downloads.raspberrypi.org/raspbian_lite_latest -> > unzip raspbian.zip - -We can inspect it with the following command : - -> > fdisk -l 2016-11-25-raspbian-jessie-lite.img -> Disk 2016-11-25-raspbian-jessie-lite.img: 1.3 GiB, 1390411776 bytes, 2715648 sectors -> Units: sectors of 1 * 512 = 512 bytes -> Sector size (logical/physical): 512 bytes / 512 bytes -> I/O size (minimum/optimal): 512 bytes / 512 bytes -> Disklabel type: dos -> Disk identifier: 0x244b8248 -> -> Device Boot Start End Sectors Size Id Type -> 2016-11-25-raspbian-jessie-lite.img1 8192 137215 129024 63M c W95 FAT32 (LBA) -> 2016-11-25-raspbian-jessie-lite.img2 137216 2715647 2578432 1.2G 83 Linux - -We can see it has **two partitions**. The first one is the **boot partition**, it mainly contains the bootloader, the Linux Kernel and a few config files. The second one is the** root partition**. - -We can **mount those partitions** on our filesystem, starting with the **root partition** : - -> > mount -o loop,offset=70254592 2016-11-25-raspbian-jessie-lite.img /mnt - -The offset depends on the sector size, which is 512 : 70254592 = 512 * 137216 - -Then the **boot partition** : - -> > mount -o loop,offset=4194304,sizelimit=66060288 2016-11-25-raspbian-jessie-lite.img /mnt/boot - - _(offset : 4194304 = 512 * 8192, sizelimit: _ _66060288 = 512 * 129024)_ - -The Raspbian OS can now be seen under /mnt. We’re almost there. - -# Wrapping it up - -Once the Kernel build is finished, the last steps involve **copying the Linux Kernel** and the **device tree** to the boot partition : - -> > cp arch/arm64/boot/Image /mnt/boot/kernel8.img -> > cp arch/arm64/boot/dts/broadcom/bcm2710-rpi-3-b.dtb /mnt/boot/ - -Tweaking **config.txt** : - -> > echo “kernel=kernel8.img” >> /mnt/boot/config.txt - -Installing **Kernel modules** : - -> > make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu INSTALL_MOD_PATH=/mnt modules_install -> > umount /mnt/boot -> > umount /mnt - -And… that’s it, a freshly baked **ARM64 Linux Kernel** for our Raspberry Pi 3! - -You can now compress the image, download it through scp for instance and follow the standard instructions to put it on your SD card. - -Eventually you’ll get : - -> > uname -a -> Linux raspberrypi 4.8.13+bilal-v8+ #1 SMP Wed Dec 14 14:09:38 UTC 2016 aarch64 GNU/Linux - -[Twitter][5][LinkedIn][6][Google+][7][Share][8] - --------------------------------------------------------------------------------- - -via: https://devsidestory.com/build-a-64-bit-kernel-for-your-raspberry-pi-3/ - -作者:[Bilal Amarni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://devsidestory.com/about-me -[1]:https://devsidestory.com/author/bamarni/ -[2]:https://devsidestory.com/build-a-64-bit-kernel-for-your-raspberry-pi-3/ -[3]:https://github.com/bamarni/pi64 -[4]:https://wiki.debian.org/Arm64Port -[5]:https://devsidestory.com/#twitter -[6]:https://devsidestory.com/#linkedin -[7]:https://devsidestory.com/#google_plus -[8]:https://www.addtoany.com/share#url=https%3A%2F%2Fdevsidestory.com%2Fbuild-a-64-bit-kernel-for-your-raspberry-pi-3%2F&title=Build%20a%2064-bit%20Kernel%20for%20your%20Raspberry%20Pi%203 -[9]:https://github.com/Electron752 -[10]:https://github.com/raspberrypi/linux -[11]:https://www.raspberrypi.org/documentation/linux/kernel/building.md -[12]:https://m.do.co/c/8ef9c5832a9c diff --git a/translated/tech/20161214 BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md b/translated/tech/20161214 BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md new file mode 100644 index 0000000000..4d8e92ed40 --- /dev/null +++ b/translated/tech/20161214 BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md @@ -0,0 +1,142 @@ +为树莓派 3 构建 64 位内核 +============================================================ + + +> 编辑:在写完这个这篇文章之后,我开始在树莓派 3 上开始 64 位基于 Debian 的系统。你可以[在这里找到][3] + +**树莓派 3** 配有 Broadcom BCM2837 64 位 ARMv8 四核 Cortex A53 处理器,它是一个 **64 位 CPU**。如果你有一块,运行以下命令可能会让你感到惊讶: + +> > uname -a +> Linux raspberrypi 4.4.34-v7+ #930 SMP Wed Nov 23 15:20:41 GMT 2016 armv7l GNU/Linux + +是的,这是一个 **32 位内核**。这是因为树莓派基金会还没有为官方的树莓派系统 Raspbian 提供 64 位版本。然而可以构建一个,多亏了 [Electron752][9] 提供的许多补丁。 + +# 构建内核 + +树莓派基金会维护了[它们自己的 Linux 内核分支][10],它为它们的设备特别裁剪过,同时会有规律地从上游合并。 + +我们将会从[这个页面][11]接受指导来**构建一个 64 位内核**。 + +我么不能使用“本地构建”的方法,因为它需要一块 64 位的树莓派,这个我们明显还没有。因此我们需要**交叉编译**它,**Ubuntu** 是推荐的系统。我个人没有 Ubuntu,因此我在一个有 2 个 CPU 的 Ubuntu 16.04 Digital Ocean 实例上构建,这应该花费我 $0.03。如果你也想这么做,你可以通过[这个链接][12]得到 $10 的免费额度。或者你可以通过使用 Virtualbox 中的 Ubuntu VM 作为实例。 + +首先,我们需要一些**构建工具**以及** aarch64 交叉编译器**: + +> > apt-get update +> > apt-get install -y bc build-essential gcc-aarch64-linux-gnu git unzip + +接着我们可以下载** Linux 内核源码**: + +> > git clone –depth=1 -b rpi-4.8.y https://github.com/raspberrypi/linux.git + +在创建的 git 目录中输入。另外你可以为你的内核添加额外的版本标签,可以通过编辑 Makefile 的开始几行达到: + + +> VERSION = 4 +> PATCHLEVEL = 8 +> SUBLEVEL = 13 +> EXTRAVERSION = +bilal + +为了**构建它**,运行下面的命令: + +> > make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- bcmrpi3_defconfig +> > make -j 3 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- + +第一个应该很快。第二个则会完全不同,我没有精确计时,但是对我大概有半个小时。根据你的 CPU 数(nproc * 1.5)调整 -j 标志。 + +# 选择一个 Linux 发行版 + +在内核编译的时候,我们可以开始准备它的 Linux 发行版了。在本教程中为了简单我使用 **Raspbian**,即使这是一个只有 32 位的发行版。 + +_如果你想要一直只用 64 为系统,你应该选一个有 aarch64 支持的发行版,Debian 有一个鲁棒的 [ARM64 移植版][4]。得到它基本有三种选择:_ + _- 下载一个预构建的根文件系统,这很可能会如页面中提到的那样给你一个过期的版本。_ + _- 如果你熟悉 debootstrap,用它构建你自己的(否则这回比较棘手,因为它需要一些手工调整,它最初的目的是从已经运行的主机上 chroot,而不是为其他机器构建根文件系统)_ + _- 我建议使用 multistrap,这里有一个很好的教程:http://free-electrons.com/blog/embdebian-with-multistrap/_ + +回到 Raspbian,我们现在可以下载官方系统,并开始准备了。 + +打开一个新的 shell 会话并运行下面的命令: + +> > wget -O raspbian.zip https://downloads.raspberrypi.org/raspbian_lite_latest +> > unzip raspbian.zip + +我们用下面的命令审查: + +> > fdisk -l 2016-11-25-raspbian-jessie-lite.img +> Disk 2016-11-25-raspbian-jessie-lite.img: 1.3 GiB, 1390411776 bytes, 2715648 sectors +> Units: sectors of 1 * 512 = 512 bytes +> Sector size (logical/physical): 512 bytes / 512 bytes +> I/O size (minimum/optimal): 512 bytes / 512 bytes +> Disklabel type: dos +> Disk identifier: 0x244b8248 +> +> Device Boot Start End Sectors Size Id Type +> 2016-11-25-raspbian-jessie-lite.img1 8192 137215 129024 63M c W95 FAT32 (LBA) +> 2016-11-25-raspbian-jessie-lite.img2 137216 2715647 2578432 1.2G 83 Linux + +我们可以看到它有**两个分区**。第一个是**启动分区**,它主要包含了 bootloader、Linux 内核以及少量配置文件。第二个是**根分区**。 + +我们可以在我们的文件系统上**挂载这些分区**,从**根分区**开始: + +> > mount -o loop,offset=70254592 2016-11-25-raspbian-jessie-lite.img /mnt + +offset 取决于扇区大小,它的大小是 512:70254592 = 512 * 137216 + +接着是**启动分区**: + +> > mount -o loop,offset=4194304,sizelimit=66060288 2016-11-25-raspbian-jessie-lite.img /mnt/boot + + _(offset : 4194304 = 512 * 8192, sizelimit: _ _66060288 = 512 * 129024)_ + +树莓派系统现在应该可以在 /mnt 中看到了。我们基本我要完成了。 + +# 打包内核 + +内核编译完成后,最后一步包括**复制 Linux 内核**以及**设备树**到启动分区中: + +> > cp arch/arm64/boot/Image /mnt/boot/kernel8.img +> > cp arch/arm64/boot/dts/broadcom/bcm2710-rpi-3-b.dtb /mnt/boot/ + +调整 **config.txt** : + +> > echo “kernel=kernel8.img” >> /mnt/boot/config.txt + +安装**内核模块** : + +> > make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu INSTALL_MOD_PATH=/mnt modules_install +> > umount /mnt/boot +> > umount /mnt + +就是这样了,用于树莓派 3 的** ARM64 Linux 内核**诞生了! + +现在你可以压缩镜像,从实例中通过 scp 下载下来,并按照标准的步骤放到你的 SD 卡中。 + +最后你会得到: + +> > uname -a +> Linux raspberrypi 4.8.13+bilal-v8+ #1 SMP Wed Dec 14 14:09:38 UTC 2016 aarch64 GNU/Linux + +[Twitter][5][LinkedIn][6][Google+][7][Share][8] + +-------------------------------------------------------------------------------- + +via: https://devsidestory.com/build-a-64-bit-kernel-for-your-raspberry-pi-3/ + +作者:[Bilal Amarni][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://devsidestory.com/about-me +[1]:https://devsidestory.com/author/bamarni/ +[2]:https://devsidestory.com/build-a-64-bit-kernel-for-your-raspberry-pi-3/ +[3]:https://github.com/bamarni/pi64 +[4]:https://wiki.debian.org/Arm64Port +[5]:https://devsidestory.com/#twitter +[6]:https://devsidestory.com/#linkedin +[7]:https://devsidestory.com/#google_plus +[8]:https://www.addtoany.com/share#url=https%3A%2F%2Fdevsidestory.com%2Fbuild-a-64-bit-kernel-for-your-raspberry-pi-3%2F&title=Build%20a%2064-bit%20Kernel%20for%20your%20Raspberry%20Pi%203 +[9]:https://github.com/Electron752 +[10]:https://github.com/raspberrypi/linux +[11]:https://www.raspberrypi.org/documentation/linux/kernel/building.md +[12]:https://m.do.co/c/8ef9c5832a9c From c0296b51c6fdb7088f0b1ff3ce6c2e2c0812feeb Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 30 Jun 2017 09:05:08 +0800 Subject: [PATCH 006/100] translating --- sources/tech/20170620 Debian armhf VM on arm64 server.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170620 Debian armhf VM on arm64 server.md b/sources/tech/20170620 Debian armhf VM on arm64 server.md index bc63fb3b79..16c29561d5 100644 --- a/sources/tech/20170620 Debian armhf VM on arm64 server.md +++ b/sources/tech/20170620 Debian armhf VM on arm64 server.md @@ -1,3 +1,5 @@ +translating---geekpi + # Debian armhf VM on arm64 server From f432034c949e9a1e3e4625d92bebc1a0f695cffd Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 30 Jun 2017 15:26:32 +0800 Subject: [PATCH 007/100] PRF&PUB:20170614 Automatically Create Remove And Mount Swap File In Linux Using Shell Script.md @geekpi --- ...t Swap File In Linux Using Shell Script.md | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) rename {translated/tech => published}/20170614 Automatically Create Remove And Mount Swap File In Linux Using Shell Script.md (70%) diff --git a/translated/tech/20170614 Automatically Create Remove And Mount Swap File In Linux Using Shell Script.md b/published/20170614 Automatically Create Remove And Mount Swap File In Linux Using Shell Script.md similarity index 70% rename from translated/tech/20170614 Automatically Create Remove And Mount Swap File In Linux Using Shell Script.md rename to published/20170614 Automatically Create Remove And Mount Swap File In Linux Using Shell Script.md index ea95a04a2a..90b08e2ab4 100644 --- a/translated/tech/20170614 Automatically Create Remove And Mount Swap File In Linux Using Shell Script.md +++ b/published/20170614 Automatically Create Remove And Mount Swap File In Linux Using Shell Script.md @@ -1,18 +1,17 @@ 在 Linux 中使用 shell 脚本自动创建/移除并挂载交换文件 -============================================================  - +====== 几天前我们写了一篇关于在 Linux 中 3 种创建交换文件的方法,它们是常见的方法,但是需要人工操作。 -今天我发现了一个小的 [Gary Stafford][3] 写的 shell 脚本(两个 shell 脚本,一个用于创建交换文件,另外一个用于移除交换文件),它帮助我们在 Linux 中创建/移除并且自动挂载交换文件。 +今天我发现了一个 [Gary Stafford][3] 写的 shell 小脚本(两个 shell 脚本,一个用于创建交换文件,另外一个用于移除交换文件),它可以帮助我们在 Linux 中创建/移除并且自动挂载交换文件。 -默认这个脚本创建并挂载 `512MB` 的交换文件。如果你想要更多的交换空间和不同的文件名,你需要相应地修改脚本。修改脚本不是一件困难的事,因为这是一个非常上手而且小的脚本,设置我已经为你想要修改的脚本行加上了颜色。 +默认这个脚本创建并挂载 512MB 的交换文件。如果你想要更多的交换空间和不同的文件名,你需要相应地修改脚本。修改脚本不是一件困难的事,因为这是一个容易上手而且很小的脚本。 -**推荐阅读:** [Linux 中 3 中简易的创建或扩展交换空间的方法][4] +**推荐阅读:** [Linux 中 3 种简易创建或扩展交换空间的方法][4] -#### 如何检查当前交换文件大小 +### 如何检查当前交换文件大小 -使用 **[free][1]** 和 `swapon` 命令检查已经存在交换空间。 +使用 [free][1] 和 `swapon` 命令检查已经存在交换空间。 ``` $ free -h @@ -27,9 +26,9 @@ NAME TYPE SIZE USED PRIO 上面的输出显示我当前的交换空间是 `2GB`。 -#### 创建交换文件 +### 创建交换文件 -创建 `create_swap.sh` 文件并添加下面的脚本来自动化交换空间的创建和挂载。 +创建 `create_swap.sh` 文件并添加下面的内容来自动化交换空间的创建和挂载。 ``` $ nano create_swap.sh @@ -81,11 +80,11 @@ NAME TYPE SIZE USED PRIO /swapfile file 1024M 0B -2 ``` -你可以看到新的 `1024M swapfile`。重启系统以使用新的交换文件。 +你可以看到新的 1024M 的 `swapfile`。重启系统以使用新的交换文件。 -#### 移除交换文件 +### 移除交换文件 -如果不再需要交换文件,接着创建 `remove_swap.sh` 文件并添加下面的脚本移除交换文件以及它的 /etc/fstab 挂载点。 +如果不再需要交换文件,接着创建 `remove_swap.sh` 文件并添加下面的内容来移除交换文件以及它的 `/etc/fstab` 挂载点。 ``` $ nano remove_swap.sh @@ -131,15 +130,14 @@ NAME TYPE SIZE USED PRIO /dev/sda5 partition 2G 951.8M -1 ``` - -------------------------------------------------------------------------------- via: http://www.2daygeek.com/shell-script-create-add-extend-swap-space-linux/ -作者:[2DAYGEEK ][a] +作者:[2DAYGEEK][a] 译者:[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/) 荣誉推出 From fdd900c4eab20fb7fe9bc3e1344acf3703f72702 Mon Sep 17 00:00:00 2001 From: windcode <951376975@qq.com> Date: Fri, 30 Jun 2017 15:31:12 +0800 Subject: [PATCH 008/100] Translating by windcode --- .../20170310 Why DevOps is the end of security as we know it.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/talk/20170310 Why DevOps is the end of security as we know it.md b/sources/talk/20170310 Why DevOps is the end of security as we know it.md index c5bcee93cf..746abb08fa 100644 --- a/sources/talk/20170310 Why DevOps is the end of security as we know it.md +++ b/sources/talk/20170310 Why DevOps is the end of security as we know it.md @@ -1,3 +1,5 @@ +Translating by windcode + # Why DevOps is the end of security as we know it ![](https://techbeacon.com/sites/default/files/styles/article_hero_image/public/field/image/rugged-devops-end-of-security.jpg?itok=Gp1xxSMK) From 156e7ba1bf224e947a4e06a3ef208f2fb321bd5f Mon Sep 17 00:00:00 2001 From: Markgolzh Date: Fri, 30 Jun 2017 22:32:03 +0800 Subject: [PATCH 009/100] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=AD=20by=20zky0?= =?UTF-8?q?01?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译中 --- ...source social robot kit runs on Raspberry Pi and Arduino.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20170621 Open source social robot kit runs on Raspberry Pi and Arduino.md b/sources/tech/20170621 Open source social robot kit runs on Raspberry Pi and Arduino.md index 5217684f9b..33db436277 100644 --- a/sources/tech/20170621 Open source social robot kit runs on Raspberry Pi and Arduino.md +++ b/sources/tech/20170621 Open source social robot kit runs on Raspberry Pi and Arduino.md @@ -1,3 +1,4 @@ +翻译中 by zky001 # [Open source social robot kit runs on Raspberry Pi and Arduino][22] @@ -77,7 +78,7 @@ The Q.bo One is available on Indiegogo through mid-July starting at $369 for the via: http://linuxgizmos.com/open-source-social-robot-kit-runs-on-raspberry-pi-and-arduino/ 作者:[ Eric Brown][a] -译者:[译者ID](https://github.com/译者ID) +译者:[zky001](https://github.com/zky001) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 9545face75728cddc48672580368b59482cc197e Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 1 Jul 2017 16:19:13 +0800 Subject: [PATCH 010/100] =?UTF-8?q?=E5=BD=92=E6=A1=A3=20201706?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20110207 How debuggers work Part 3 - Debugging information.md | 0 published/{ => 201706}/20160808 What is open source.md | 0 .../20160831 Apache Spark Scale - A 60 TB production use case.md | 0 published/{ => 201706}/20161027 Network management with LXD.md | 0 ...05 Top 8 systems operations and engineering trends for 2017.md | 0 ...non-native English speakers working on open source projects.md | 0 ...usiness should consider an open source point of sale system.md | 0 ...0 reasons to use Cinnamon as your Linux desktop environment.md | 0 ...170118 How to gain confidence to participate in open source.md | 0 .../20170126 How to use slice capacity and length in Go.md | 0 .../20170202 A look at 6 iconic open source brands.md | 0 .../20170205 Can academic faculty members teach with wikipedia.md | 0 ...70207 How Linux Helped Me Become an Empowered Computer User.md | 0 .../{ => 201706}/20170210 How to install OTRS on Ubuntu 16.04.md | 0 ...70214 Software-Defined Storage Opens Up 10 Projects to Know.md | 0 ...Performance Problems Stem from Unnecessary, Mandatory Work.md | 0 published/{ => 201706}/20170314 One Year Using Go.md | 0 ... introduction to GRUB2 configuration for your Linux machine.md | 0 published/{ => 201706}/20170317 AWS cloud terminology.md | 0 ... control GPIO pins and operate relays with the Raspberry Pi.md | 0 .../20170317 Why do you use Linux and open source software.md | 0 .../20170321 Writing a Linux Debugger Part 1 Setup.md | 0 ...ll iRedMail on CentOS 7 for Samba4 AD Integration – Part 10.md | 0 .../20170324 Writing a Linux Debugger Part 2 Breakpoints.md | 0 ...70403 Discovering my inner curmudgeon A Linux laptop review.md | 0 ...0409 FreeFileSync – Compare and Synchronize Files in Ubuntu.md | 0 ...170426 Top 4 CDN services for hosting open source libraries.md | 0 .../20170427 Linux s Big Bang One Kernel Countless Distros.md | 0 ...ifference Between Two Directories Using Diff and Meld Tools.md | 0 .../20170508 8 ways to get started with open source hardware.md | 0 ...n libraries for building great command-line user interfaces.md | 0 published/{ => 201706}/20170509 Much ado about communication.md | 0 ... Verifies Your SSH Server Configuration and Policy in Linux.md | 0 ...anding Shutdown, Poweroff Halt and Reboot Commands in Linux.md | 0 ...70515 Faster machine learning is coming to the Linux kernel.md | 0 .../20170515 How I got started with bash scripting.md | 0 .../20170516 How Microsoft is becoming a Linux vendor.md | 0 .../{ => 201706}/20170516 What Fuchsia could mean for Android.md | 0 ... vs. Jekyll Comparing the leading static website generators.md | 0 ... 10 Useful Tips for Writing Effective Bash Scripts in Linux.md | 0 ...he D programming language is a great choice for development.md | 0 .../20170519 Accelerating your C++ on GPU with SYCL.md | 0 published/{ => 201706}/20170520 How to master the art of Git.md | 0 .../20170529 Linux comm command tutorial for beginners.md | 0 ...Fix SambaCry Vulnerability (CVE-2017-7494) in Linux Systems.md | 0 .../20170531 Get started with machine learning using Python.md | 0 ...rstand Linux Load Averages and Monitor Performance of Linux.md | 0 ...Cron Vs Anacron How to Schedule Jobs Using Anacron on Linux.md | 0 ...MariaDB Client with Auto-completion and Syntax-highlighting.md | 0 ...mimipenguin – Dump Login Passwords From Current Linux Users.md | 0 ...Python Script To Report Core Memory Usage Accurately In Linux.md | 0 ...rline – A Powerful Statusline Plugin For Vim Bash Terminal.md | 0 ...eate Remove And Mount Swap File In Linux Using Shell Script.md | 0 ... Free Up Some Space in Ubuntu LinuxMint With Ubuntu Cleaner.md | 0 ...rvalds Explains How Linux Still Surprises and Motivates Him.md | 0 .../20170623 A introduction to creating documents in LaTeX.md | 0 ...623 Pass – A Simple command-line Password Manager for Linux.md | 0 57 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201706}/20110207 How debuggers work Part 3 - Debugging information.md (100%) rename published/{ => 201706}/20160808 What is open source.md (100%) rename published/{ => 201706}/20160831 Apache Spark Scale - A 60 TB production use case.md (100%) rename published/{ => 201706}/20161027 Network management with LXD.md (100%) rename published/{ => 201706}/20170105 Top 8 systems operations and engineering trends for 2017.md (100%) rename published/{ => 201706}/20170113 Tips for non-native English speakers working on open source projects.md (100%) rename published/{ => 201706}/20170116 Why every business should consider an open source point of sale system.md (100%) rename published/{ => 201706}/20170118 10 reasons to use Cinnamon as your Linux desktop environment.md (100%) rename published/{ => 201706}/20170118 How to gain confidence to participate in open source.md (100%) rename published/{ => 201706}/20170126 How to use slice capacity and length in Go.md (100%) rename published/{ => 201706}/20170202 A look at 6 iconic open source brands.md (100%) rename published/{ => 201706}/20170205 Can academic faculty members teach with wikipedia.md (100%) rename published/{ => 201706}/20170207 How Linux Helped Me Become an Empowered Computer User.md (100%) rename published/{ => 201706}/20170210 How to install OTRS on Ubuntu 16.04.md (100%) rename published/{ => 201706}/20170214 Software-Defined Storage Opens Up 10 Projects to Know.md (100%) rename published/{ => 201706}/20170308 Many SQL Performance Problems Stem from Unnecessary, Mandatory Work.md (100%) rename published/{ => 201706}/20170314 One Year Using Go.md (100%) rename published/{ => 201706}/20170316 An introduction to GRUB2 configuration for your Linux machine.md (100%) rename published/{ => 201706}/20170317 AWS cloud terminology.md (100%) rename published/{ => 201706}/20170317 How to control GPIO pins and operate relays with the Raspberry Pi.md (100%) rename published/{ => 201706}/20170317 Why do you use Linux and open source software.md (100%) rename published/{ => 201706}/20170321 Writing a Linux Debugger Part 1 Setup.md (100%) rename published/{ => 201706}/20170323 How to Install iRedMail on CentOS 7 for Samba4 AD Integration – Part 10.md (100%) rename published/{ => 201706}/20170324 Writing a Linux Debugger Part 2 Breakpoints.md (100%) rename published/{ => 201706}/20170403 Discovering my inner curmudgeon A Linux laptop review.md (100%) rename published/{ => 201706}/20170409 FreeFileSync – Compare and Synchronize Files in Ubuntu.md (100%) rename published/{ => 201706}/20170426 Top 4 CDN services for hosting open source libraries.md (100%) rename published/{ => 201706}/20170427 Linux s Big Bang One Kernel Countless Distros.md (100%) rename published/{ => 201706}/20170502 How to Find Difference Between Two Directories Using Diff and Meld Tools.md (100%) rename published/{ => 201706}/20170508 8 ways to get started with open source hardware.md (100%) rename published/{ => 201706}/20170509 4 Python libraries for building great command-line user interfaces.md (100%) rename published/{ => 201706}/20170509 Much ado about communication.md (100%) rename published/{ => 201706}/20170509 ssh_scan – Verifies Your SSH Server Configuration and Policy in Linux.md (100%) rename published/{ => 201706}/20170512 Understanding Shutdown, Poweroff Halt and Reboot Commands in Linux.md (100%) rename published/{ => 201706}/20170515 Faster machine learning is coming to the Linux kernel.md (100%) rename published/{ => 201706}/20170515 How I got started with bash scripting.md (100%) rename published/{ => 201706}/20170516 How Microsoft is becoming a Linux vendor.md (100%) rename published/{ => 201706}/20170516 What Fuchsia could mean for Android.md (100%) rename published/{ => 201706}/20170518 Hugo vs. Jekyll Comparing the leading static website generators.md (100%) rename published/{ => 201706}/20170519 10 Useful Tips for Writing Effective Bash Scripts in Linux.md (100%) rename published/{ => 201706}/20170519 5 reasons the D programming language is a great choice for development.md (100%) rename published/{ => 201706}/20170519 Accelerating your C++ on GPU with SYCL.md (100%) rename published/{ => 201706}/20170520 How to master the art of Git.md (100%) rename published/{ => 201706}/20170529 Linux comm command tutorial for beginners.md (100%) rename published/{ => 201706}/20170530 How to Fix SambaCry Vulnerability (CVE-2017-7494) in Linux Systems.md (100%) rename published/{ => 201706}/20170531 Get started with machine learning using Python.md (100%) rename published/{ => 201706}/20170531 Understand Linux Load Averages and Monitor Performance of Linux.md (100%) rename published/{ => 201706}/20170601 Cron Vs Anacron How to Schedule Jobs Using Anacron on Linux.md (100%) rename published/{ => 201706}/20170602 MyCLI - A MySQLMariaDB Client with Auto-completion and Syntax-highlighting.md (100%) rename published/{ => 201706}/20170603 mimipenguin – Dump Login Passwords From Current Linux Users.md (100%) rename published/{ => 201706}/20170606 ps_mem – A Simple Python Script To Report Core Memory Usage Accurately In Linux.md (100%) rename published/{ => 201706}/20170609 Powerline – A Powerful Statusline Plugin For Vim Bash Terminal.md (100%) rename published/{ => 201706}/20170614 Automatically Create Remove And Mount Swap File In Linux Using Shell Script.md (100%) rename published/{ => 201706}/20170622 Free Up Some Space in Ubuntu LinuxMint With Ubuntu Cleaner.md (100%) rename published/{ => 201706}/20170622 Linus Torvalds Explains How Linux Still Surprises and Motivates Him.md (100%) rename published/{ => 201706}/20170623 A introduction to creating documents in LaTeX.md (100%) rename published/{ => 201706}/20170623 Pass – A Simple command-line Password Manager for Linux.md (100%) diff --git a/published/20110207 How debuggers work Part 3 - Debugging information.md b/published/201706/20110207 How debuggers work Part 3 - Debugging information.md similarity index 100% rename from published/20110207 How debuggers work Part 3 - Debugging information.md rename to published/201706/20110207 How debuggers work Part 3 - Debugging information.md diff --git a/published/20160808 What is open source.md b/published/201706/20160808 What is open source.md similarity index 100% rename from published/20160808 What is open source.md rename to published/201706/20160808 What is open source.md diff --git a/published/20160831 Apache Spark Scale - A 60 TB production use case.md b/published/201706/20160831 Apache Spark Scale - A 60 TB production use case.md similarity index 100% rename from published/20160831 Apache Spark Scale - A 60 TB production use case.md rename to published/201706/20160831 Apache Spark Scale - A 60 TB production use case.md diff --git a/published/20161027 Network management with LXD.md b/published/201706/20161027 Network management with LXD.md similarity index 100% rename from published/20161027 Network management with LXD.md rename to published/201706/20161027 Network management with LXD.md diff --git a/published/20170105 Top 8 systems operations and engineering trends for 2017.md b/published/201706/20170105 Top 8 systems operations and engineering trends for 2017.md similarity index 100% rename from published/20170105 Top 8 systems operations and engineering trends for 2017.md rename to published/201706/20170105 Top 8 systems operations and engineering trends for 2017.md diff --git a/published/20170113 Tips for non-native English speakers working on open source projects.md b/published/201706/20170113 Tips for non-native English speakers working on open source projects.md similarity index 100% rename from published/20170113 Tips for non-native English speakers working on open source projects.md rename to published/201706/20170113 Tips for non-native English speakers working on open source projects.md diff --git a/published/20170116 Why every business should consider an open source point of sale system.md b/published/201706/20170116 Why every business should consider an open source point of sale system.md similarity index 100% rename from published/20170116 Why every business should consider an open source point of sale system.md rename to published/201706/20170116 Why every business should consider an open source point of sale system.md diff --git a/published/20170118 10 reasons to use Cinnamon as your Linux desktop environment.md b/published/201706/20170118 10 reasons to use Cinnamon as your Linux desktop environment.md similarity index 100% rename from published/20170118 10 reasons to use Cinnamon as your Linux desktop environment.md rename to published/201706/20170118 10 reasons to use Cinnamon as your Linux desktop environment.md diff --git a/published/20170118 How to gain confidence to participate in open source.md b/published/201706/20170118 How to gain confidence to participate in open source.md similarity index 100% rename from published/20170118 How to gain confidence to participate in open source.md rename to published/201706/20170118 How to gain confidence to participate in open source.md diff --git a/published/20170126 How to use slice capacity and length in Go.md b/published/201706/20170126 How to use slice capacity and length in Go.md similarity index 100% rename from published/20170126 How to use slice capacity and length in Go.md rename to published/201706/20170126 How to use slice capacity and length in Go.md diff --git a/published/20170202 A look at 6 iconic open source brands.md b/published/201706/20170202 A look at 6 iconic open source brands.md similarity index 100% rename from published/20170202 A look at 6 iconic open source brands.md rename to published/201706/20170202 A look at 6 iconic open source brands.md diff --git a/published/20170205 Can academic faculty members teach with wikipedia.md b/published/201706/20170205 Can academic faculty members teach with wikipedia.md similarity index 100% rename from published/20170205 Can academic faculty members teach with wikipedia.md rename to published/201706/20170205 Can academic faculty members teach with wikipedia.md diff --git a/published/20170207 How Linux Helped Me Become an Empowered Computer User.md b/published/201706/20170207 How Linux Helped Me Become an Empowered Computer User.md similarity index 100% rename from published/20170207 How Linux Helped Me Become an Empowered Computer User.md rename to published/201706/20170207 How Linux Helped Me Become an Empowered Computer User.md diff --git a/published/20170210 How to install OTRS on Ubuntu 16.04.md b/published/201706/20170210 How to install OTRS on Ubuntu 16.04.md similarity index 100% rename from published/20170210 How to install OTRS on Ubuntu 16.04.md rename to published/201706/20170210 How to install OTRS on Ubuntu 16.04.md diff --git a/published/20170214 Software-Defined Storage Opens Up 10 Projects to Know.md b/published/201706/20170214 Software-Defined Storage Opens Up 10 Projects to Know.md similarity index 100% rename from published/20170214 Software-Defined Storage Opens Up 10 Projects to Know.md rename to published/201706/20170214 Software-Defined Storage Opens Up 10 Projects to Know.md diff --git a/published/20170308 Many SQL Performance Problems Stem from Unnecessary, Mandatory Work.md b/published/201706/20170308 Many SQL Performance Problems Stem from Unnecessary, Mandatory Work.md similarity index 100% rename from published/20170308 Many SQL Performance Problems Stem from Unnecessary, Mandatory Work.md rename to published/201706/20170308 Many SQL Performance Problems Stem from Unnecessary, Mandatory Work.md diff --git a/published/20170314 One Year Using Go.md b/published/201706/20170314 One Year Using Go.md similarity index 100% rename from published/20170314 One Year Using Go.md rename to published/201706/20170314 One Year Using Go.md diff --git a/published/20170316 An introduction to GRUB2 configuration for your Linux machine.md b/published/201706/20170316 An introduction to GRUB2 configuration for your Linux machine.md similarity index 100% rename from published/20170316 An introduction to GRUB2 configuration for your Linux machine.md rename to published/201706/20170316 An introduction to GRUB2 configuration for your Linux machine.md diff --git a/published/20170317 AWS cloud terminology.md b/published/201706/20170317 AWS cloud terminology.md similarity index 100% rename from published/20170317 AWS cloud terminology.md rename to published/201706/20170317 AWS cloud terminology.md diff --git a/published/20170317 How to control GPIO pins and operate relays with the Raspberry Pi.md b/published/201706/20170317 How to control GPIO pins and operate relays with the Raspberry Pi.md similarity index 100% rename from published/20170317 How to control GPIO pins and operate relays with the Raspberry Pi.md rename to published/201706/20170317 How to control GPIO pins and operate relays with the Raspberry Pi.md diff --git a/published/20170317 Why do you use Linux and open source software.md b/published/201706/20170317 Why do you use Linux and open source software.md similarity index 100% rename from published/20170317 Why do you use Linux and open source software.md rename to published/201706/20170317 Why do you use Linux and open source software.md diff --git a/published/20170321 Writing a Linux Debugger Part 1 Setup.md b/published/201706/20170321 Writing a Linux Debugger Part 1 Setup.md similarity index 100% rename from published/20170321 Writing a Linux Debugger Part 1 Setup.md rename to published/201706/20170321 Writing a Linux Debugger Part 1 Setup.md diff --git a/published/20170323 How to Install iRedMail on CentOS 7 for Samba4 AD Integration – Part 10.md b/published/201706/20170323 How to Install iRedMail on CentOS 7 for Samba4 AD Integration – Part 10.md similarity index 100% rename from published/20170323 How to Install iRedMail on CentOS 7 for Samba4 AD Integration – Part 10.md rename to published/201706/20170323 How to Install iRedMail on CentOS 7 for Samba4 AD Integration – Part 10.md diff --git a/published/20170324 Writing a Linux Debugger Part 2 Breakpoints.md b/published/201706/20170324 Writing a Linux Debugger Part 2 Breakpoints.md similarity index 100% rename from published/20170324 Writing a Linux Debugger Part 2 Breakpoints.md rename to published/201706/20170324 Writing a Linux Debugger Part 2 Breakpoints.md diff --git a/published/20170403 Discovering my inner curmudgeon A Linux laptop review.md b/published/201706/20170403 Discovering my inner curmudgeon A Linux laptop review.md similarity index 100% rename from published/20170403 Discovering my inner curmudgeon A Linux laptop review.md rename to published/201706/20170403 Discovering my inner curmudgeon A Linux laptop review.md diff --git a/published/20170409 FreeFileSync – Compare and Synchronize Files in Ubuntu.md b/published/201706/20170409 FreeFileSync – Compare and Synchronize Files in Ubuntu.md similarity index 100% rename from published/20170409 FreeFileSync – Compare and Synchronize Files in Ubuntu.md rename to published/201706/20170409 FreeFileSync – Compare and Synchronize Files in Ubuntu.md diff --git a/published/20170426 Top 4 CDN services for hosting open source libraries.md b/published/201706/20170426 Top 4 CDN services for hosting open source libraries.md similarity index 100% rename from published/20170426 Top 4 CDN services for hosting open source libraries.md rename to published/201706/20170426 Top 4 CDN services for hosting open source libraries.md diff --git a/published/20170427 Linux s Big Bang One Kernel Countless Distros.md b/published/201706/20170427 Linux s Big Bang One Kernel Countless Distros.md similarity index 100% rename from published/20170427 Linux s Big Bang One Kernel Countless Distros.md rename to published/201706/20170427 Linux s Big Bang One Kernel Countless Distros.md diff --git a/published/20170502 How to Find Difference Between Two Directories Using Diff and Meld Tools.md b/published/201706/20170502 How to Find Difference Between Two Directories Using Diff and Meld Tools.md similarity index 100% rename from published/20170502 How to Find Difference Between Two Directories Using Diff and Meld Tools.md rename to published/201706/20170502 How to Find Difference Between Two Directories Using Diff and Meld Tools.md diff --git a/published/20170508 8 ways to get started with open source hardware.md b/published/201706/20170508 8 ways to get started with open source hardware.md similarity index 100% rename from published/20170508 8 ways to get started with open source hardware.md rename to published/201706/20170508 8 ways to get started with open source hardware.md diff --git a/published/20170509 4 Python libraries for building great command-line user interfaces.md b/published/201706/20170509 4 Python libraries for building great command-line user interfaces.md similarity index 100% rename from published/20170509 4 Python libraries for building great command-line user interfaces.md rename to published/201706/20170509 4 Python libraries for building great command-line user interfaces.md diff --git a/published/20170509 Much ado about communication.md b/published/201706/20170509 Much ado about communication.md similarity index 100% rename from published/20170509 Much ado about communication.md rename to published/201706/20170509 Much ado about communication.md diff --git a/published/20170509 ssh_scan – Verifies Your SSH Server Configuration and Policy in Linux.md b/published/201706/20170509 ssh_scan – Verifies Your SSH Server Configuration and Policy in Linux.md similarity index 100% rename from published/20170509 ssh_scan – Verifies Your SSH Server Configuration and Policy in Linux.md rename to published/201706/20170509 ssh_scan – Verifies Your SSH Server Configuration and Policy in Linux.md diff --git a/published/20170512 Understanding Shutdown, Poweroff Halt and Reboot Commands in Linux.md b/published/201706/20170512 Understanding Shutdown, Poweroff Halt and Reboot Commands in Linux.md similarity index 100% rename from published/20170512 Understanding Shutdown, Poweroff Halt and Reboot Commands in Linux.md rename to published/201706/20170512 Understanding Shutdown, Poweroff Halt and Reboot Commands in Linux.md diff --git a/published/20170515 Faster machine learning is coming to the Linux kernel.md b/published/201706/20170515 Faster machine learning is coming to the Linux kernel.md similarity index 100% rename from published/20170515 Faster machine learning is coming to the Linux kernel.md rename to published/201706/20170515 Faster machine learning is coming to the Linux kernel.md diff --git a/published/20170515 How I got started with bash scripting.md b/published/201706/20170515 How I got started with bash scripting.md similarity index 100% rename from published/20170515 How I got started with bash scripting.md rename to published/201706/20170515 How I got started with bash scripting.md diff --git a/published/20170516 How Microsoft is becoming a Linux vendor.md b/published/201706/20170516 How Microsoft is becoming a Linux vendor.md similarity index 100% rename from published/20170516 How Microsoft is becoming a Linux vendor.md rename to published/201706/20170516 How Microsoft is becoming a Linux vendor.md diff --git a/published/20170516 What Fuchsia could mean for Android.md b/published/201706/20170516 What Fuchsia could mean for Android.md similarity index 100% rename from published/20170516 What Fuchsia could mean for Android.md rename to published/201706/20170516 What Fuchsia could mean for Android.md diff --git a/published/20170518 Hugo vs. Jekyll Comparing the leading static website generators.md b/published/201706/20170518 Hugo vs. Jekyll Comparing the leading static website generators.md similarity index 100% rename from published/20170518 Hugo vs. Jekyll Comparing the leading static website generators.md rename to published/201706/20170518 Hugo vs. Jekyll Comparing the leading static website generators.md diff --git a/published/20170519 10 Useful Tips for Writing Effective Bash Scripts in Linux.md b/published/201706/20170519 10 Useful Tips for Writing Effective Bash Scripts in Linux.md similarity index 100% rename from published/20170519 10 Useful Tips for Writing Effective Bash Scripts in Linux.md rename to published/201706/20170519 10 Useful Tips for Writing Effective Bash Scripts in Linux.md diff --git a/published/20170519 5 reasons the D programming language is a great choice for development.md b/published/201706/20170519 5 reasons the D programming language is a great choice for development.md similarity index 100% rename from published/20170519 5 reasons the D programming language is a great choice for development.md rename to published/201706/20170519 5 reasons the D programming language is a great choice for development.md diff --git a/published/20170519 Accelerating your C++ on GPU with SYCL.md b/published/201706/20170519 Accelerating your C++ on GPU with SYCL.md similarity index 100% rename from published/20170519 Accelerating your C++ on GPU with SYCL.md rename to published/201706/20170519 Accelerating your C++ on GPU with SYCL.md diff --git a/published/20170520 How to master the art of Git.md b/published/201706/20170520 How to master the art of Git.md similarity index 100% rename from published/20170520 How to master the art of Git.md rename to published/201706/20170520 How to master the art of Git.md diff --git a/published/20170529 Linux comm command tutorial for beginners.md b/published/201706/20170529 Linux comm command tutorial for beginners.md similarity index 100% rename from published/20170529 Linux comm command tutorial for beginners.md rename to published/201706/20170529 Linux comm command tutorial for beginners.md diff --git a/published/20170530 How to Fix SambaCry Vulnerability (CVE-2017-7494) in Linux Systems.md b/published/201706/20170530 How to Fix SambaCry Vulnerability (CVE-2017-7494) in Linux Systems.md similarity index 100% rename from published/20170530 How to Fix SambaCry Vulnerability (CVE-2017-7494) in Linux Systems.md rename to published/201706/20170530 How to Fix SambaCry Vulnerability (CVE-2017-7494) in Linux Systems.md diff --git a/published/20170531 Get started with machine learning using Python.md b/published/201706/20170531 Get started with machine learning using Python.md similarity index 100% rename from published/20170531 Get started with machine learning using Python.md rename to published/201706/20170531 Get started with machine learning using Python.md diff --git a/published/20170531 Understand Linux Load Averages and Monitor Performance of Linux.md b/published/201706/20170531 Understand Linux Load Averages and Monitor Performance of Linux.md similarity index 100% rename from published/20170531 Understand Linux Load Averages and Monitor Performance of Linux.md rename to published/201706/20170531 Understand Linux Load Averages and Monitor Performance of Linux.md diff --git a/published/20170601 Cron Vs Anacron How to Schedule Jobs Using Anacron on Linux.md b/published/201706/20170601 Cron Vs Anacron How to Schedule Jobs Using Anacron on Linux.md similarity index 100% rename from published/20170601 Cron Vs Anacron How to Schedule Jobs Using Anacron on Linux.md rename to published/201706/20170601 Cron Vs Anacron How to Schedule Jobs Using Anacron on Linux.md diff --git a/published/20170602 MyCLI - A MySQLMariaDB Client with Auto-completion and Syntax-highlighting.md b/published/201706/20170602 MyCLI - A MySQLMariaDB Client with Auto-completion and Syntax-highlighting.md similarity index 100% rename from published/20170602 MyCLI - A MySQLMariaDB Client with Auto-completion and Syntax-highlighting.md rename to published/201706/20170602 MyCLI - A MySQLMariaDB Client with Auto-completion and Syntax-highlighting.md diff --git a/published/20170603 mimipenguin – Dump Login Passwords From Current Linux Users.md b/published/201706/20170603 mimipenguin – Dump Login Passwords From Current Linux Users.md similarity index 100% rename from published/20170603 mimipenguin – Dump Login Passwords From Current Linux Users.md rename to published/201706/20170603 mimipenguin – Dump Login Passwords From Current Linux Users.md diff --git a/published/20170606 ps_mem – A Simple Python Script To Report Core Memory Usage Accurately In Linux.md b/published/201706/20170606 ps_mem – A Simple Python Script To Report Core Memory Usage Accurately In Linux.md similarity index 100% rename from published/20170606 ps_mem – A Simple Python Script To Report Core Memory Usage Accurately In Linux.md rename to published/201706/20170606 ps_mem – A Simple Python Script To Report Core Memory Usage Accurately In Linux.md diff --git a/published/20170609 Powerline – A Powerful Statusline Plugin For Vim Bash Terminal.md b/published/201706/20170609 Powerline – A Powerful Statusline Plugin For Vim Bash Terminal.md similarity index 100% rename from published/20170609 Powerline – A Powerful Statusline Plugin For Vim Bash Terminal.md rename to published/201706/20170609 Powerline – A Powerful Statusline Plugin For Vim Bash Terminal.md diff --git a/published/20170614 Automatically Create Remove And Mount Swap File In Linux Using Shell Script.md b/published/201706/20170614 Automatically Create Remove And Mount Swap File In Linux Using Shell Script.md similarity index 100% rename from published/20170614 Automatically Create Remove And Mount Swap File In Linux Using Shell Script.md rename to published/201706/20170614 Automatically Create Remove And Mount Swap File In Linux Using Shell Script.md diff --git a/published/20170622 Free Up Some Space in Ubuntu LinuxMint With Ubuntu Cleaner.md b/published/201706/20170622 Free Up Some Space in Ubuntu LinuxMint With Ubuntu Cleaner.md similarity index 100% rename from published/20170622 Free Up Some Space in Ubuntu LinuxMint With Ubuntu Cleaner.md rename to published/201706/20170622 Free Up Some Space in Ubuntu LinuxMint With Ubuntu Cleaner.md diff --git a/published/20170622 Linus Torvalds Explains How Linux Still Surprises and Motivates Him.md b/published/201706/20170622 Linus Torvalds Explains How Linux Still Surprises and Motivates Him.md similarity index 100% rename from published/20170622 Linus Torvalds Explains How Linux Still Surprises and Motivates Him.md rename to published/201706/20170622 Linus Torvalds Explains How Linux Still Surprises and Motivates Him.md diff --git a/published/20170623 A introduction to creating documents in LaTeX.md b/published/201706/20170623 A introduction to creating documents in LaTeX.md similarity index 100% rename from published/20170623 A introduction to creating documents in LaTeX.md rename to published/201706/20170623 A introduction to creating documents in LaTeX.md diff --git a/published/20170623 Pass – A Simple command-line Password Manager for Linux.md b/published/201706/20170623 Pass – A Simple command-line Password Manager for Linux.md similarity index 100% rename from published/20170623 Pass – A Simple command-line Password Manager for Linux.md rename to published/201706/20170623 Pass – A Simple command-line Password Manager for Linux.md From ed82b0f55272f0bd7d14fe587f5cedd2b44ba2bd Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 1 Jul 2017 17:08:42 +0800 Subject: [PATCH 011/100] PRF&PUB:20170529 NMAP OS Detection.md @zhousiyu325 --- published/20170529 NMAP OS Detection.md | 175 ++++++++++++++++++ translated/tech/20170529 NMAP OS Detection.md | 175 ------------------ 2 files changed, 175 insertions(+), 175 deletions(-) create mode 100644 published/20170529 NMAP OS Detection.md delete mode 100644 translated/tech/20170529 NMAP OS Detection.md diff --git a/published/20170529 NMAP OS Detection.md b/published/20170529 NMAP OS Detection.md new file mode 100644 index 0000000000..92ea6c772f --- /dev/null +++ b/published/20170529 NMAP OS Detection.md @@ -0,0 +1,175 @@ +用 NMAP 探测操作系统 +============================ + +有时,能够知道一个网络里的机器的操作系统(OS)是有一定好处的。当你知道一台机器的操作系统后,因为你可以在网上搜索专门针对该系统的安全漏洞,所以入侵系统也会更加容易。当然,安全漏洞通常都会很快被修补,但安全漏洞存在时你需要知道。 + +对你自己的网络进行扫描以便发现操作系统类型可以帮助你了解黑客将如何侵入你的网络。 + +### 操作系统探测数据库 + +NAMP 带有一个数据库,它在你安装 NAMP 的时候就会被安装。这个数据库用于操作系统的探测,但是它不会自动更新。 + +这个数据库位于 `/usr/share/nmap/nmap-os-db`。进行更新的最简单方式是首先找到数据库的版本号,用文本编辑器打开这个文件,版本号通常位于第二行。我的数据库的第二行是 `# $Id: nmap-os-db 35407 2015-11-10 04:26:26Z dmiller $`,即这个文件的数据库版本是 35407。 + +要在网上查找一个可更新版本,可以浏览 https://svn.nmap.org/nmap,如图 1 所示: + +![Figure 01.jpg](https://www.linux.org/attachments/figure-01-jpg.699/) + +*图 1* + +你可以从图中看到版本号为 36736,与我的系统上的版本号相比,这个版本号似乎是一个更新的版本。为了对更新的操作系统进行准确的操作系统探测,当然需要对这个数据库进行更新。 + +保留较旧的数据库版本也是一个不错的主意。我当前和版本是 35407,我将在终端执行下面的命令: + +``` +sudo mv /usr/share/nmap/nmap-os-db /usr/share/nmap/nmap-os-db-35407 +``` + +这个数据库被以包含版本号的方式重命名了,下一步就是从网站上下载新版本的数据库,在终端执行下面命令: + +``` +cd /usr/share/nmap +sudo su +wget  https://svn.nmap.org/nmap/nmap-os-db +``` + +新的数据库即将开始被下载,但是你应该加上版本号,就像你在图 1 中看到的版本号 36736。使用文本编辑器打开这个数据库,然后在第二行加上版本号。当版本号变化后,你可以更新你的数据库,然后在其中加入版本号,以便在再次检查更新时做好准备。 + +### 系统探测过程 + +在我们开始使用实际的命令并执行系统探测之前,我们应该详细介绍扫描过程中将会发生的事情。 + +会执行五种不同的测试,每种测试由一个或者多个数据包组成,目标系统对每个数据包作出的响应有助于确定操作系统的类型。 + +五种不同的测试是: + +1. 序列生成(Sequence Generation) +2. ICMP 回显 +3. TCP 显式拥塞通知(Explicit Congestion Notification) +4. TCP +5. UDP + +现在让我们分别看看他们各自在做什么。 + +**序列生成** + +序列生成测试由六个数据包组成,这六个包是每隔 100 毫秒分开发送的,且都是 TCP SYN 包。 + +每个 TCP SYN 包的结果将有助于 NMAP 确定操作系统的类型。 + +**ICMP 回显** + +两个有着不同设置的 ICMP 请求包被送到目标系统,由此产生的反应将有助于实现验证操作系统类型。 + +**TCP 显式拥塞通知(Explicit Congestion Notification)** + +当生成许多包通过路由器时会导致其负载变大,这称之为拥塞。其结果就是系统会变慢以降低拥堵,以便路由器不会发生丢包。 + +这个包仅为了得到目标系统的响应而发送。因为不同的操作系统以不同的方式处理这个包,所以返回的特定值可以用来判断操作系统。 + +**TCP** + +在这个测试中会发送六个数据包。 + +一些带有特定的包设置的包被发送用来到打开的或关闭的端口。结果也将会因为操作系统的不同而不同。 + +所有 TCP 包都是以如下不同的标志被发送: + +1. 无标志 +2. SYN、FIN、URG 和 PSH +3. ACK +4. SYN +5. ACK +6. FIN、PSH 和 URG + +**UDP** + +这个测试由一个被发送给一个关闭的端口的数据包组成。 + +如果目标系统上的这个端口是关闭的,而且返回一条 ICMP 端口不可达的信息,那么就说明没有防火墙。 + +### NMAP 操作系统检测命令 + +现在我们开始实际动手进行系统探测。如果你已经读过一些我写的关于 NMAP 的文章,那么最好不要执行 PING 操作。为了跳过 PING,我们使用参数 `Pn`。为了看到详细的信息,你应该使用 `-v` 参数用于动态显示。为了获取系统的信息,需要使用 `-O` 参数。 + +为了使命令顺利运行和执行 TCP SYN 扫描,你需要以管理员的身份来执行这个命令。在我的例子中,我将只在一个系统上而不是整个网络上进行扫描,使用的命令是: + +``` +sudo nmap -v -Pn -O 192.168.0.63 +``` + +扫描的结果如图2所示,扫描显示七个开放的端口。 + +![Figure 02.jpg](https://www.linux.org/attachments/figure-02-jpg.700/) + +*图 2* + +开放的端口是: + +1. 21/tcp ftp +2. 22/tcp ssh +3. 111/tcp rpcbind +4. 139/tcp netbios-ssn +5. 445/tcp microsoft-ds +6. 2049/tcp nfs +7. 54045/tcp unknown + +系统的 MAC 地址为为:`00:1E:4F:9F:DF:7F`。 + +后面部分显示系统类型为: + +``` +Device type: general purpose +Running: Linux 3.X|4.X +OS CPE: cpe:/o:linux:linux_kernel:3 cpe:/o:linux:linux_kernel:4 +OS details: Linux 3.2 - 4.6 +Uptime guess: 0.324 days (since Sun Apr 23 08:43:32 2017) +``` + +系统当前运行的是 Ubuntu Server 16.04,Linux 内核为 4.8,运行时间猜的较准确。 + +我在另一个系统了又进行了一次测试,结果如图3所示: + +![Figure 03.jpg](https://www.linux.org/attachments/figure-03-jpg.701/) + +*图 3* + +这次扫描中开放的端口与上次不同。所猜的系统为 ‘Microsoft Windows 2000|XP’,实际上是 Windows XP sp3。 + +### 端口嗅探结果 + +让我们来看看图 2 所示的第一次扫描中在后台发生了什么。 + +首先 NMAP 执行一次 TCP 隐秘扫描,在本次系统探测实例中以一个如图 4 所示的数据包 2032 开始。 + +![Figure 04.jpg](https://www.linux.org/attachments/figure-04-jpg.702/) + +*图 4* + +序列生成(Sequence Generation)开始于数据包 2032/2033,第六个数据包是 2047/2048。注意每个都被发送两次,且每隔 100ms 发送下一个数据包。 + +发送的 ICMP 数据包是 2050 - 2053,2 个数据包重复一遍,实际上是 4 个数据包。 + +2056-2057 是 TCP 显式拥塞通知数据包。 + +对 TCP 的 6 个测试是 2059、2060、2061、2063、2065、2067。 + +最后的 UDP 测试是 2073。 + +这些就是用于确定目标系统上操作系统的类型的测试。 + +我希望这将有助于你理解如何更新 NMAP 系统探测数据库和执行对系统的扫描。请注意,你可以和你不在同一个网络中的系统进行扫描,所以可以对互联网上的任何系统进行扫描。 + +-------------------------------------------------------------------------------- + +via: https://www.linux.org/threads/nmap-os-detection.4564/ + +作者:[Jarret B][a] +译者:[zhousiyu325](https://github.com/zhousiyu325) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.linux.org/members/jarret-b.29858/ +[1]:https://svn.nmap.org/nmap +[2]:https://svn.nmap.org/nmap/nmap-os-db \ No newline at end of file diff --git a/translated/tech/20170529 NMAP OS Detection.md b/translated/tech/20170529 NMAP OS Detection.md deleted file mode 100644 index a5dc795147..0000000000 --- a/translated/tech/20170529 NMAP OS Detection.md +++ /dev/null @@ -1,175 +0,0 @@ -NMAP 操作系统探测 -============================ - -有时,能够知道一个网络里的机器的操作系统(OS)是有一定好处的。当你知道一台机器的操作系统后,因为你可以在网上搜索专门针对该系统的安全漏洞,所以入侵系统也会更加容易。当然,安全漏洞通常都会很快被修补,但你需要知道安全漏洞何时存在。 - -对你自己的网络进行扫描以便发现操作系统类型可以帮助你了解黑客将如何侵入你的网络。 - -**操作系统探测数据库** - -NAMP 带有一个数据库,它在你安装 NAMP 的时候就会被安装。这个数据库是用于操作系统的探测,但是它不会自动更新。 - -这个数据库位于`/usr/share/nmap/nmap-os-db`。管理更新的最简单方式是首先找到数据库的版本号,用文本编辑器打开这个文件,版本号通常位于第二行。我的数据库的第二行是`# $Id: nmap-os-db 35407 2015-11-10 04:26:26Z dmiller $`,这个文件的数据库版本是 35407。 - -要在网上查找一个可更新版本,可以浏览 `[https://svn.nmap.org/nmap][1]`,如图1所示: - -![Figure 01.jpg](https://www.linux.org/attachments/figure-01-jpg.699/) -**图1** - -你可以从图中看到版本号为 3676,与我的系统上的版本号相比,这个版本号似乎是一个更新的版本。为了对更新的系统进行准确的操作系统探测,当然需要对这个数据库进行更新。 - -保留较旧的数据库版本也是一个不错的主意。我当前和版本是 35407,我将在终端执行下面的命令: - -``` -sudo mv /usr/share/nmap/nmap-os-db /usr/share/nmap/nmap-os-db-35407 -``` - -这个数据库被以包含版本号的方式重命名了,下一步就是从网站上下载新版本的数据库,在终端执行下面命令: - -``` -cd /usr/share/nmap -sudo su -wget  https://svn.nmap.org/nmap/nmap-os-db -``` -新的数据库即将开始被下载,但是你应该加上版本号,就像你在图 1 中看到的版本号 36736。使用文本编辑器打开这个数据库,然后在第二行加上版本号。当版本号变化后,你可以更新你的数据库,然后在其中加入版本号,以便在再次检查更新时做好准备。 - -**系统探测过程** - -在我们开始使用实际的命令并执行系统探测之前,我们应该详细介绍扫描过程中将会发生的事情。 - -会有五种不同的测试正在被执行,每种测试由一个或者多个数据包组成,目标系统对每个数据包作出的响应有助于确定操作系统的类型。 - -五种不同的测试是: - -1. Sequence Generation - -2. ICMP Echo - -3. TCP Explicit Congestion Notification - -4. TCP - -5. UDP - -现在让我们分别看看他们各自在做什么。 - -**Sequence Generation** - -Sequence Generation 测试由六个数据包组成,这六个包是每隔100毫秒分开发送的,且都是TCP SYN包。 - -每个 TCP SYN 包的结果将有助于 NMAP 确定操作系统的类型。 - -**ICMP Echo** - -两个有着不同设置的 ICMP Request 包被送到目标系统,由此产生的反应将有助于实现验证操作系统类型。 - -**TCP** - -在这个测试中会发送六个数据包。 - -一些带有特定包设置的包被发送用来打开或关闭端口。再次,结果将会因为操作系统的不同而不同。 - -所有 TCP 包都是以如下不同的标志被发送: - -1. no flags - -2. SYN, FIN, URG and PSH - -3. ACK - -4. SYN - -5. ACK - -6. FIN, PSH, and URG - -**UDP** - -这个测试由一个被发送给一个关闭的端口的数据包组成。 - -如果目标系统上的这个端口是关闭的,而且返回一条 ICMP 端口不可达的信息,那么就说明没有防火墙。 - -**NMAP OS Detection Command** - -现在我们需要开始实际动手进行系统探测。如果你已经读过一些我写的关于 NMAP 的文章,那么最好不要执行 PING 命令。为了跳过 PING,我们使用参数 'Pn'。为了看到详细的信息,你应该使用'-v'参数用于动态显示。为了获取系统的信息,需要使用'-O'参数。 - -为了使命令顺利运行和执行 TCP SYN 扫描,你需要以管理员的身份来执行这个命令。在我的例子中,我将只在一个系统上而不是整个网络上进行扫描,使用的命令是: - -> sudo nmap -v -Pn -O 192.168.0.63 - -扫描的结果如图2所示,扫描显示七个开放的端口。 - -![Figure 02.jpg](https://www.linux.org/attachments/figure-02-jpg.700/) -**图2** - -开放的端口是: - -1. 21/tcp ftp - -2. 22/tcp ssh - -3. 111/tcp rpcbind - -4. 139/tcp netbios-ssn - -5. 445/tcp microsoft-ds - -6. 2049/tcp nfs - -7. 54045/tcp unknown - -系统的MAC 地址为为: 00:1E:4F:DF:7F。 - -后面部分显示系统类型为: - - _Device type: general purpose -Running: Linux 3.X|4.X -OS CPE: cpe:/o:linux:linux\_kernel:3 cpe:/o:linux:linux\_kernel:4 -OS details: Linux 3.2 - 4.6 -Uptime guess: 0.324 days (since Sun Apr 23 08:43:32 2017)_ - -系统当前运行的是 Ubuntu Server 16.04,Linux 内核为4.8,运行时间猜的较准确。 - -我在另一个系统了又进行了一次测试,结果如图3所示: - -![Figure 03.jpg](https://www.linux.org/attachments/figure-03-jpg.701/) -**图3** - -这次扫描中开放的端口与上次不同。所猜的系统为 ‘Microsoft Windows 2000|XP’,实际上是 Windows XP sp3。 - -**Port Sniffer Results.** - -让我们来看看图2所示的第一次扫描中在后台正在运行什么。 - -首先 NMAP 执行一次 TCP Stealth 扫描,在本次系统探测测试实例中以一个如图4所示的数据包 2032 开始。 - -![Figure 04.jpg](https://www.linux.org/attachments/figure-04-jpg.702/) -**图4** - -Sequence Generation 开始于数据包 2032/2033,第六个数据包是 2047/2048。注意每个都被发送两次,且每隔 100ms 发送下一个数据包。 - -发送的 ICMP 数据包是2050*2053,2 个数据包被复制一份组成 4 个数据包。 - -2056-2057 是 TCP Explicit Congestion Notification 数据包。 - -对 TCP 的 6 个测试是 2059,2060,2061,2063,2065,2067。 - -最后的 UDP 测试是 2073. - -这些就是用于确定目标系统上操作系统的类型的测试。 - -我希望这将有助于你理解如何更新 NMAP 系统探测数据库和执行对系统的扫描。请注意,你可以和你不在同一个网络中的系统进行扫描,所以可以对互联网上的任何系统进行扫描。 - --------------------------------------------------------------------------------- - -via: https://www.linux.org/threads/nmap-os-detection.4564/ - -作者:[Jarret B ][a] -译者:[zhousiyu325](https://github.com/zhousiyu325) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.linux.org/members/jarret-b.29858/ -[1]:https://svn.nmap.org/nmap -[2]:https://svn.nmap.org/nmap/nmap-os-db \ No newline at end of file From 13b2b06ebc42503458863cc7ba32747aa3344679 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 1 Jul 2017 17:24:52 +0800 Subject: [PATCH 012/100] PRF&PUB:20170607 uCareSystem - All-In-One System Update And Maintenance Tool For UbuntuLinuxMint.md @geekpi --- ...nd Maintenance Tool For UbuntuLinuxMint.md | 37 +++++++------------ 1 file changed, 14 insertions(+), 23 deletions(-) rename {translated/tech => published}/20170607 uCareSystem - All-In-One System Update And Maintenance Tool For UbuntuLinuxMint.md (78%) diff --git a/translated/tech/20170607 uCareSystem - All-In-One System Update And Maintenance Tool For UbuntuLinuxMint.md b/published/20170607 uCareSystem - All-In-One System Update And Maintenance Tool For UbuntuLinuxMint.md similarity index 78% rename from translated/tech/20170607 uCareSystem - All-In-One System Update And Maintenance Tool For UbuntuLinuxMint.md rename to published/20170607 uCareSystem - All-In-One System Update And Maintenance Tool For UbuntuLinuxMint.md index bf5492d71c..4d98a78f2a 100644 --- a/translated/tech/20170607 uCareSystem - All-In-One System Update And Maintenance Tool For UbuntuLinuxMint.md +++ b/published/20170607 uCareSystem - All-In-One System Update And Maintenance Tool For UbuntuLinuxMint.md @@ -1,36 +1,27 @@ -uCareSystem - Ubuntu/Linux Mint 的一体化系统更新和维护工具 +uCareSystem:Ubuntu/Linux Mint 的一体化系统更新和维护工具 ============================================================ - -[uCareSystem Core][2] 是一种能够自动执行基本系统维护活动的轻型实用程序,另一方面它可以通过多种方式减少系统管理员的任务,节省大量时间。它没有任何 GUI,并提供纯粹的命令行界面来执行活动。 +[uCareSystem Core][2] 是一种能够自动执行基本的系统维护活动的轻型实用程序,另一方面它可以通过多种方式减少系统管理员的任务,节省大量时间。它没有任何 GUI,并提供纯粹的命令行界面来执行活动。 Ubuntu 中有几种实用程序来执行系统维护活动。每种工具有它们相应的独特功能和设计。你可以添加一个 cron 任务来自动化这些任务。 uCareSystem Core 会自动刷新发行版仓库、更新可用包列表、卸载包(过期包、孤儿包和旧的 Linux 内核)以及清理取回的包来节省系统磁盘空间。 -建议阅读:[Stacer - Linux 系统优化器及监控工具][3] +- 建议阅读:[Stacer - Linux 系统优化器及监控工具][3] +- 建议阅读:[BleachBit – 快速及最佳的方式清理你的 Linux 系统][4] +- 建议阅读:[用 Ubuntu Cleaner 在 Ubuntu/LinuxMint 中释放一些空间][5] -建议阅读:[BleachBit – 快速及最佳的方式清理你的 Linux 系统][4] - -建议阅读:[用 Ubuntu Cleaner(Janitor Module 的分支)在 Ubuntu/LinuxMint 中释放一些空间][5] - -#### uCareSystem Core 功能 +### uCareSystem Core 功能 * 更新包列表(它将刷新包索引) - * 下载及安装更新 - * 更新包及系统库到最新版本 - -* 移除不需要的、过期和孤儿包。 - +* 移除不需要的、过期的和孤儿包。 * 移除旧内核(它为了安全保留当前和之前一个内核) - * 移除不需要的配置文件 - * 清理已下载的临时包 -#### 在 Ubuntu/LinuxMint 中安装 uCareSystem Core +### 在 Ubuntu/LinuxMint 中安装 uCareSystem Core 因为开发者提供了自己的 PPA,因此我们可以轻易地通过 PPA 在 Ubuntu/LinuxMint 中安装 uCareSystem Core。 @@ -40,7 +31,7 @@ $ sudo apt update $ sudo apt install ucaresystem-core ``` -我们已经成功安装了 `uCareSystem Core` 包并且在执行 CareSystem Core 命令之前要了解它是否会节省磁盘空间,使用 `df -h` 命令检查当前磁盘利用率。 +我们已经成功安装了 `uCareSystem Core` 包,并且在执行 CareSystem Core 命令之前要了解它是否会节省磁盘空间,使用 `df -h` 命令检查当前磁盘利用率。 ``` $ df -h @@ -54,7 +45,7 @@ tmpfs 999M 0 999M 0% /sys/fs/cgroup tmpfs 200M 112K 200M 1% /run/user/1000 ``` -只需在终端中运行 `ucaresystem-core` 命令, 在结束之前它会自动执行而不需要人类交互。 +只需在终端中运行 `ucaresystem-core` 命令,在结束之前它会自动执行而不需要人类交互。 ``` $ sudo ucaresystem-core @@ -115,7 +106,7 @@ Del terminix 1.5.6-1~webupd8~yakkety1 [13.7 kB] ######################### ``` -我可以看见它如预期那样工作。同样也可以发现大概在`/ 分区`节省了 `2GB`。 +我可以看见它如预期那样工作。同样也可以发现大概在`/` 分区节省了 `2GB`。 ``` $ df -h @@ -133,9 +124,9 @@ tmpfs 200M 112K 200M 1% /run/user/1000 via: http://www.2daygeek.com/ucaresystem-system-update-and-maintenance-tool-for-ubuntu-linuxmint/ -作者:[2DAYGEEK ][a] +作者:[2DAYGEEK][a] 译者:[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/) 荣誉推出 @@ -144,4 +135,4 @@ via: http://www.2daygeek.com/ucaresystem-system-update-and-maintenance-tool-for- [2]:https://github.com/cerebrux/uCareSystem [3]:http://www.2daygeek.com/stacer-linux-system-optimizer-and-monitoring-tool/ [4]:http://www.2daygeek.com/bleachbit-system-cleaner-on-ubuntu-debian-fedora-opensuse-arch-linux-mint/ -[5]:http://www.2daygeek.com/ubuntu-cleaner-system-cleaner-ubuntu-tweak-alternative-janitor/ +[5]:https://linux.cn/article-8642-1.html From 9828c4b604f2571b8dd97fe469ac2c74154fec58 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 1 Jul 2017 19:40:35 +0800 Subject: [PATCH 013/100] PRF&PUB:20170621 Boot Repair Tool - Repair The Most Boot Related Problems.md @chenxinlong --- ...- Repair The Most Boot Related Problems.md | 90 ++++++++++++------- 1 file changed, 58 insertions(+), 32 deletions(-) rename {translated/tech => published}/20170621 Boot Repair Tool - Repair The Most Boot Related Problems.md (59%) diff --git a/translated/tech/20170621 Boot Repair Tool - Repair The Most Boot Related Problems.md b/published/20170621 Boot Repair Tool - Repair The Most Boot Related Problems.md similarity index 59% rename from translated/tech/20170621 Boot Repair Tool - Repair The Most Boot Related Problems.md rename to published/20170621 Boot Repair Tool - Repair The Most Boot Related Problems.md index 0adb5c659e..2a150ca350 100644 --- a/translated/tech/20170621 Boot Repair Tool - Repair The Most Boot Related Problems.md +++ b/published/20170621 Boot Repair Tool - Repair The Most Boot Related Problems.md @@ -1,52 +1,78 @@ -# [启动修复工具 - 修复与启动相关的大部分问题][15] +Boot Repair Tool: 可以修复与启动相关的大部分问题 +========= - - [![boot repair tool repair the most boot related problems ](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/boot-repair-tool-repair-the-most-boot-related-problems_orig.jpg)][1] - ​我们都碰到过启动相关的问题并且大部分时候都是简单的 **GRUB** 上的问题。 有时候很多人会觉得、输入一段很长的命令或在论坛中搜索来找到解决方法太麻烦了。今天我要告诉你如何使用一个简单而小的软件来解决大部分的启动相关的问题。这个工具就是著名的 **Boot Repair Tool** 。好了,话不多说,让我们开始吧。 + [![boot repair tool repair the most boot related problems ](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/boot-repair-tool-repair-the-most-boot-related-problems_orig.jpg)][1] + + ​我们都碰到过启动相关的问题,并且大部分时候都是简单的 **GRUB** 上的问题。 有时候很多人会觉得、输入一段很长的命令或在论坛中搜索来找到解决方法太麻烦了。今天我要告诉你如何使用一个简单而轻巧的软件来解决大部分的启动相关的问题。这个工具就是著名的 **Boot Repair Tool** 。好了,话不多说,让我们开始吧。 ### 如何在 Linux 中安装和使用启动修复工具 -你需要一个安装的操作系统的可启动的 pendrive 或 DVD,这是安装这个应用并使用它的前提条件。 引导到 [操作系统][17] 并打开终端并输入以下命令 +你需要一个你所安装的操作系统的现场版的 USB 棒或 DVD,这是安装这个应用并使用它的前提条件。 引导到操作系统[17] 并打开终端并输入以下命令 ``` sudo add-apt-repository -y ppa:yannubuntu/boot-repair sudo apt-get update sudo apt-get install -y boot-repair && boot-repair ``` - [![install boot repair tool in linux](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/install-boot-repair-tool-in-linux.jpg?1498051049)][2] - 在安装结束以后你可以从应用菜单或或其它你在系统上启动应用的地方启动你的修复工具。 - [![run boot-repair from apps menu](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/run-boot-repair-from-apps-menu.jpg?1498051112)][3] - 你可以在菜单栏中看到 Boot Repair。 - [![Picture](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/scan-boot-issues-with-boot-repair.jpg?1498051197)][4] - ​启动它,它就会开始进行一些扫描操作,我们只要等它自己结束就好了。 - [![boot repair app menu to repair system](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/boot-repair-app-menu-to-repair-system.jpg?1498051265)][5] - 现在你会看到这个界面,这是基于之前扫描的建议修复。 在底部还可以有一个高级选项,你可以在高级选项里进行各方面的设置。 我建议没有经验的用户使用推荐维修,因为它很简单,在大多数情况下我们都可以这样做。 -[![apply recommended fixes to fix grub issues](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/apply-recommended-fixes-to-fix-grub-issues.jpg?1498051332)][6] -选择推荐的更新后,它将开始修复。 等待进一步的处理。 - [![fix the grub menu using boot repair](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/fix-the-grub-menu-using-boot-repair.jpg?1498051422)][7] -你现在会看到一个指令界面。 现在是轮到我们操作的时候了。打开终端,逐个复制并粘贴其中高亮的命令到终端中。 - [![download and install grub using the given commands](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/confirm-grub-packages-installation.jpg?1498051588)][8] -命令完成后,你会看到一个上面提及的要求确认的界面。 使用箭头键或Tab键选择是,然后按回车键选择。 现在在 **启动修复工具** 界面中回车。 - [![install grub menu and kernel to fix boot menu](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/install-grub-menu-and-kernel-to-fix-boot-menu.jpg?1498055715)][9] -现在你会看到这个界面。 复制在那里提到的命令,并将其粘贴到终端中,然后按回车并让其执行此操作。 需要一段时间所以请耐心等待,它将下载GRUB、[kernel][18] 或任何修复您的引导所需的内容。 - [![install grub](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/install-grub.jpg?1498055780)][10] - 现在你可能会看到一些选项用于配置安装 GRUB 的位置。 选择是,然后按 Enter,你会看到上面的界面。 使用空格键选择选项和TAB 以浏览选项。 选择并安装 GRUB 后,可以关闭终端。 现在在启动修复工具屏幕中选择 forward 选项。 - [![scan for the boot issues](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/scan-for-the-boot-issues.jpg?1498055908)][11] -现在它会做一些扫描操作。,并且会询问你一些需要确认的一些选项。 每个选项都选择是即可。 - [![fixed boot issues with boot rescue](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/fixed-boot-issues-with-boot-rescue.jpg?1498056040)][12] - 它会显示一个成功的确认消息。 如果没有,并且显示失败的消息,则将生成链接。 转到该链接获取更多帮助。 -成功后,重启你的电脑。 当你重新启动时,你会看到 GRUB。 现在已成功维修您的电脑。 玩的开心。 + [![install boot repair tool in linux](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/install-boot-repair-tool-in-linux.jpg?1498051049)][2] + +在安装结束以后,你可以从应用菜单或或其它你在系统上启动应用的地方启动你的修复工具。 + + [![run boot-repair from apps menu](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/run-boot-repair-from-apps-menu.jpg?1498051112)][3] + +你可以在菜单栏中看到 Boot Repair。 + + [![Picture](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/scan-boot-issues-with-boot-repair.jpg?1498051197)][4] + +​启动它,它就会开始进行一些扫描操作,我们只要等它自己结束就好了。 +​ + [![boot repair app menu to repair system](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/boot-repair-app-menu-to-repair-system.jpg?1498051265)][5] + +现在你会看到这个界面,这是基于之前扫描的建议修复。 在底部还可以有一个高级选项,你可以在高级选项里进行各方面的设置。 我建议没有经验的用户使用推荐维修,因为它很简单,在大多数情况下我们都可以这样做。 + +[![apply recommended fixes to fix grub issues](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/apply-recommended-fixes-to-fix-grub-issues.jpg?1498051332)][6] + +选择推荐的更新后,它将开始修复。 等待进一步的处理。 + + [![fix the grub menu using boot repair](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/fix-the-grub-menu-using-boot-repair.jpg?1498051422)][7] + +你现在会看到一个指令界面。 现在是轮到我们操作的时候了。打开终端,逐个复制并粘贴其中高亮的命令到终端中。 + +[![download and install grub using the given commands](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/confirm-grub-packages-installation.jpg?1498051588)][8] + +命令完成后,你会看到一个上面提及的要求确认的界面。 使用箭头键或 Tab 键选择“Yes”,然后按回车键。 现在在 **启动修复工具** 界面中点击 “forward”。 + + [![install grub menu and kernel to fix boot menu](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/install-grub-menu-and-kernel-to-fix-boot-menu.jpg?1498055715)][9] + +现在你会看到这个界面。 复制在那里提到的命令,并将其粘贴到终端中,然后按回车并让其执行此操作。 需要一段时间所以请耐心等待,它将下载GRUB、内核或任何修复您的引导所需的内容。 + + [![install grub](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/install-grub.jpg?1498055780)][10] + +现在你可能会看到一些选项用于配置安装 GRUB 的位置。 选择“yes”,然后按回车,你会看到上面的界面。使用空格键选择选项和按 TAB 以浏览选项。 选择并安装 GRUB 后,可以关闭终端。 现在在启动修复工具屏幕中选择 “forward” 选项。 + +[![scan for the boot issues](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/scan-for-the-boot-issues.jpg?1498055908)][11] + +现在它会做一些扫描操作,并且会询问你一些需要确认的一些选项。 每个选项都选择是即可。 + +[![fixed boot issues with boot rescue](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/fixed-boot-issues-with-boot-rescue.jpg?1498056040)][12] + +它会显示一个成功的确认消息。 如果没有,并且显示失败的消息,则将生成链接。 转到该链接获取更多帮助。 + +成功后,重启你的电脑。 当你重新启动时,你会看到 GRUB。 现在已成功维修您的电脑。 一切顺利。 ### 引导修复的高级技巧 -当我的电脑出现双引导启动画面时,我发现在修复时,它无法识别 [Windows 7安装在另一个分区上][19]。 这是一个简单的提示来帮你解决这个问题。 +当我的电脑出现双引导启动画面时,我发现在修复时,它无法识别 [安装在另一个分区上的 Windows 7][19]。 这里有一个简单的提示来帮你解决这个问题。 打开终端并安装 os-prober。 它很简单,可以在软件中心或通过终端找到。 os-prober 可以帮助您识别安装在 PC 上的其他操作系统。 -[![install os-prober](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/install-os-prober_orig.jpg)][13] ​After os-prober 已安装完成,通过输入 os-prober 在终端运行它。 如果失败了那么试着用 root 账号运行它。 之后运行update-grub 命令。 这些是所有你可以用于从 GRUB 中启动 Windows 的选项。 +[![install os-prober](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/install-os-prober_orig.jpg)][13] + +os-prober 安装完成后,通过输入 `os-prober` 在终端运行它。 如果失败了那么试着用 root 账号运行它。 之后运行`update-grub` 命令。 这就是你可以用于从 GRUB 中启动 Windows 的所需要做的全部。 + [![upgrade-grub in linux](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/upgrade-grub-in-linux.jpg?1498056179)][14] ### 总结 @@ -57,9 +83,9 @@ os-prober 可以帮助您识别安装在 PC 上的其他操作系统。 via: http://www.linuxandubuntu.com/home/boot-repair-tool-repair-the-most-boot-related-problems -作者:[www.linuxandubuntu.com ][a] +作者:[linuxandubuntu][a] 译者:[chenxinlong](https://github.com/chenxinlong) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 22a365c9c44a3a592d37d4eb8f4d8f5f3c742ee5 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 2 Jul 2017 11:40:26 +0800 Subject: [PATCH 014/100] PRF&PUB:27 - The history of Android.md @alim0x --- .../27 - The history of Android.md | 51 ++++++------------- 1 file changed, 16 insertions(+), 35 deletions(-) rename {translated/talk => published}/The history of Android/27 - The history of Android.md (72%) diff --git a/translated/talk/The history of Android/27 - The history of Android.md b/published/The history of Android/27 - The history of Android.md similarity index 72% rename from translated/talk/The history of Android/27 - The history of Android.md rename to published/The history of Android/27 - The history of Android.md index d300fdbd24..aea9737720 100644 --- a/translated/talk/The history of Android/27 - The history of Android.md +++ b/published/The history of Android/27 - The history of Android.md @@ -1,36 +1,23 @@ -安卓编年史 +安卓编年史(26):Android Wear ================================================================================ ->让我们跟着安卓从 0.5 版本到 7 的无尽迭代来看看它的发展历史。 - ### Android Wear -* [ - ![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/g-watch-150x150.png) - ][1] -* [ - ![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/Untitled-150x150.jpg) - ][2] -* [ - ![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/home-screen33-640x261-150x150.png) - ][3] -* [ - ![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/feature-640x212-150x150.png) - ][4] -* [ - ![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/superlayout2000-150x150.png) - ][5] -* [ - ![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/darker-150x150.png) - ][6] +![The LG G Watch. One of the first Android Wear devices.](https://cdn.arstechnica.net/wp-content/uploads/2016/10/g-watch.png) 2014 年 6 月安卓装备上了新元素:智能手表。谷歌在 2014 的 Google I/O 上发布了“[Android Wear][10]”,意图在你的手腕上装备一台小电脑。为[一块 1.6 英寸的屏幕][11]进行设计意味着需要从头构思整个界面,所以谷歌精简了安卓 4.4 KitKat,并创建出了一个小巧的智能手表操作系统。Android Wear 设备不是独立的计算机。它们依赖于运行着配套 Android Wear 应用的安卓智能手机进行连接,认证,以及应用数据获取。 +![ The typical Android Wear home screen.](https://cdn.arstechnica.net/wp-content/uploads/2016/10/home-screen33-640x261.png) + Android Wear 智能手表主要是一个通知机器。有了安卓 4.3 及以上版本内建的新 API,任何手机收到的通知都能同时显示在手表上——无需任何应用支持。通知操作按钮也带到了手表上,让用户可以从手表上与通知进行交互。在手表上清除一条通知会同时在手机上将其清除,用户无需拿出另一台设备就可以管理通知消息。每个手表还带有一个语音命令系统和一个麦克风,让用户可以抬腕唤醒手表,说“OK Google”,并发出一条命令。你还可以通过语音回复信息。手表上甚至还有一个装有原生手表应用的应用抽屉。 +![Three Android Wear screens, showing music on the home screen, the voice command system, and a Google Now traffic card.](https://cdn.arstechnica.net/wp-content/uploads/2016/10/feature-640x212.png) + 主屏幕上显示的自然是时间了,它还允许用户切换无数不同的表盘风格。通知界面采用了卡片风格设计。一个垂直滚动的通知列表会在手表上堆积,包括一些显示天气或交通信息的 Google Now 卡片。向左滑动能够清除一条通知,向右滑动会一次打开一个操作按钮。在主屏幕点击会打开语音命令系统,在哪里你可以激活设置或应用抽屉。除了这些以外最初的 Android Wear 的主屏幕没有多少内容。 -2014 年 Android Wear 设备仅仅发售了 720000 部,从那之后我们就没有从软件或硬件上看到多少发展。时至今日,智能手机的销售[一年不如一年][12],甚至在 [Apple Watch][13] 发布后,没人能够真正确定他们想要让小腕上计算机做什么。明显这种情况会持续到 2017 年 Android Wear 2.0 发布。从 Moto 360 给市场带来圆形设备以来,我们还没从硬件厂商那边看到一些新玩意。 +![The layout of the OS.](https://cdn.arstechnica.net/wp-content/uploads/2016/10/superlayout2000-980x821.png) + +2014 年 Android Wear 设备仅仅发售了 720000 部,从那之后我们就没有从软件或硬件上看到多少发展。时至今日,智能手表的销售[一年不如一年][12],甚至在 [Apple Watch][13] 发布后,没人能够真正确定他们想要让小腕上计算机做什么。明显这种情况会持续到 2017 年 Android Wear 2.0 发布。从 Moto 360 给市场带来圆形设备以来,我们还没从硬件厂商那边看到一些新玩意。 ### Android 5.0 Lollipop——有史以来最重要的安卓版本 @@ -38,27 +25,21 @@ Android Wear 智能手表主要是一个通知机器。有了安卓 4.3 及以 2014 年 11 月,谷歌发布了 [安卓 5.0 棒棒糖][14]。很多系统更新都被称作“有史以来最大的”,但那些陈词滥调在安卓 5.0 棒棒糖的身上成真了。首先,它改变了安卓发布的方式。谷歌与这个版本的安卓一同开始了“开发者预览”计划,可以以 beta 的形式提前几个月看到新版本。由于版本代号和版本号现在被用作市场营销工具,最终的名称在 beta 期间始终保密,仅以字母指代。在 2014 年的 Google I/O 大会,谷歌宣布了“Android L 开发者预览”。 -### 延伸阅读 +给开发者(以及全世界)四个月的时间接触学习这个版本肯定是有必要的。安卓 L 包含了大范围的变动,它们在系统中都是首次亮相,直到今天还能感受到这些变动。棒棒糖引入了 Material Design 设计理念,作为修改安卓每个界面的指南。一个新的运行时环境“ART”,它代表着驱动安卓应用引擎的完全革新。谷歌的“OK Google”语音命令系统升级到能在任意界面生效,在一些设备上它甚至可以在设备锁定的时候工作。多用户系统从平板来到了手机上。棒棒糖还铺设了 Android for Work 的基础,这是一个关注企业与个人双重应用的特性。 -[安卓 5.0 棒棒糖,完全评测][7] +#### Material Design 给了安卓(以及谷歌的所有产品)一个统一形象 -给开发者(以及全世界)四个月的时间接触学习这个版本肯定是有必要的。安卓 L 包含大范围的变动,它们在系统中都是首次亮相,直到今天还能感受到这些变动。棒棒糖引入了 Material Design 设计理念,作为修改安卓每个界面的指南。一个新的运行时环境“ART”,它代表着驱动安卓应用引擎的完全革新。谷歌的“OK Google”语音命令系统升级到能在任意界面生效,在一些设备上它甚至可以在设备锁定的时候工作。多用户系统从平板来到了手机上。棒棒糖还铺设了 Android for Work 的基础,这是一个关注企业与个人双重应用的特性。 +当 Matias Duarte 踏上 I/O 大会的舞台并宣布 Material Design 时,它公布的不仅仅是一个安卓的统一设计蓝图,还是谷歌的所有产品以及第三方应用生态的统一设计蓝图。这个想法是安卓、iOS、Chrome OS,以及 Web 版的谷歌产品,都应该有一致的界面风格、字体,以及行为。它们在不需要在不同尺寸的屏幕上有相同的布局,Material Design 提供了有一致行为的构建元素,它们能够基于屏幕尺寸自适应布局。 -#### Material Design 给了安卓(以及谷歌的所有产品)一个统一 - -当 Matias Duarte 踏上 I/O 大会的舞台并宣布 Material Design 时,他公布的不仅仅是一个安卓的统一设计蓝图,还是谷歌的所有产品以及第三方应用生态的统一设计蓝图。这个想法是安卓,iOS,Chrome OS,以及 Web 版的谷歌产品,都应该有一致的界面风格,字体,以及行为。它们在不需要在不同尺寸的屏幕上有相同的布局,Material Design 提供了有一致行为的构建元素,它们能够基于屏幕尺寸自适应布局。 - -Duarte 和他的团队在蜂巢中尝试了“电子”风格审美,以及在果冻豆中的“卡片”主题风格,但 Material Design 最终代表了被选中的设计系统,应用到谷歌的所有产品线。Material Design 已经超出了一个用户界面设计指南的概念,成为了谷歌作为一个公司的一致性代表。 +Duarte 和他的团队在蜂巢中尝试了“电子”风格审美,以及在果冻豆中的“卡片”主题风格,但 Material Design 最终成了被选中的设计系统,应用到谷歌的所有产品线。Material Design 已经超出了一个用户界面设计指南的概念,成为了谷歌作为一个公司的一致性代表。 Material Design 主要的比喻是“纸和墨”。所有的用户界面是“纸”的片层,漂浮于最底端平面之上。阴影用来提供界面的层次结构——用户界面的每个层在 Z 轴上拥有一个位置,并在其之下的元素上投射一个阴影。这是在安卓 4.1 的 Google Now 中使用的“卡片”风格更清晰的进化版本。“墨”是用来指代谷歌推荐开发者在界面的重要项目上使用的泼色。这个概念也引用了真实世界的物体概念,与 Windows 8 和 iOS 7 带来的反拟物化“不惜一切代价扁平化”的趋势相违。 -动画也是一个重点,思想是任何东西都不应该“弹出”到屏幕上。组件应该滑进,缩小,或放大。“纸”表面和真实世界中的纸还有点不同,他们可以缩小,扩展,合并以及增大。为了让动画系统协同图像资源工作,阴影不像之前版本中那样整合进用户界面组件——实际上谷歌创造了一个实时的 3D 阴影系统,这样阴影就能够在这些动画和转换中正确渲染。 +动画也是一个重点,思想是任何东西都不应该“弹出”到屏幕上。组件应该滑进,缩小,或放大。“纸”表面和真实世界中的纸还有点不同,它们可以缩小,扩展,合并以及增大。为了让动画系统协同图像资源工作,阴影不像之前版本中那样整合进用户界面组件——实际上谷歌创造了一个实时的 3D 阴影系统,这样阴影就能够在这些动画和转换中正确渲染。 ![棒棒糖的层状界面和阴影的夸张侧视图。](https://cdn.arstechnica.net/wp-content/uploads/2014/07/2014-07-10_21-56-05.jpg) -
棒棒糖的层状界面和阴影的夸张侧视图。[Google I/O 2014 - Material design principles][8]
- -为了将 Material Design 带到谷歌的其它地方以及应用生态系统,谷歌创建并持续维护着[一个统一的设计指南][15],描述了一切设计的规范。那里有应该与不应该做的,基线,基线网格,色板,库存图解,字体,库,布局建议以及更多内容。谷歌甚至开始定期举办[针对设计的会议][16],来听取设计者的声音以及给他们教学,还成立了[Material Design 奖项][17]。在发布 Material Design 后不久,Duarte 离开了安卓团队并成为了谷歌的 Material Design 总监,创建了一个完全专注于设计的部门。 +为了将 Material Design 带到谷歌的其它地方以及应用生态系统,谷歌创建并持续维护着[一个统一的设计指南][15],描述了一切设计的规范。那里有应该与不应该做的,基线、基线网格、色板、堆叠图解、字体、库、布局建议以及更多内容。谷歌甚至开始定期举办[针对设计的会议][16],来听取设计者的声音以及给他们教学,还成立了 [Material Design 奖项][17]。在发布 Material Design 后不久,Duarte 离开了安卓团队并成为了谷歌的 Material Design 总监,创建了一个完全专注于设计的部门。 -------------------------------------------------------------------------------- @@ -66,7 +47,7 @@ via: http://arstechnica.com/gadgets/2016/10/building-android-a-40000-word-histor 作者:[RON AMADEO][a] 译者:[alim0x](https://github.com/alim0x) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 4349fc4cd3dc2e2b28f28b3c2888fdb495f592f7 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 2 Jul 2017 22:59:43 +0800 Subject: [PATCH 015/100] PRF&PUB:20161214 BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md @geekpi --- ...A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md | 165 ++++++++++++++++++ ...A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md | 142 --------------- 2 files changed, 165 insertions(+), 142 deletions(-) create mode 100644 published/20161214 BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md delete mode 100644 translated/tech/20161214 BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md diff --git a/published/20161214 BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md b/published/20161214 BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md new file mode 100644 index 0000000000..be292912f2 --- /dev/null +++ b/published/20161214 BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md @@ -0,0 +1,165 @@ +为树莓派 3 构建 64 位内核 +============================================================ + + +> 编辑:在写完这个这篇文章之后,我在树莓派 3 上基于 Debian 开始打造 64 位的系统。你可以[在这里找到][3]。 + +**树莓派 3** 配有 Broadcom BCM2837 64 位 ARMv8 四核 Cortex A53 处理器,它是一个 **64 位 CPU**。如果你有一块,运行以下命令可能会让你感到惊讶: + +``` +uname -a +Linux raspberrypi 4.4.34-v7+ #930 SMP Wed Nov 23 15:20:41 GMT 2016 armv7l GNU/Linux +``` + +是的,这是一个 **32 位内核**。这是因为树莓派基金会还没有为官方的树莓派系统 Raspbian 提供 64 位版本。然而你可以构建一个,多亏了 [Electron752][9] 提供的许多补丁。 + +### 构建内核 + +树莓派基金会维护着[它们自己的 Linux 内核分支][10],它为它们的设备特别裁剪过,同时定期地从上游合并。 + +我们将会遵照[这个页面][11]的指导来**构建一个 64 位内核**。 + +我们不能使用“本地构建”的方法,因为它需要一块 64 位的树莓派,这个我们明显还没有。因此我们需要**交叉编译**它,**Ubuntu** 是推荐的系统。我个人没有 Ubuntu,因此我在一个有 2 个 CPU 的 Ubuntu 16.04 Digital Ocean 实例上构建,这应该花费我 $0.03。如果你也想这么做,你可以通过[这个链接][12]得到 $10 的免费额度。或者你可以通过使用 Virtualbox 中的 Ubuntu VM 作为实例。 + +首先,我们需要一些**构建工具**以及** aarch64 交叉编译器**: + +``` +apt-get update +apt-get install -y bc build-essential gcc-aarch64-linux-gnu git unzip +``` + +接着我们可以下载 **Linux 内核源码**: + +``` +git clone –depth=1 -b rpi-4.8.y https://github.com/raspberrypi/linux.git +``` + +进入到创建的 git 目录。另外你可以为你的内核添加额外的版本标签,可以通过编辑 `Makefile` 的开始几行完成: + +``` +VERSION = 4 +PATCHLEVEL = 8 +SUBLEVEL = 13 +EXTRAVERSION = +bilal +``` + +为了**构建它**,运行下面的命令: + +``` +make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- bcmrpi3_defconfig +make -j 3 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- +``` + +第一个应该很快。第二个则会完全不同,我没有精确计时,但是对我来说大概要半个小时。根据你的 CPU 数(nproc * 1.5)调整 `-j` 标志。 + +### 选择一个 Linux 发行版 + +在内核编译的时候,我们可以开始准备它的 Linux 发行版了。在本教程中为了简单我使用 **Raspbian**,即使这是一个只有 32 位的发行版。 + +> 如果你想要一直用 64 位系统,你应该选一个有 aarch64 支持的发行版,Debian 有一个健壮的 [ARM64 移植版][4]。得到它基本有三种方式: +> - 下载一个预构建的根文件系统,这很可能会如页面中提到的那样给你一个过期的版本。 +> - 如果你熟悉 debootstrap,用它构建你自己的(这回比较棘手,因为它需要一些手工调整,它最初的目的是在已经运行的主机上进行 chroot,而不是为其他机器构建根文件系统) +> - 我建议使用 multistrap,这里有一个很好的教程:http://free-electrons.com/blog/embdebian-with-multistrap/ + +回到 Raspbian,我们现在可以下载官方系统,并开始准备了。 + +打开一个新的 shell 会话并运行下面的命令: + +``` +wget -O raspbian.zip https://downloads.raspberrypi.org/raspbian_lite_latest +unzip raspbian.zip +``` + +我们用下面的命令审查: + +``` +fdisk -l 2016-11-25-raspbian-jessie-lite.img +Disk 2016-11-25-raspbian-jessie-lite.img: 1.3 GiB, 1390411776 bytes, 2715648 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes +Disklabel type: dos +Disk identifier: 0x244b8248 + +Device Boot Start End Sectors Size Id Type +2016-11-25-raspbian-jessie-lite.img1 8192 137215 129024 63M c W95 FAT32 (LBA) +2016-11-25-raspbian-jessie-lite.img2 137216 2715647 2578432 1.2G 83 Linux +``` + +我们可以看到它有**两个分区**。第一个是**启动分区**,它主要包含了 bootloader、Linux 内核以及少量配置文件。第二个是**根分区**。 + +我们可以在我们的文件系统上**挂载这些分区**,从**根分区**开始: + +``` +mount -o loop,offset=70254592 2016-11-25-raspbian-jessie-lite.img /mnt +``` + +`offset` 取决于扇区大小(512):70254592 = 512 * 137216 + +接着是**启动分区**: + +``` +mount -o loop,offset=4194304,sizelimit=66060288 2016-11-25-raspbian-jessie-lite.img /mnt/boot +``` + +`offset` :4194304 = 512 * 8192,`sizelimit`:66060288 = 512 * 129024 。 + +树莓派系统现在应该可以在 `/mnt` 中看到了。我们基本要完成了。 + +### 打包内核 + +内核编译完成后,最后一步包括**复制 Linux 内核**以及**设备树**到启动分区中: + +``` +cp arch/arm64/boot/Image /mnt/boot/kernel8.img +cp arch/arm64/boot/dts/broadcom/bcm2710-rpi-3-b.dtb /mnt/boot/ +``` + +调整 `config.txt` : + +``` +echo “kernel=kernel8.img” >> /mnt/boot/config.txt +``` + +安装**内核模块** : + +``` +make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu INSTALL_MOD_PATH=/mnt modules_install +umount /mnt/boot +umount /mnt +``` + +就是这样了,用于树莓派 3 的** ARM64 Linux 内核**诞生了! + +现在你可以压缩镜像,通过 scp 下载下来,并按照标准的步骤放到你的 SD 卡中。 + +最后你会得到: + +``` +uname -a +Linux raspberrypi 4.8.13+bilal-v8+ #1 SMP Wed Dec 14 14:09:38 UTC 2016 aarch64 GNU/Linux +``` + +-------------------------------------------------------------------------------- + +via: https://devsidestory.com/build-a-64-bit-kernel-for-your-raspberry-pi-3/ + +作者:[Bilal Amarni][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://devsidestory.com/about-me +[1]:https://devsidestory.com/author/bamarni/ +[2]:https://devsidestory.com/build-a-64-bit-kernel-for-your-raspberry-pi-3/ +[3]:https://github.com/bamarni/pi64 +[4]:https://wiki.debian.org/Arm64Port +[5]:https://devsidestory.com/#twitter +[6]:https://devsidestory.com/#linkedin +[7]:https://devsidestory.com/#google_plus +[8]:https://www.addtoany.com/share#url=https%3A%2F%2Fdevsidestory.com%2Fbuild-a-64-bit-kernel-for-your-raspberry-pi-3%2F&title=Build%20a%2064-bit%20Kernel%20for%20your%20Raspberry%20Pi%203 +[9]:https://github.com/Electron752 +[10]:https://github.com/raspberrypi/linux +[11]:https://www.raspberrypi.org/documentation/linux/kernel/building.md +[12]:https://m.do.co/c/8ef9c5832a9c diff --git a/translated/tech/20161214 BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md b/translated/tech/20161214 BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md deleted file mode 100644 index 4d8e92ed40..0000000000 --- a/translated/tech/20161214 BUILD A 64-BIT KERNEL FOR YOUR RASPBERRY PI 3.md +++ /dev/null @@ -1,142 +0,0 @@ -为树莓派 3 构建 64 位内核 -============================================================ - - -> 编辑:在写完这个这篇文章之后,我开始在树莓派 3 上开始 64 位基于 Debian 的系统。你可以[在这里找到][3] - -**树莓派 3** 配有 Broadcom BCM2837 64 位 ARMv8 四核 Cortex A53 处理器,它是一个 **64 位 CPU**。如果你有一块,运行以下命令可能会让你感到惊讶: - -> > uname -a -> Linux raspberrypi 4.4.34-v7+ #930 SMP Wed Nov 23 15:20:41 GMT 2016 armv7l GNU/Linux - -是的,这是一个 **32 位内核**。这是因为树莓派基金会还没有为官方的树莓派系统 Raspbian 提供 64 位版本。然而可以构建一个,多亏了 [Electron752][9] 提供的许多补丁。 - -# 构建内核 - -树莓派基金会维护了[它们自己的 Linux 内核分支][10],它为它们的设备特别裁剪过,同时会有规律地从上游合并。 - -我们将会从[这个页面][11]接受指导来**构建一个 64 位内核**。 - -我么不能使用“本地构建”的方法,因为它需要一块 64 位的树莓派,这个我们明显还没有。因此我们需要**交叉编译**它,**Ubuntu** 是推荐的系统。我个人没有 Ubuntu,因此我在一个有 2 个 CPU 的 Ubuntu 16.04 Digital Ocean 实例上构建,这应该花费我 $0.03。如果你也想这么做,你可以通过[这个链接][12]得到 $10 的免费额度。或者你可以通过使用 Virtualbox 中的 Ubuntu VM 作为实例。 - -首先,我们需要一些**构建工具**以及** aarch64 交叉编译器**: - -> > apt-get update -> > apt-get install -y bc build-essential gcc-aarch64-linux-gnu git unzip - -接着我们可以下载** Linux 内核源码**: - -> > git clone –depth=1 -b rpi-4.8.y https://github.com/raspberrypi/linux.git - -在创建的 git 目录中输入。另外你可以为你的内核添加额外的版本标签,可以通过编辑 Makefile 的开始几行达到: - - -> VERSION = 4 -> PATCHLEVEL = 8 -> SUBLEVEL = 13 -> EXTRAVERSION = +bilal - -为了**构建它**,运行下面的命令: - -> > make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- bcmrpi3_defconfig -> > make -j 3 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- - -第一个应该很快。第二个则会完全不同,我没有精确计时,但是对我大概有半个小时。根据你的 CPU 数(nproc * 1.5)调整 -j 标志。 - -# 选择一个 Linux 发行版 - -在内核编译的时候,我们可以开始准备它的 Linux 发行版了。在本教程中为了简单我使用 **Raspbian**,即使这是一个只有 32 位的发行版。 - -_如果你想要一直只用 64 为系统,你应该选一个有 aarch64 支持的发行版,Debian 有一个鲁棒的 [ARM64 移植版][4]。得到它基本有三种选择:_ - _- 下载一个预构建的根文件系统,这很可能会如页面中提到的那样给你一个过期的版本。_ - _- 如果你熟悉 debootstrap,用它构建你自己的(否则这回比较棘手,因为它需要一些手工调整,它最初的目的是从已经运行的主机上 chroot,而不是为其他机器构建根文件系统)_ - _- 我建议使用 multistrap,这里有一个很好的教程:http://free-electrons.com/blog/embdebian-with-multistrap/_ - -回到 Raspbian,我们现在可以下载官方系统,并开始准备了。 - -打开一个新的 shell 会话并运行下面的命令: - -> > wget -O raspbian.zip https://downloads.raspberrypi.org/raspbian_lite_latest -> > unzip raspbian.zip - -我们用下面的命令审查: - -> > fdisk -l 2016-11-25-raspbian-jessie-lite.img -> Disk 2016-11-25-raspbian-jessie-lite.img: 1.3 GiB, 1390411776 bytes, 2715648 sectors -> Units: sectors of 1 * 512 = 512 bytes -> Sector size (logical/physical): 512 bytes / 512 bytes -> I/O size (minimum/optimal): 512 bytes / 512 bytes -> Disklabel type: dos -> Disk identifier: 0x244b8248 -> -> Device Boot Start End Sectors Size Id Type -> 2016-11-25-raspbian-jessie-lite.img1 8192 137215 129024 63M c W95 FAT32 (LBA) -> 2016-11-25-raspbian-jessie-lite.img2 137216 2715647 2578432 1.2G 83 Linux - -我们可以看到它有**两个分区**。第一个是**启动分区**,它主要包含了 bootloader、Linux 内核以及少量配置文件。第二个是**根分区**。 - -我们可以在我们的文件系统上**挂载这些分区**,从**根分区**开始: - -> > mount -o loop,offset=70254592 2016-11-25-raspbian-jessie-lite.img /mnt - -offset 取决于扇区大小,它的大小是 512:70254592 = 512 * 137216 - -接着是**启动分区**: - -> > mount -o loop,offset=4194304,sizelimit=66060288 2016-11-25-raspbian-jessie-lite.img /mnt/boot - - _(offset : 4194304 = 512 * 8192, sizelimit: _ _66060288 = 512 * 129024)_ - -树莓派系统现在应该可以在 /mnt 中看到了。我们基本我要完成了。 - -# 打包内核 - -内核编译完成后,最后一步包括**复制 Linux 内核**以及**设备树**到启动分区中: - -> > cp arch/arm64/boot/Image /mnt/boot/kernel8.img -> > cp arch/arm64/boot/dts/broadcom/bcm2710-rpi-3-b.dtb /mnt/boot/ - -调整 **config.txt** : - -> > echo “kernel=kernel8.img” >> /mnt/boot/config.txt - -安装**内核模块** : - -> > make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu INSTALL_MOD_PATH=/mnt modules_install -> > umount /mnt/boot -> > umount /mnt - -就是这样了,用于树莓派 3 的** ARM64 Linux 内核**诞生了! - -现在你可以压缩镜像,从实例中通过 scp 下载下来,并按照标准的步骤放到你的 SD 卡中。 - -最后你会得到: - -> > uname -a -> Linux raspberrypi 4.8.13+bilal-v8+ #1 SMP Wed Dec 14 14:09:38 UTC 2016 aarch64 GNU/Linux - -[Twitter][5][LinkedIn][6][Google+][7][Share][8] - --------------------------------------------------------------------------------- - -via: https://devsidestory.com/build-a-64-bit-kernel-for-your-raspberry-pi-3/ - -作者:[Bilal Amarni][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://devsidestory.com/about-me -[1]:https://devsidestory.com/author/bamarni/ -[2]:https://devsidestory.com/build-a-64-bit-kernel-for-your-raspberry-pi-3/ -[3]:https://github.com/bamarni/pi64 -[4]:https://wiki.debian.org/Arm64Port -[5]:https://devsidestory.com/#twitter -[6]:https://devsidestory.com/#linkedin -[7]:https://devsidestory.com/#google_plus -[8]:https://www.addtoany.com/share#url=https%3A%2F%2Fdevsidestory.com%2Fbuild-a-64-bit-kernel-for-your-raspberry-pi-3%2F&title=Build%20a%2064-bit%20Kernel%20for%20your%20Raspberry%20Pi%203 -[9]:https://github.com/Electron752 -[10]:https://github.com/raspberrypi/linux -[11]:https://www.raspberrypi.org/documentation/linux/kernel/building.md -[12]:https://m.do.co/c/8ef9c5832a9c From b875d1e88d84c2050d223382318558c987384df7 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 3 Jul 2017 09:04:20 +0800 Subject: [PATCH 016/100] translated --- ...0170620 Debian armhf VM on arm64 server.md | 87 ------------------- ...0170620 Debian armhf VM on arm64 server.md | 85 ++++++++++++++++++ 2 files changed, 85 insertions(+), 87 deletions(-) delete mode 100644 sources/tech/20170620 Debian armhf VM on arm64 server.md create mode 100644 translated/tech/20170620 Debian armhf VM on arm64 server.md diff --git a/sources/tech/20170620 Debian armhf VM on arm64 server.md b/sources/tech/20170620 Debian armhf VM on arm64 server.md deleted file mode 100644 index 16c29561d5..0000000000 --- a/sources/tech/20170620 Debian armhf VM on arm64 server.md +++ /dev/null @@ -1,87 +0,0 @@ -translating---geekpi - -# Debian armhf VM on arm64 server - - -At Collabora one of the many things we do is build [Debian][1] derivatives/overlays for customers on a variety of architectures including 32 bit and 64 bit ARM systems. And just as Debian does, our [OBS][2] system builds on native systems rather than emulators. - -Luckily with the advent of ARM server systems some years ago building natively for those systems has been a lot less painful than it used to be. For 32 bit ARM we've been relying on [Calxeda][3] blade servers, however Calxeda unfortunately tanked ages ago and the hardware is starting to show its age (though luckily Debian Stretch does support it properly, so at least the software is still fresh). - -On the 64 bit ARM side, we're running on Gigabyte MP30-AR1 based servers which can run 32 bit arm code (As opposed to e.g. ThunderX based servers which can only run 64 bit code). As such running armhf VMs on them to act as build slaves seems a good choice, but setting that up is a bit more involved than it might appear. - -The first pitfall is that there is no standard bootloader or boot firmware available in Debian to boot on the "virt" machine emulated by qemu (I didn't want to use an emulation of a real machine). That also means there is nothing to pick the kernel inside the guest at boot nor something which can e.g. have the guest network boot, which means direct kernel booting needs to be used. - -The second pitfall was that the current Debian Stretch armhf kernel isn't built with support for the generic PCI host controller which the qemu virtual machine exposes, which means no storage and no network shows up in the guest. Hopefully that will get solved soonish ([Debian bug 864726][4]) and can be in a Stretch update, until then a custom kernel package is required using the patch attach to the bug report is required but I won't go into that any further in this post. - -So on the happy assumption that we have a kernel that works, the challenge left is to nicely manage direct kernel loading. Or more specifically, how to ensure the hosts boots the kernel the guest has installed via the standard apt tools without having to copy kernels around between guest/host, which essentially comes down to exposing /boot from the guest to the host. The solution we picked is to use qemu's 9pfs support to share a folder from the host and use that as /boot of the guest. For the 9p folder the "mapped" security mode seems needed as the "none" mode seems to get confused by dpkg ([Debian bug 864718][5]). - -As we're using libvirt as our virtual machine manager the remainder of how to glue it all together will be mostly specific to that. - -First step is to install the system, mostly as normal. One can directly boot into the vmlinuz and initrd.gz provided by normal Stretch armhf netboot installer (downloaded into e.g /tmp). The setup overall is straight-forward with a few small tweaks: - -* /srv/armhf-vm-boot is setup to be the 9p shared folder (this should exist and owned by the libvirt-qemu user) that will be used for sharing /boot later - -* the kernel args are setup to setup root= with root partition intended to be used in the VM, adjust for your usage. - -* The image file to use the virtio bus, which doesn't seem the default. - -Apart from those tweaks the resulting example command is similar to the one that can be found in the virt-install man-page: - -``` -virt-install --name armhf-vm --arch armv7l --memory 512 \ - --disk /srv/armhf-vm.img,bus=virtio - --filesystem /srv/armhf-vm-boot,virtio-boot,mode=mapped \ - --boot=kernel=/tmp/vmlinuz,initrd=/tmp/initrd.gz,kernel_args="console=ttyAMA0,root=/dev/vda1" -``` - -Run through the install as you'd normally would. Towards the end the installer will likely complain it can't figure out how to install a bootloader, which is fine. Just before ending the install/reboot, switch to the shell and copy the /boot/vmlinuz and /boot/initrd.img from the target system to the host in some fashion (e.g. chroot into /target and use scp from the installed system). This is required as the installer doesn't support 9p, but to boot the system an initramfs will be needed with the modules needed to mount the root fs, which is provided by the installed initramfs :). Once that's all moved around, the installer can be finished. - -Next, booting the installed system. For that adjust the libvirt config (e.g. using virsh edit and tuning the xml) to use the kernel and initramfs copied from the installer rather then the installer ones. Spool up the VM again and it should happily boot into a freshly installed Debian system. - -To finalize on the guest side /boot should be moved onto the shared 9pfs, the fstab entry for the new /boot should look something like: - -``` -virtio-boot /boot 9p trans=virtio,version=9p2000.L,x-systemd.automount 0 0 -``` - -With that setup, it's just a matter of shuffling the files in /boot around to the new filesystem and the guest is done (make sure vmlinuz/initrd.img stay symlinks). Kernel upgrades will work as normal and visible to the host. - -Now on the host side there is one extra hoop to jump through, as the guest uses the 9p mapped security model symlinks in the guest will be normal files on the host containing the symlink target. To resolve that one, we've used libvirt's qemu hook support to setup a proper symlink before the guest is started. Below is the script we ended up using as an example (/etc/libvirt/hooks/qemu): - -``` -vm=$1 -action=$2 -bootdir=/srv/${vm}-boot - -if [ ${action} != "prepare" ] ; then - exit 0 -fi - -if [ ! -d ${bootdir} ] ; then - exit 0 -fi - -ln -sf $(basename $(cat ${bootdir}/vmlinuz)) ${bootdir}/virtio-vmlinuz -ln -sf $(basename $(cat ${bootdir}/initrd.img)) ${bootdir}/virtio-initrd.img -``` - -With that in place, we can simply point the libvirt definition to use /srv/${vm}-boot/virtio-{vmlinuz,initrd.img} as the kernel/initramfs for the machine and it'll automatically get the latest kernel/initramfs as installed by the guest when the VM is started. - -Just one final rough edge remains, when doing reboot from the VM libvirt leaves qemu to handle that rather than restarting qemu. This unfortunately means a reboot won't pick up a new kernel if any, for now we've solved this by configuring libvirt to stop the VM on reboot instead. As we typically only reboot VMs on kernel (security) upgrades, while a bit tedious, this avoid rebooting with an older kernel/initramfs than intended - --------------------------------------------------------------------------------- - -via: https://www.collabora.com/news-and-blog/blog/2017/06/20/debian-armhf-vm-on-arm64-server/ - -作者:[ Sjoerd Simons][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.collabora.com/news-and-blog/blog/2017/06/20/debian-armhf-vm-on-arm64-server/ -[1]:https://debian.org/ -[2]:http://openbuildservice.org/ -[3]:https://en.wikipedia.org/wiki/Calxeda -[4]:https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864726 -[5]:https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864718 diff --git a/translated/tech/20170620 Debian armhf VM on arm64 server.md b/translated/tech/20170620 Debian armhf VM on arm64 server.md new file mode 100644 index 0000000000..4ce4ed5310 --- /dev/null +++ b/translated/tech/20170620 Debian armhf VM on arm64 server.md @@ -0,0 +1,85 @@ +# arm64 服务器中的 Debian armhf 虚拟机 + + +在 Collabora,我们所做的许多工作之一就是为客户构建包括 32 位和 64 位 ARM 系统在内的各种架构的 [Debian][1] 衍生版。就像 Debian 做的那样,我们的 [OBS][2] 系统建立在原生系统而不是仿真器上。 + +幸运的是随着几年前 ARM 服务器系统的出现,为这些系统原生构建不再像以前那么痛苦了。对于 32 位的 ARM,我们一直依赖 [Calxeda][3] 刀片服务器,然而不幸的是 Calxeda 在不久前淘汰,硬件开始显露其年龄(尽管幸运的是 Debian Stretch 还支持它,因此至少软件还是新的)。 + +在 64 位 ARM 方面,我们运行在基于 Gigabyte MP30-AR1 的服务器上,该服务器可以运行 32 位的 ARM 代码(与之相反,比如基于 ThunderX 的服务器只能运行 64 位代码)。像这样在它们之上运行 armhf 虚拟机作为从构建服务器似乎是一个很好的选择,但是设置起来可能会需要更多东西的介入。 + +第一个陷阱是 Debian 中没有标准的 bootloader 或者 boot 固件来启动 qemu 仿真的 “virt” 设备(我不想使用真实机器的仿真)。这也意味着在启动时客户机内没有任何东西会加载内核,也不会从客户机网络引导,这意味着需要直接的内核引导。 + +第二个陷进是当前的 Debian Stretch armhf 内核并不支持 qemu 虚拟机暴露的通用 PCI 主机控制器,这意味着客户机中不会出现存储器和网络。希望这会被尽快解决([Debian bug 864726][4]),并会出现在 Stretch 更新中,那在之前需要使用 bug 报告中附带的补丁的自定义内核,但在这篇文章中我不想进一步说。 + +高兴的假设我们有一个可用的内核,剩下的挑战是很好地管理直接内核加载。或者更具体地说,如何确保主机通过标准 apt 工具来启动客户机安装的内核,而不必在客户机/主机之间复制内核,这本质上归结于客户机暴露 /boot 给主机。我们选择的方案是使用 qemu 的 9pfs 支持从主机共享一个文件夹,并将其用作客户机的 /boot。对于 9p 文件夹,似乎需要 “mapped” 安全模式,因为 “none” 模式对 dpkg 有问题([Debian bug 864718] [5])。 + +由于我们使用 libvirt 作为我们的虚拟机管理器,剩下的事情就是如何将它们组合到一起。 + +第一步是安装系统,基本和平常一样。可以直接引导进入由普通的 Stretch armhf netboot 安装程序提供的 vmlinuz 和 initrd.gz(下载到如 /tmp 中)。 整体设置是直接的,会有一些小的调整: + +* /srv/armhf-vm-boot 设置为 9p 共享文件夹(这个应该存在,并且由 libvirt-qemu 拥有),这之后会被用于共享 /boot。 + +* 用 root= 后面加上 VM 中的 root 分区,根据你的使用调整。 + +* 镜像文件使用 virtio 总线,这似乎不是默认的。 + +除了这些调整,最后的示例命令与 virt-install 手册页中的相似。 + +``` +virt-install --name armhf-vm --arch armv7l --memory 512 \ + --disk /srv/armhf-vm.img,bus=virtio + --filesystem /srv/armhf-vm-boot,virtio-boot,mode=mapped \ + --boot=kernel=/tmp/vmlinuz,initrd=/tmp/initrd.gz,kernel_args="console=ttyAMA0,root=/dev/vda1" +``` + +按照通常的方式运行安装。到最后安装程序可能会提示它不知道如何安装引导程序,这个没什么问题。只要在结束安装/重启之前,切换到 shell 并以某种方式将目标系统中的 /boot/vmlinuz 和 /boot/initrd.img 复制到主机中(比如 chroot 进入 /target 并在已安装的系统中使用 scp)。 这是必需的,因为安装程序不支持 9p,但是要启动系统,需要 initramfs 以及能够能够挂载根文件系统的模块,这由已安装的 initramfs 提供。这些完成后,安装就可以完成了。 + +接下来,引导已安装的系统。调整 libvirt 配置(比如使用 virsh 编辑并调整 xml)来使用从安装程序复制过来的内核以及 initramfs,而不只是使用它提供的。再次启动虚拟机,它应该就能愉快地进入安装的 Debian 系统中了。 + +要在客户机完成,/boot 应该移动到共享的 9pfs 中,/boot 的新 fatab 条目看上去应该这样: + +``` +virtio-boot /boot 9p trans=virtio,version=9p2000.L,x-systemd.automount 0 0 +``` + +有了这一步,这只是将 /boot 中的文件进入新的文件系统,并且客户机完成了(确保 vmlinuz/initrd.img 保持符号链接)。内核可以如常升级,并对主机可见。 + +这时对于主机端,有另外一个问题需要跨过,由于客户机使用 9p 映射安全模式,客户机的符号链接对主机而言将是普通的包含链接目标的文件。为了解决这个问题,我们在客户机启动前使用 libvirt qemu 的 hook 支持来设置合适的符号链接。作为一个例子,下面是我们最终使用的脚本(/etc/libvirt/hooks/qemu): + +``` +vm=$1 +action=$2 +bootdir=/srv/${vm}-boot + +if [ ${action} != "prepare" ] ; then + exit 0 +fi + +if [ ! -d ${bootdir} ] ; then + exit 0 +fi + +ln -sf $(basename $(cat ${bootdir}/vmlinuz)) ${bootdir}/virtio-vmlinuz +ln -sf $(basename $(cat ${bootdir}/initrd.img)) ${bootdir}/virtio-initrd.img +``` + +有了这个,我们可以简单地定义 libvirt 使用 /srv/${vm}-boot/virtio-{vmlinuz,initrd.img} 作为机器的内核/initramfs,并且当 VM 启动时,它会自动获取客户机安装的最新内核/initramfs。 + +只有最后一个边缘情况存在,当从 VM libvirt 重启会让 qemu 处理它而不是重启 qemu。这不幸如果发生的话,这意味着重启不会加载新内核。所以现在我们通过配置 libvirt 来解决这个问题,从而在重启时停止虚拟机。由于我们通常只在升级内核(安装)时重启 VM,虽然这有点乏味,但这避免了重启加载的是旧内核/initramfs 而不是预期的。 + +-------------------------------------------------------------------------------- + +via: https://www.collabora.com/news-and-blog/blog/2017/06/20/debian-armhf-vm-on-arm64-server/ + +作者:[ Sjoerd Simons][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.collabora.com/news-and-blog/blog/2017/06/20/debian-armhf-vm-on-arm64-server/ +[1]:https://debian.org/ +[2]:http://openbuildservice.org/ +[3]:https://en.wikipedia.org/wiki/Calxeda +[4]:https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864726 +[5]:https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864718 From 7976be5b8ab00aeb4a0aa8f11b27fd9b238d55fe Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 3 Jul 2017 09:07:05 +0800 Subject: [PATCH 017/100] translating --- ...omebook Dual Boot How-to Ubuntu 17.04 GNOME and Chrome OS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170623 Chromebook Dual Boot How-to Ubuntu 17.04 GNOME and Chrome OS.md b/sources/tech/20170623 Chromebook Dual Boot How-to Ubuntu 17.04 GNOME and Chrome OS.md index db6cf25f7d..ef96a3d536 100644 --- a/sources/tech/20170623 Chromebook Dual Boot How-to Ubuntu 17.04 GNOME and Chrome OS.md +++ b/sources/tech/20170623 Chromebook Dual Boot How-to Ubuntu 17.04 GNOME and Chrome OS.md @@ -1,3 +1,5 @@ +translating---geekpi + Chromebook Dual Boot How-to: Ubuntu 17.04 GNOME and Chrome OS ============================================================ From 2c5542a6cd547b561eb08dec6288a04fbbd56662 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 3 Jul 2017 11:17:31 +0800 Subject: [PATCH 018/100] =?UTF-8?q?20170704-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ool facts you should know about FreeDOS.md | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 sources/tech/20170629 4 cool facts you should know about FreeDOS.md diff --git a/sources/tech/20170629 4 cool facts you should know about FreeDOS.md b/sources/tech/20170629 4 cool facts you should know about FreeDOS.md new file mode 100644 index 0000000000..049ca57925 --- /dev/null +++ b/sources/tech/20170629 4 cool facts you should know about FreeDOS.md @@ -0,0 +1,70 @@ +4 cool facts you should know about FreeDOS +============================================================ + +### 23 years later, FreeDOS is in active development and edges out MS-DOS's lifespan by a few years. + + +![4 cool facts you should know about FreeDOS ](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/wings_freedos_game.jpg?itok=3O_GB-7o "4 cool facts you should know about FreeDOS ") +>Image credits : FreeDOS + +In the early 1990s, I was a DOS "power user." I used DOS for everything and even wrote my own tools to extend the DOS command line. Sure, we had Microsoft Windows, but if you remember what computing looked like at the time, Windows 3.1 was not that great. I preferred working in DOS. + +You might understand that I was a little confused and upset in 1994 when Microsoft announced (via interviews in tech magazines) that the next version of Windows would do away with MS-DOS. I thought, "If Windows 3.2 or 4.0 looks anything like Windows 3.1, I want nothing to do with that." I looked around for options and decided that if DOS was going to continue, someone would have to create a DOS that everyone could use when MS-DOS went away. + +So it was on June 29, 1994, that I wrote a message to a Usenet discussion group, announcing a new "free DOS" project: + +> A few months ago, I posted articles relating to starting a public domain version of DOS. The general support for this at the time was strong, and many people agreed with the statement, "start writing!" +> +> So, I have... +> +> Announcing the first effort to produce a PD-DOS. I have written up a "manifest" describing the goals of such a project and an outline of the work, as well as a "task list" that shows exactly what needs to be written. I'll post those here, and let discussion follow. + +Today, it's 23 years later, and [FreeDOS][3] is still going strong! + +We continue to make new releases with new functionality and features. Our FreeDOS 1.2 distribution, released on December 25, 2016, is a testament to how many people enjoy using and working on FreeDOS. As I look back over our history, there's a short list of cool facts about FreeDOS you should know: + +### Software development right out of the box + +With the original DOS, it was difficult to do any coding. DOS provided a simple BASIC interpreter, and some people could do neat things with DEBUG, but you couldn’t really do much programming in DOS. With FreeDOS, there are a bunch of different tools to do software development: compilers, assemblers, debuggers, interpreters, and scripting. After you install FreeDOS, you can immediately start writing code in C, Assembly, Pascal, Perl, and several other languages. + +### Browse the web + +DOS is an old system and the original didn't support networking out of the box. Typically, you had to install device drivers for your hardware to connect to a network, which was usually a simple network like IPX. Few systems supported TCP/IP. + +With FreeDOS, not only do we include a TCP/IP networking stack, we include tools and programs that let you browse the web. Use Dillo for a graphical web browser experience, or Lynx to view the web as formatted plain text. If you just want to grab the HTML code and manipulate it yourself, use Wget or Curl. + +### Play great DOS games + +We know that many people install FreeDOS today to play the classic DOS games, run legacy business applications, or do embedded development. A lot of those people use FreeDOS just to play games, and that’s cool with us. Just because a game is old doesn’t mean it's boring. DOS had a lot of great games! Install your favorite classic game and have fun. + +Because so many people use FreeDOS to play games, we now include a variety of DOS games. The FreeDOS 1.2 distribution includes first-person shooters like FreeDOOM, arcade shooters like Kiloblaster, flight simulators like Vertigo, and others. We aimed to include something for everyone. + +### FreeDOS has now been around longer than MS-DOS + +Microsoft released MS-DOS 1.0 in August 1981\. And thirteen years later, Microsoft effectively deprecated MS-DOS with the release of Windows 95 in August 1995, although MS-DOS was still around in some form until September 2000\. In total, MS-DOS was a thing for nineteen years. + +We announced FreeDOS in June 1994 and made our first Alpha release in September that same year. So FreeDOS has been around for 23 years, edging out Microsoft’s MS-DOS by a few years. Truly, we've been working on FreeDOS for longer than MS-DOS was a thing. FreeDOS has staying power. + +Another important way that FreeDOS is different from other versions of DOS is that  _it is still being developed_ . We have an active developer community and are always looking for new people to help out. Join the community and help build the next version of FreeDOS. + +-------------------------------------------------------------------------------- + +作者简介: + +Jim Hall - I am the founder and coordinator of the FreeDOS Project. I also serve as a director on the GNOME Foundation Board of Directors. At work, I am the Chief Information Officer for Ramsey County, Minnesota. In my spare time, I contribute to usability in open source software, and mentor usability testing in GNOME via Outreachy (formerly the GNOME Outreach Program for Women). + +-------- + +via: https://opensource.com/article/17/6/freedos-still-cool-today + +作者:[Jim Hall][a] +译者:[译者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/jim-hall +[1]:https://opensource.com/article/17/6/freedos-still-cool-today?rate=_5nJLfJhQp2bzfmjkORKyU-H0g8T3mzl7gPCymnb_y0 +[2]:https://opensource.com/user/126046/feed +[3]:https://opensource.com/article/17/6/www.freedos.org +[4]:https://opensource.com/users/jim-hall From 33db09bcd6258427a555aee8eb28c2af90d3b604 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 3 Jul 2017 11:19:26 +0800 Subject: [PATCH 019/100] =?UTF-8?q?20170704-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... cloud orchestration tool using Ansible.md | 393 ++++++++++++++++++ 1 file changed, 393 insertions(+) create mode 100644 sources/tech/20170630 LinchPin A simplified cloud orchestration tool using Ansible.md diff --git a/sources/tech/20170630 LinchPin A simplified cloud orchestration tool using Ansible.md b/sources/tech/20170630 LinchPin A simplified cloud orchestration tool using Ansible.md new file mode 100644 index 0000000000..0ac9aa0565 --- /dev/null +++ b/sources/tech/20170630 LinchPin A simplified cloud orchestration tool using Ansible.md @@ -0,0 +1,393 @@ +LinchPin: A simplified cloud orchestration tool using Ansible +============================================================ + +### Launched in late 2016, LinchPin now has a Python API and a growing community. + + +![LinchPin 1.0: A maturing hybrid cloud orchestration tool using Ansible](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/toolbox-learn-draw-container-yearbook.png?itok=2XFy0htN "LinchPin 1.0: A maturing hybrid cloud orchestration tool using Ansible") +>Image by : [Internet Archive Book Images][10]. Modified by Opensource.com. CC BY-SA 4.0 + +Late last year, [my team announced][11] [LinchPin][12], a hybrid [cloud][13] orchestration tool using Ansible. Provisioning cloud resources has never been easier or faster. With the power of Ansible behind LinchPin, and a focus on simplicity, many cloud resources are available at users' fingertips. In this article, I'll introduce LinchPin and look at how the project has matured in the past 10 months. + +Back when LinchPin was introduced, using the **ansible-playbook** command to run LinchPin was complex. Although that can still be accomplished, LinchPin now has a new front-end command-line user interface (CLI), which is written in [Click][14] and makes LinchPin even simpler than it was before. + +Explore the open source cloud + +* [What is the cloud?][1] + +* [What is OpenStack?][2] + +* [What is Kubernetes?][3] + +* [Why the operating system matters for containers][4] + +* [Keeping Linux containers safe and secure][5] + +Not to be outdone by the CLI, LinchPin now also has a [Python][15] API, which can be used to manage resources, such as Amazon EC2 and OpenStack instances, networks, storage, security groups, and more. The API [documentation][16] can be helpful when you're trying out LinchPin's Python API. + +### Playbooks as a library + +Because the core bits of LinchPin are [Ansible playbooks][17], the roles, modules, filters, and anything else to do with calling Ansible modules has been moved into the LinchPin library. This means that although one can still call the playbooks directly, it's not the preferred mechanism for managing resources. The **linchpin** executable has become the de facto front end for the command-line. + +### Command-line in depth + +Let's have a look at the **linchpin** command in depth: + +``` +$ linchpin +Usage: linchpin [OPTIONS] COMMAND [ARGS]... + + linchpin: hybrid cloud orchestration + +Options: + -c, --config PATH Path to config file + -w, --workspace PATH Use the specified workspace if the familiar Jenkins + $WORKSPACE environment variable is not set + -v, --verbose Enable verbose output + --version Prints the version and exits + --creds-path PATH Use the specified credentials path if WORKSPACE + environment variable is not set + -h, --help Show this message and exit. + +Commands: + init Initializes a linchpin project. + up Provisions nodes from the given target(s) in... + destroy Destroys nodes from the given target(s) in... +``` + +What can be seen immediately is a simple description, along with options and arguments that can be passed to the command. The three commands found near the bottom of this help are where the focus will be for this document. + +### Configuration + +In the past, there was **linchpin_config.yml**. This file is no longer, and has been replaced with an ini-style configuration file, called **linchpin.conf**. Although this file can be modified or placed elsewhere, its placement in the library path allows easy lookup of configurations. In most cases, the **linchpin.conf** file should not need to be modified. + +### Workspace + +The workspace is a defined filesystem path, which allows grouping of resources in a logical way. A workspace can be considered a single point for a particular environment, set of services, or other logical grouping. It can also be one big storage bin of all managed resources. + +The workspace can be specified on the command-line with the **--workspace (-w)** option, followed by the workspace path. It can also be specified with an environment variable (e.g., **$WORKSPACE** in bash). The default workspace is the current directory. + +### Initialization (init) + +Running **linchpin init** will generate the directory structure needed, along with an example **PinFile**, **topology**, and **layout** files: + +``` +$ export WORKSPACE=/tmp/workspace +$ linchpin init +PinFile and file structure created at /tmp/workspace +$ cd /tmp/workspace/ +$ tree +. +├── credentials +├── hooks +├── inventories +├── layouts +│   └── example-layout.yml +├── PinFile +├── resources +└── topologies + └── example-topology.yml +``` + +At this point, one could execute **linchpin up** and provision a single libvirt virtual machine, with a network named **linchpin-centos71**. An inventory would be generated and placed in **inventories/libvirt.inventory**. This can be known by reading the **topologies/example-topology.yml** and gleaning out the **topology_name** value. + +### Provisioning (linchpin up) + +Once a PinFile, topology, and optionally a layout are in place, provisioning can happen. + +We use the dummy tooling because it is much simpler to configure; it doesn't require anything extra (authentication, network, etc.). The dummy provider creates a temporary file, which represents provisioned hosts. If the temporary file does not have any data, hosts have not been provisioned, or they have been recently destroyed. + +The tree for the dummy provider is simple: + +``` +$ tree +. +├── hooks +├── inventories +├── layouts +│   └── dummy-layout.yml +├── PinFile +├── resources +└── topologies + └── dummy-cluster.yml +``` + +The PinFile is also simple; it specifies which topology, and optional layout to use for the **dummy1** target: + +``` +--- +dummy1: + topology: dummy-cluster.yml + layout: dummy-layout.yml +``` + +The **dummy-cluster.yml** topology file is a reference to provision three (3) resources of type **dummy_node**: + +``` +--- +topology_name: "dummy_cluster" # topology name +resource_groups: + - + resource_group_name: "dummy" + resource_group_type: "dummy" + resource_definitions: + - + name: "web" + type: "dummy_node" + count: 3 +``` + +Performing the command **linchpin up** should generate **resources** and **inventory** files based upon the **topology_name** (in this case, **dummy_cluster**): + +``` +$ linchpin up +target: dummy1, action: up + +$ ls {resources,inventories}/dummy* +inventories/dummy_cluster.inventory resources/dummy_cluster.output +``` + +To verify resources with the dummy cluster, check **/tmp/dummy.hosts**: + +``` +$ cat /tmp/dummy.hosts +web-0.example.net +web-1.example.net +web-2.example.net +``` + +The Dummy module provides a basic tooling for pretend (or dummy) provisioning. Check out the details for OpenStack, AWS EC2, Google Cloud, and more in the LinchPin [examples][18]. + +### Inventory Generation + +As part of the PinFile mentioned above, a **layout** can be specified. If this file is specified and exists in the correct location, an Ansible static inventory file will be generated automatically for the resources provisioned: + +``` +--- +inventory_layout: + vars: + hostname: __IP__ + hosts: + example-node: + count: 3 + host_groups: + - example +``` + +When the **linchpin up** execution is complete, the resources file provides useful details. Specifically, the IP address(es) or host name(s) are interpolated into the static inventory: + +``` +[example] +web-2.example.net hostname=web-2.example.net +web-1.example.net hostname=web-1.example.net +web-0.example.net hostname=web-0.example.net + +[all] +web-2.example.net hostname=web-2.example.net +web-1.example.net hostname=web-1.example.net +web-0.example.net hostname=web-0.example.net +``` + +### Teardown (linchpin destroy) + +LinchPin also can perform a teardown of resources. A teardown action generally expects that resources have been provisioned; however, because Ansible is idempotent, **linchpin destroy** will only check to make sure the resources are up. Only if the resources are already up will the teardown happen. + +The command **linchpin destroy** will either use resources and/or topology files to determine the proper teardown procedure. + +The **dummy** Ansible role does not use the resources, only the topology during teardown: + +``` +$ linchpin destroy +target: dummy1, action: destroy + +$ cat /tmp/dummy.hosts +-- EMPTY FILE -- +``` + +The teardown functionality is slightly more limited around ephemeral resources, like networking, storage, etc. It is possible that a network resource could be used with multiple cloud instances. In this way, performing a **linchpin destroy**does not teardown certain resources. This is dependent on each provider's implementation. See specific implementations for each of the [providers][19]. + +### The LinchPin Python API + +Much of what is implemented in the **linchpin** command-line tool has been written using the Python API. The API, although not complete, has become a vital component of the LinchPin tooling. + +The API consists of three packages: + +* **linchpin** + +* **linchpin.cli** + +* **linchpin.api** + +The command-line tool is managed at the base **linchpin** package; it imports the **linchpin.cli** modules and classes, which is a subclassing of **linchpin.api**. The purpose for this is to allow for other possible implementations of LinchPin using the **linchpin.api**, like a planned RESTful API. + +For more information, see the [Python API library documentation on Read the Docs][20]. + +### Hooks + +One of the big improvements in LinchPin 1.0 going forward is hooks. The goal with hooks is to allow additional configuration using external resources in certain specific states during **linchpin** execution. The states currently are as follows: + +* **preup**: Executed before provisioning the topology resources + +* **postup**: Executed after provisioning the topology resources, and generating the optional inventory + +* **predestroy**: Executed before teardown of the topology resources + +* **postdestroy**: Executed after teardown of the topology resources + +In each case, these hooks allow external scripts to run. Several types of hooks exist, including custom ones called  _Action Managers_ . Here's a list of built-in Action Managers: + +* **shell**: Allows either inline shell commands, or an executable shell script + +* **python**: Executes a Python script + +* **ansible**: Executes an Ansible playbook, allowing passing of a **vars_file** and **extra_vars** represented as a Python dict + +* **nodejs**: Executes a Node.js script + +* **ruby**: Executes a Ruby script + +A hook is bound to a specific target and must be restated for each target used. In the future, hooks will be able to be global, and then named in the **hooks**section for each target more simply. + +### Using hooks + +Describing hooks is simple enough, understanding their power might not be so simple. This feature exists to provide flexible power to the user for things that the LinchPin developers might not consider. This concept could lead to a simple way to ping a set of systems, for instance, before running another hook. + +Looking into the  _workspace_  more closely, one might have noticed the **hooks**directory. Let's have a look inside this directory to see the structure: + +``` +$ tree hooks/ +hooks/ +├── ansible +│ ├── ping +│ │   └── dummy_ping.yaml +└── shell + └── database +    ├── init_db.sh +    └── setup_db.sh +``` + +In every case, hooks can be used in the **PinFile**, shown here: + +``` +--- +dummy1: + topology: dummy-cluster.yml + layout: dummy-layout.yml + hooks: + postup: + - name: ping + type: ansible + actions: + - dummy_ping.yaml + - name: database + type: shell + actions: + - setup_db.sh + - init_db.sh +``` + +The basic concept is that there are three postup actions to complete. Hooks are executed in top-down order. Thus, the Ansible **ping** task would run first, followed by the two shell tasks, **setup_db.sh**, followed by **init_db.sh**. Assuming the hooks execute successfully, a ping of the systems would occur, then a database would be set up and initialized. + +### Authentication Driver + +In the initial design of LinchPin, developers decided to have authentication be managed within the Ansible playbooks; however, moving to a more API and command-line driven tool meant that authentication should be outside of the library where the playbooks now reside, and still pass authentication values along as needed. + +### Configuration + +Letting users use the authentication method provided by the driver used accomplished this task. For instance, if the topology called for OpenStack, the standard method is to use either a yaml file, or similar **OS_** prefixed environment variables. A clouds.yaml file consists of a profile, with an **auth**section: + +``` +clouds: + default: + auth: + auth_url: http://stack.example.com:5000/v2.0/ + project_name: factory2 + username: factory-user + password: password-is-not-a-good-password +``` + +More detail is in the [OpenStack documentation][21]. + +This clouds.yaml—or any other authentication file—is located in the **default_credentials_path** (e.g., ~/.config/linchpin) and referenced in the topology: + +``` +--- +topology_name: openstack-test +resource_groups: + - + resource_group_name: linchpin + resource_group_type: openstack + resource_definitions: + - name: resource + type: os_server + flavor: m1.small + image: rhel-7.2-server-x86_64-released + count: 1 + keypair: test-key + networks: + - test-net2 + fip_pool: 10.0.72.0/24 + credentials: + filename: clouds.yaml + profile: default +``` + +The **default_credentials_path** can be changed by modifying the **linchpin.conf**. + +The topology includes a new **credentials** section at the bottom. With **openstack**, **ec2**, and **gcloud** modules, the credentials can be specified similarly. The Authentication driver will then look in the given  _filename_ **clouds.yaml**, and search for the  _profile_  named **default**. + +Assuming authentication is found and loaded, provisioning will continue as normal. + +### Simplicity + +Although LinchPin can be complex around topologies, inventory layouts, hooks, and authentication management, the ultimate goal is simplicity. By simplifying with a command-line interface, along with goals to improve the developer experience coming post-1.0, LinchPin continues to show that complex configurations can be managed with simplicity. + +### Community Growth + +Over the past year, LinchPin's community has grown to the point that we now have a [mailing list][22], an IRC channel (#linchpin on chat.freenode.net), and even manage our sprints in the open with [GitHub][23]. + +The community membership has grown immensely—from 2 core developers to about 10 contributors over the past year. More people continue to work with the project. If you've got an interest in LinchPin, drop us a line, file an issue on GitHub, join up on IRC, or send us an email. + + _This article is based on Clint Savage's OpenWest talk, [Introducing LinchPin: Hybrid cloud provisioning using Ansible][7]. [OpenWest][8] will be held July 12-15, 2017 in Salt Lake City, Utah._ + +-------------------------------------------------------------------------------- + +作者简介: + +Clint Savage - Clint Savage works for Red Hat as a Senior Software Engineer for Project Atomic. His job entails automating Atomic server builds for Fedora, CentOS, and Red Hat Enterprise Linux (RHEL). + +------------- + +via: https://opensource.com/article/17/6/linchpin + +作者:[Clint Savage][a] +译者:[译者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/herlo +[1]:https://opensource.com/resources/cloud?src=cloud_resource_menu1 +[2]:https://opensource.com/resources/what-is-openstack?src=cloud_resource_menu2 +[3]:https://opensource.com/resources/what-is-kubernetes?src=cloud_resource_menu3 +[4]:https://opensource.com/16/12/yearbook-why-operating-system-matters?src=cloud_resource_menu4 +[5]:https://opensource.com/business/16/10/interview-andy-cathrow-anchore?src=cloud_resource_menu5 +[6]:https://opensource.com/article/17/6/linchpin?rate=yx4feHOc5Kf9gaZe5S4MoVAmf9mgtociUimJKAYgwZs +[7]:https://www.openwest.org/custom/description.php?id=166 +[8]:https://www.openwest.org/ +[9]:https://opensource.com/user/145261/feed +[10]:https://www.flickr.com/photos/internetarchivebookimages/14587478927/in/photolist-oe2Gwy-otuvuy-otus3U-otuuh3-ovwtoH-oe2AXD-otutEw-ovwpd8-oe2Me9-ovf688-oxhaVa-oe2mNh-oe3AN6-ovuyL7-ovf9Kt-oe2m4G-ovwqsH-ovjfJY-ovjfrU-oe2rAU-otuuBw-oe3Dgn-oe2JHY-ovfcrF-oe2Ns1-ovjh2N-oe3AmK-otuwP7-ovwrHt-ovwmpH-ovf892-ovfbsr-ovuAzN-ovf3qp-ovuFcJ-oe2T3U-ovwn8r-oe2L3T-oe3ELr-oe2Dmr-ovuyB9-ovuA9s-otuvPG-oturHA-ovuDAh-ovwkV6-ovf5Yv-ovuCC5-ovfc2x-oxhf1V +[11]:http://sexysexypenguins.com/posts/introducing-linch-pin/ +[12]:http://linch-pin.readthedocs.io/en/develop/ +[13]:https://opensource.com/resources/cloud +[14]:http://click.pocoo.org/ +[15]:https://opensource.com/resources/python +[16]:http://linchpin.readthedocs.io/en/develop/libdocs.html +[17]:http://docs.ansible.com/ansible/playbooks.html +[18]:https://github.com/CentOS-PaaS-SIG/linchpin/tree/develop/linchpin/examples/topologies +[19]:https://github.com/CentOS-PaaS-SIG/linch-pin/tree/develop/linchpin/provision/roles +[20]:http://linchpin.readthedocs.io/en/develop/libdocs.html +[21]:https://docs.openstack.org/developer/python-openstackclient/configuration.html +[22]:https://www.redhat.com/mailman/listinfo/linchpin +[23]:https://github.com/CentOS-PaaS-SIG/linch-pin/projects/4 +[24]:https://opensource.com/users/herlo From 51ddad6456b36595f45c81b48c9f90e2b929b6e3 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 3 Jul 2017 11:22:16 +0800 Subject: [PATCH 020/100] =?UTF-8?q?20170704-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20170629 Kubernetes Why does it matter.md | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 sources/tech/20170629 Kubernetes Why does it matter.md diff --git a/sources/tech/20170629 Kubernetes Why does it matter.md b/sources/tech/20170629 Kubernetes Why does it matter.md new file mode 100644 index 0000000000..9407576aa5 --- /dev/null +++ b/sources/tech/20170629 Kubernetes Why does it matter.md @@ -0,0 +1,70 @@ +Kubernetes: Why does it matter? +============================================================ + +### The Kubernetes platform for running containerized workloads takes on some of the heavy lifting when developing and deploying cloud-native applications. + + +![Kubernetes: Why does it matter?](https://opensource.com/sites/default/files/styles/image-full-size/public/images/law/freesoftwareway_law3.png?itok=JMOFOYFp "Kubernetes: Why does it matter?") +>Image by : opensource.com + +Developing and deploying cloud-native applications has become very popular—for very good reasons. There are clear advantages to a process that allows rapid deployment and continuous delivery of bug fixes and new features, but there's a chicken-and-egg problem no one talks about: How do you get there from here? Building the infrastructure and developing processes to develop and maintain cloud-native applications—all from scratch—are non-trivial, time-intensive tasks. + +[Kubernetes][3], a relatively new platform for running containerized workloads, addresses these problems. Originally an internal project within Google, Kubernetes was donated to the [Cloud Native Computing Foundation][4] in 2015 and has attracted developers from the open source community around the world. Kubernetes' design is based on 15 years of experience in running both production and development workloads. Since it is open source, anyone can download and use it and realize its benefits. + +So why is such a big fuss being made over Kubernetes? I believe that it hits a sweet spot between an Infrastructure as a Service (IaaS) solution, like OpenStack, and a full Platform as a Service (PaaS) resource where the lower-level runtime implementation is completely controlled by a vendor. Kubernetes provides the benefits of both worlds: abstractions to manage infrastructure, as well as tools and features to drill down to bare metal for troubleshooting. + +### IaaS vs. PaaS + +OpenStack is classified by most people as an IaaS solution, where pools of physical resources, such as processors, networking, and storage, are allocated and shared among different users. Isolation between users is implemented using traditional, hardware-based virtualization. + +OpenStack's REST API allows infrastructure to be created automatically using code, but therein lies the problem. The output of the IaaS product is yet more infrastructure. There's not much in the way of services to support and manage the extra infrastructure once it has been created. After a certain point, it becomes a lot of work to manage the low-level infrastructure, such as servers and IP addresses, produced by OpenStack. One well-known outcome is virtual machine (VM) sprawl, but the same concept applies to networks, cryptographic keys, and storage volumes. This leaves less time for developers to work on building and maintaining an application. + +Like other cluster-based solutions, Kubernetes operates at the individual server level to implement horizontal scaling. New servers can be added easily and workloads scheduled on the hardware immediately. Similarly, servers can be removed from the cluster when they're not being utilized effectively or when maintenance is needed. Orchestration activities, such as job scheduling, health monitoring, and maintaining high availability, are other tasks automatically handled by Kubernetes. + +Networking is another area that can be difficult to reliably orchestrate in an IaaS environment. Communication of IP addresses between services to link microservices can be particularly tricky. Kubernetes implements IP address management, load balancing, service discovery, and DNS name registration to provide a headache-free, transparent networking environment within the cluster. + +### Designed for deployment + +Once you have created the environment to run your application, there is the small matter of deploying it. Reliably deploying an application is one of those tasks that's easily said, but not easily done—not in the slightest. The huge advantage that Kubernetes has over other environments is that deployment is a first-class citizen. + +There is a single command, using the Kubernetes command-line interface (CLI), that takes a description of the application and installs it on the cluster. Kubernetes implements the entire application lifecycle from initial deployment, rolling out new releases as well as rolling them back—a critical feature when things go wrong. In-progress deployments can also be paused and resumed. The advantage of having existing, built-in tools and support for application deployment, rather than building a deployment system yourself, cannot be overstated. Kubernetes users do not have to reinvent the application deployment wheel nor discover what a difficult task it is. + +Kubernetes also has the facility to monitor the status of an in-progress deployment. While you can write this in an IaaS environment, like the deployment process itself, it's a surprisingly difficult task where corner cases abound. + +### Designed for DevOps + +As you gain more experience in developing and deploying applications for Kubernetes, you will be traveling the same path that Google and others have before you. You'll discover there are several Kubernetes features that are essential to effectively developing and troubleshooting a multi-service application. + +First, Kubernetes' ability to easily examine the logs or SSH (secure shell) into a running service is vitally important. With a single command line invocation, an administrator can examine the logs of a service running under Kubernetes. This may sound like a simple task, but in an IaaS environment it's not easy unless you have already put some work into it. Large applications often have hardware and personnel dedicated just for log collection and analysis. Logging in Kubernetes may not replace a full-featured logging and metrics solution, but it provides enough to enable basic troubleshooting. + +Second, Kubernetes offers built-in secret management. Another hitch known by teams who have developed their own deployment systems from scratch is that deploying sensitive data, such as passwords and API tokens, securely to VMs is hard. By making secrets first-class citizens, Kubernetes stops your team from inventing its own insecure, buggy secret-distribution system or just hardcoding credentials in deployment scripts. + +Finally, there is a slew of features in Kubernetes for automatically scaling, load-balancing, and restarting your application. Again, these features are tempting targets for developers to write when using IaaS or bare metal. Scaling and health checks for your Kubernetes application are declared in the service definition, and Kubernetes ensures that the correct number of instances is running and healthy. + +### Conclusion + +The differences between IaaS and PaaS systems are enormous, including that PaaS can save a vast amount of development and debugging time. As a PaaS, Kubernetes implements a potent and effective set of features to help you develop, deploy, and debug cloud-native applications. Its architecture and design represent decades of hard-won experience that can your team can take advantage of—for free. + +-------------------------------------------------------------------------------- + +作者简介: + +Tim Potter - Tim is a senior software engineer working at Hewlett Packard Enterprise. He has been a contributor to free and open source software for nearly two decades working on a variety of projects including Samba, Wireshark, OpenPegasus, and Docker. Tim blogs at https://elegantinfrastructure.com/ about Docker, Kubernetes and other infrastructure-related topics. + +----- + + +via: https://opensource.com/article/17/6/introducing-kubernetes + +作者:[ Tim Potter][a] +译者:[译者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/tpot +[1]:https://opensource.com/article/17/6/introducing-kubernetes?rate=RPoUoHXYQXbTb7DHQCDsHgR1ZcfLSoquZ8xVZzfMtxM +[2]:https://opensource.com/user/63281/feed +[3]:https://kubernetes.io/ +[4]:https://www.cncf.io/ +[5]:https://opensource.com/users/tpot From abc4cb828612656fc118cf52fb1eec2552b6c595 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 3 Jul 2017 11:25:13 +0800 Subject: [PATCH 021/100] =?UTF-8?q?20170704-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...urn a Raspberry Pi into an eBook server.md | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 sources/tech/20170627 How to turn a Raspberry Pi into an eBook server.md diff --git a/sources/tech/20170627 How to turn a Raspberry Pi into an eBook server.md b/sources/tech/20170627 How to turn a Raspberry Pi into an eBook server.md new file mode 100644 index 0000000000..bab2a2e536 --- /dev/null +++ b/sources/tech/20170627 How to turn a Raspberry Pi into an eBook server.md @@ -0,0 +1,115 @@ +How to turn a Raspberry Pi into an eBook server +============================================================ + +### The Calibre eBook management software makes it easy to set up an eBook server on a Raspberry Pi 3, even in low-connectivity areas. + + +![How to turn a Raspberry Pi into an eBook server](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/idea_innovation_mobile_phone.png?itok=Ep49JfKU "How to turn a Raspberry Pi into an eBook server") +Image by :  + +opensource.com + +Recently [Calibre 3.0 was released][12] which enables users to read books in the browser! Note that Raspbian's repositories have not yet been updated yet (as of this writing). + +eBooks are a great way for teachers, librarians, and others to share books, classroom materials, or other documents with students—provided you have ready and reliable access to broadband. But even if you have low or no connectivity, there's an easy solution: Create an eBook server with the open source Calibre eBook management software running on a Raspberry Pi 3\. Here's how I did it—and you can, too. + +First I downloaded the latest [Raspbian Pixel image][13] and installed it on a new 8GB microSD card. Then I inserted the microSD; connected a keyboard, mouse, and an old LCD TV with an HDMI cable; and booted the Pi. After [adjusting the resolution][14] of the Pixel environment on my monitor and connecting to the local network, I was ready to begin. I opened a terminal and entered **sudo apt-get update** to get the latest updates for the operating system. + +### [1updateos.png][1] + +![Updating Raspbian Pixel](https://opensource.com/sites/default/files/u128651/1updateos.png "Updating Raspbian Pixel") + +Next, I installed the [Calibre][15] software by entering **sudo apt-get install calibre** in a terminal. + +### [2install_calibre.png][2] + +![Installing Calibre](https://opensource.com/sites/default/files/u128651/2install_calibre.png "Installing Calibre") + +I launched Calibre from the command line (note that it can be launched from the GUI also). The Calibre interface is very intuitive. The first time you launch, you see the **Welcome to Calibre** wizard. I changed the default Calibre Library to **CalibreLibrary** (one word), because it's easier when launching the content server. + +After choosing the location for my Calibre content, I was ready to begin downloading books. + +### [3calibre-interface.png][3] + +![Calibre's interface](https://opensource.com/sites/default/files/u128651/3calibre-interface.png "Calibre's interface") + +I selected the **Get Books** option from the menu, and it was very easy to enter my search terms and select the eBook provider I was interested in. I was looking for [non-DRM][16] material, so I chose [Project Gutenberg][17] as my source. (Calibre's disclaimer notes that eBook transactions are between you and the individual content providers.) I entered "Mark Twain" in the author field and got 10 results. + +### [4books.png][4] + +![Searching for e-books](https://opensource.com/sites/default/files/u128651/4books.png "Searching for e-books") + +I selected  _Adventures of Huckleberry Finn_ . On the next screen, I could choose between the **MOBI** and **EPUB** eBook formats. I chose EPUB, and the book downloaded very quickly. + +### [5ebook-formats.png][5] + +![Choosing the e-book format](https://opensource.com/sites/default/files/u128651/5ebook-formats.png "Choosing the e-book format") + +You can also add books to the library from other content providers, not in Calibre's list. For example, a teacher could share open educational resources in eBook format with students through this content server.  To load the content, use the "Add Books" menu option at the far left of the interface + +Depending on the size of your library, you may also need to increase the size of your microSD card. + +![start_the_server.png](https://opensource.com/sites/default/files/images/life-uploads/start_the_server.png) + +After you have added content to your eBook server, you are ready to share it with the rest of your network. Get the IP address of your Raspberry Pi by entering **ifconfig** into the terminal. I was using the wireless network, so I used the result for **wlan0** in the example below. Navigate to the far right of the interface and expand the menu. Then, navigate to "Connect and Share" and start the server. + +### [6ipconfig.png][6] + +![Identifying the IP address with ipconfig](https://opensource.com/sites/default/files/u128651/6ipconfig.png "Identifying the IP address with ipconfig") + +My next step was connecting my client computer to the Raspberry Pi to access the eBooks I'd added. I opened a browser on my client device and navigated to the Raspberry Pi's IP address with the port **:8080** appended. In my case, that was **[http://192.168.1.10:8080][10]** (adapt that format to your Pi's IP address). + +You'll see this home page in your browser: + +### [7calibre-home.png][7] + +![Calibre's client homepage](https://opensource.com/sites/default/files/u128651/7calibre-home.png "Calibre's client homepage") + +I tested and easily connected to the server with an iPhone and Linux and MacOS computers. + +You can explore the options on this home page, or click on **All Books** to display all the content on your eBook server. + +### [8browsing-books.png][8] + +![Browsing e-books](https://opensource.com/sites/default/files/u128651/8browsing-books.png "Browsing e-books") + +From here, you can download the books to your device and read them offline. + +Have you ever set up an eBook server? Or are you thinking about setting up one yourself? Share your advice or questions in the comments. + +-------------------------------------------------------------------------------- + +作者简介: + +Don Watkins - Educator, education technology specialist, entrepreneur, open source advocate. M.A. in Educational Psychology, MSED in Educational Leadership, Linux system administrator, CCNA, virtualization using Virtual Box. Follow me at @Don_Watkins . + +----------------- + +via: https://opensource.com/article/17/6/raspberrypi-ebook-server + +作者:[Don Watkins ][a] +译者:[译者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 +[1]:https://opensource.com/file/356446 +[2]:https://opensource.com/file/356451 +[3]:https://opensource.com/file/356456 +[4]:https://opensource.com/file/356461 +[5]:https://opensource.com/file/356466 +[6]:https://opensource.com/file/356471 +[7]:https://opensource.com/file/356476 +[8]:https://opensource.com/file/356481 +[9]:https://opensource.com/article/17/6/raspberrypi-ebook-server?rate=60Tv_hObNU1MQs2f3G6kNoT4qLyxJ03S1q75p2UEOYg +[10]:http://192.168.1.10:8080/ +[11]:https://opensource.com/user/15542/feed +[12]:https://the-digital-reader.com/2017/06/19/calibre-3-0-released/ +[13]:https://www.raspberrypi.org/downloads/raspbian/ +[14]:https://www.raspberrypi.org/forums/viewtopic.php?t=5851 +[15]:https://calibre-ebook.com/ +[16]:https://en.wikipedia.org/wiki/Digital_rights_management +[17]:https://www.gutenberg.org/ +[18]:https://opensource.com/users/don-watkins +[19]:https://opensource.com/article/17/6/raspberrypi-ebook-server#comments From 9e10b26293207816479dfe0604d692c2b06a0ad7 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 3 Jul 2017 11:34:00 +0800 Subject: [PATCH 022/100] =?UTF-8?q?20170704-5=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...to functional programming in JavaScript.md | 826 ++++++++++++++++++ 1 file changed, 826 insertions(+) create mode 100644 sources/tech/20170627 An introduction to functional programming in JavaScript.md diff --git a/sources/tech/20170627 An introduction to functional programming in JavaScript.md b/sources/tech/20170627 An introduction to functional programming in JavaScript.md new file mode 100644 index 0000000000..729d28f977 --- /dev/null +++ b/sources/tech/20170627 An introduction to functional programming in JavaScript.md @@ -0,0 +1,826 @@ +An introduction to functional programming in JavaScript +============================================================ + +### Explore functional programming and how using it can make your programs easier to read and debug. + + +![An introduction to functional programming in JavaScript](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/bus-rocket.png?itok=vHKRzkyW "An introduction to functional programming in JavaScript") +>Image credits : Steve Jurvetson via [Flickr][80] (CC-BY-2.0) + +When Brendan Eich created JavaScript in 1995, he intended to do [Scheme in the browser][81]. Scheme, being a dialect of Lisp, is a functional programming language. Things changed when Eich was told that the new language should be the scripting language companion to Java. Eich eventually settled on a language that has a C-style syntax (as does Java), yet has first-class functions. Java technically did not have first-class functions until version 8, however you could simulate first-class functions using anonymous classes. Those first-class functions are what makes functional programming possible in JavaScript. + +JavaScript is a multi-paradigm language that allows you to freely mix and match object-oriented, procedural, and functional paradigms. Recently there has been a growing trend toward functional programming. In frameworks such as [Angular][82]and [React][83], you'll actually get a performance boost by using immutable data structures. Immutability is a core tenet of functional programming. It, along with pure functions, makes it easier to reason about and debug your programs. Replacing procedural loops with functions can increase the readability of your program and make it more elegant. Overall, there are many advantages to functional programming. + +### What functional programming isn't + +Before we talk about what functional programming is, let's talk about what it is not. In fact, let's talk about all the language constructs you should throw out (goodbye, old friends): + +Programming and development + +* [New Python content][1] + +* [Our latest JavaScript articles][2] + +* [Recent Perl posts][3] + +* [Red Hat Developers Blog][4] + +* Loops + * **while** + + * **do...while** + + * **for** + + * **for...of** + + * **for...in** + +* Variable declarations with **var** or **let** + +* Void functions + +* Object mutation (for example: **o.x = 5;**) + +* Array mutator methods + * **copyWithin** + + * **fill** + + * **pop** + + * **push** + + * **reverse** + + * **shift** + + * **sort** + + * **splice** + + * **unshift** + +* Map mutator methods + * **clear** + + * **delete** + + * **set** + +* Set mutator methods + * **add** + + * **clear** + + * **delete** + +How can you possibly program without those features? That's exactly what we are going to explore in the next few sections. + +### Pure functions + +Just because your program contains functions does not necessarily mean that you are doing functional programming. Functional programming distinguishes between pure and impure functions. It encourages you to write pure functions. A pure function must satisfy both of the following properties: + +* **Referential transparency:** The function always gives the same return value for the same arguments. This means that the function cannot depend on any mutable state. + +* **Side-effect free:** The function cannot cause any side effects. Side effects may include I/O (e.g., writing to the console or a log file), modifying a mutable object, reassigning a variable, etc. + +Let's illustrate with a few examples. First, the **multiply** function is an example of a pure function. It always returns the same output for the same input, and it causes no side effects. + + +``` +function multiply(a, b) { + return a * b; +} +``` + +[view raw][5][pure-function-example.js][6] hosted with ❤ by [GitHub][7] + +The following are examples of impure functions. The **canRide** function depends on the captured **heightRequirement** variable. Captured variables do not necessarily make a function impure, but mutable (or re-assignable) ones do. In this case it was declared using **let**, which means that it can be reassigned. The **multiply** function is impure because it causes a side-effect by logging to the console. + +``` +let heightRequirement = 46; + +// Impure because it relies on a mutable (reassignable) variable. +function canRide(height) { + return height >= heightRequirement; +} + +// Impure because it causes a side-effect by logging to the console. +function multiply(a, b) { + console.log('Arguments: ', a, b); + return a * b; +} +``` + + +[view raw][8][impure-functions.js][9] hosted with ❤ by [GitHub][10] + +The following list contains several built-in functions in JavaScript that are impure. Can you state which of the two properties each one does not satisfy? + +* **console.log** + +* **element.addEventListener** + +* **Math.random** + +* **Date.now** + +* **$.ajax** (where **$** == the Ajax library of your choice) + +Living in a perfect world in which all our functions are pure would be nice, but as you can tell from the list above, any meaningful program will contain impure functions. Most of the time we will need to make an Ajax call, check the current date, or get a random number. A good rule of thumb is to follow the 80/20 rule: 80% of your functions should be pure, and the remaining 20%, of necessity, will be impure. + +There are several benefits to pure functions: + +* They're easier to reason about and debug because they don't depend on mutable state. + +* The return value can be cached or "memoized" to avoid recomputing it in the future. + +* They're easier to test because there are no dependencies (such as logging, Ajax, database, etc.) that need to be mocked. + +If a function you're writing or using is void (i.e., it has no return value), that's a clue that it's impure. If the function has no return value, then either it's a no-op or it's causing some side effect. Along the same lines, if you call a function but do not use its return value, again, you're probably relying on it to do some side effect, and it is an impure function. + +### Immutability + +Let's return to the concept of captured variables. Above, we looked at the **canRide** function. We decided that it is an impure function, because the **heightRequirement** could be reassigned. Here is a contrived example of how it can be reassigned with unpredictable results: + +``` +let heightRequirement = 46; + +function canRide(height) { + return height >= heightRequirement; +} + +// Every half second, set heightRequirement to a random number between 0 and 200. +setInterval(() => heightRequirement = Math.floor(Math.random() * 201), 500); + +const mySonsHeight = 47; + +// Every half second, check if my son can ride. +// Sometimes it will be true and sometimes it will be false. +setInterval(() => console.log(canRide(mySonsHeight)), 500); +``` + + +[view raw][11][mutable-state.js][12] hosted with ❤ by [GitHub][13] + +Let me reemphasize that captured variables do not necessarily make a function impure. We can rewrite the **canRide** function so that it is pure by simply changing how we declare the **heightRequirement** variable. + +``` +const heightRequirement = 46; + +function canRide(height) { + return height >= heightRequirement; +} +``` + + +[view raw][14][immutable-state.js][15] hosted with ❤ by [GitHub][16] + +Declaring the variable with **const** means that there is no chance that it will be reassigned. If an attempt is made to reassign it, the runtime engine will throw an error; however, what if instead of a simple number we had an object that stored all our "constants"? + +``` +const constants = { + heightRequirement: 46, + // ... other constants go here +}; + +function canRide(height) { + return height >= constants.heightRequirement; +} +``` + + +[view raw][17][captured-mutable-object.js][18] hosted with ❤ by [GitHub][19] + +We used **const** so the variable cannot be reassigned, but there's still a problem. The object can be mutated. As the following code illustrates, to gain true immutability, you need to prevent the variable from being reassigned, and you also need immutable data structures. The JavaScript language provides us with the **Object.freeze** method to prevent an object from being mutated. + +``` +'use strict'; + +// CASE 1: The object is mutable and the variable can be reassigned. +let o1 = { foo: 'bar' }; + +// Mutate the object +o1.foo = 'something different'; + +// Reassign the variable +o1 = { message: "I'm a completely new object" }; + + +// CASE 2: The object is still mutable but the variable cannot be reassigned. +const o2 = { foo: 'baz' }; + +// Can still mutate the object +o2.foo = 'Something different, yet again'; + +// Cannot reassign the variable +// o2 = { message: 'I will cause an error if you uncomment me' }; // Error! + + +// CASE 3: The object is immutable but the variable can be reassigned. +let o3 = Object.freeze({ foo: "Can't mutate me" }); + +// Cannot mutate the object +// o3.foo = 'Come on, uncomment me. I dare ya!'; // Error! + +// Can still reassign the variable +o3 = { message: "I'm some other object, and I'm even mutable -- so take that!" }; + + +// CASE 4: The object is immutable and the variable cannot be reassigned. This is what we want!!!!!!!! +const o4 = Object.freeze({ foo: 'never going to change me' }); + +// Cannot mutate the object +// o4.foo = 'talk to the hand' // Error! + +// Cannot reassign the variable +// o4 = { message: "ain't gonna happen, sorry" }; // Error +``` + + +[view raw][20][immutability-vs-reassignment.js][21] hosted with ❤ by [GitHub][22] + +Immutability pertains to all data structures, which includes arrays, maps, and sets. That means that we cannot call mutator methods such as **array.prototype.push** because that modifies the existing array. Instead of pushing an item onto the existing array, we can create a new array with all the same items as the original array, plus the one additional item. In fact, every mutator method can be replaced by a function that returns a new array with the desired changes. + +``` +'use strict'; + +const a = Object.freeze([4, 5, 6]); + +// Instead of: a.push(7, 8, 9); +const b = a.concat(7, 8, 9); + +// Instead of: a.pop(); +const c = a.slice(0, -1); + +// Instead of: a.unshift(1, 2, 3); +const d = [1, 2, 3].concat(a); + +// Instead of: a.shift(); +const e = a.slice(1); + +// Instead of: a.sort(myCompareFunction); +const f = R.sort(myCompareFunction, a); // R = Ramda + +// Instead of: a.reverse(); +const g = R.reverse(a); // R = Ramda + +// Exercise for the reader: +// copyWithin +// fill +// splice +``` + + +[view raw][23][array-mutator-method-replacement.js][24] hosted with ❤ by [GitHub][25] + +The same thing goes when using a [**Map**][84] or a [**Set**][85]. We can avoid mutator methods by returning a new **Map** or **Set** with the desired changes. + +``` +const map = new Map([ + [1, 'one'], + [2, 'two'], + [3, 'three'] +]); + +// Instead of: map.set(4, 'four'); +const map2 = new Map([...map, [4, 'four']]); + +// Instead of: map.delete(1); +const map3 = new Map([...map].filter(([key]) => key !== 1)); + +// Instead of: map.clear(); +const map4 = new Map(); +``` + + +[view raw][26][map-mutator-method-replacement.js][27] hosted with ❤ by [GitHub][28] + +``` +const set = new Set(['A', 'B', 'C']); + +// Instead of: set.add('D'); +const set2 = new Set([...set, 'D']); + +// Instead of: set.delete('B'); +const set3 = new Set([...set].filter(key => key !== 'B')); + +// Instead of: set.clear(); +const set4 = new Set(); +``` + + +[view raw][29][set-mutator-method-replacement.js][30] hosted with ❤ by [GitHub][31] + +I would like to add that if you are using TypeScript (I am a huge fan of TypeScript), then you can use the **Readonly**, **ReadonlyArray**, **ReadonlyMap**, and **ReadonlySet** interfaces to get a compile-time error if you attempt to mutate any of those objects. If you call **Object.freeze** on an object literal or an array, then the compiler will automatically infer that it is read-only. Because of how Maps and Sets are represented internally, calling **Object.freeze** on those data structures does not work the same. But it's easy enough to tell the compiler that you would like them to be read-only. + +### [typescript-readonly.png][32] + +![TypeScript Readonly Interfaces](https://opensource.com/sites/default/files/u128651/typescript-readonly.png "TypeScript Readonly Interfaces") + + +TypeScript read-only interfaces + +Okay, so we can create new objects instead of mutating existing ones, but won't that adversely affect performance? Yes, it can. Be sure to do performance testing in your own app. If you need a performance boost, then consider using [Immutable.js][86]. Immutable.js implements [Lists][87], [Stacks][88], [Maps][89], [Sets][90], and other data structures using [persistent data structures][91]. This is the same technique used internally by functional programming languages such as Clojure and Scala. + +``` +// Use in place of `[]`. +const list1 = Immutable.List(['A', 'B', 'C']); +const list2 = list1.push('D', 'E'); + +console.log([...list1]); // ['A', 'B', 'C'] +console.log([...list2]); // ['A', 'B', 'C', 'D', 'E'] + + +// Use in place of `new Map()` +const map1 = Immutable.Map([ + ['one', 1], + ['two', 2], + ['three', 3] +]); +const map2 = map1.set('four', 4); + +console.log([...map1]); // [['one', 1], ['two', 2], ['three', 3]] +console.log([...map2]); // [['one', 1], ['two', 2], ['three', 3], ['four', 4]] + + +// Use in place of `new Set()` +const set1 = Immutable.Set([1, 2, 3, 3, 3, 3, 3, 4]); +const set2 = set1.add(5); + +console.log([...set1]); // [1, 2, 3, 4] +console.log([...set2]); // [1, 2, 3, 4, 5] +``` + +[view raw][33][immutable-js-demo.js][34] hosted with ❤ by [GitHub][35] + +### Function composition + +Remember back in high school when you learned something that looked like **(f ∘ g)(x)**? Remember thinking, "When am I ever going to use this?" Well, now you are. Ready? **f ∘ g** is read "**f composed with g**." There are two equivalent ways of thinking of it, as illustrated by this identity: **(f ∘ g)(x) = f(g(x))**. You can either think of **f ∘ g** as a single function or as the result of calling function **g** and then taking its output and passing that to **f**. Notice that the functions get applied from right to left—that is, we execute **g**, followed by **f**. + +A couple of important points about function composition: + +1. We can compose any number of functions (we're not limited to two). + +2. One way to compose functions is simply to take the output from one function and pass it to the next (i.e., **f(g(x))**). + +``` +// h(x) = x + 1 +// number -> number +function h(x) { + return x + 1; +} + +// g(x) = x^2 +// number -> number +function g(x) { + return x * x; +} + +// f(x) = convert x to string +// number -> string +function f(x) { + return x.toString(); +} + +// y = (f ∘ g ∘ h)(1) +const y = f(g(h(1))); +console.log(y); // '4' +``` + +[view raw][36][function-composition-basic.js][37] hosted with ❤ by [GitHub][38] + +There are libraries such as [Ramda][92] and [lodash][93] that provide a more elegant way of composing functions. Instead of simply passing the return value from one function to the next, we can treat function composition in the more mathematical sense. We can create a single composite function made up from the others (i.e., **(f ∘ g)(x)**). + +``` +// h(x) = x + 1 +// number -> number +function h(x) { + return x + 1; +} + +// g(x) = x^2 +// number -> number +function g(x) { + return x * x; +} + +// f(x) = convert x to string +// number -> string +function f(x) { + return x.toString(); +} + +// R = Ramda +// composite = (f ∘ g ∘ h) +const composite = R.compose(f, g, h); + +// Execute single function to get the result. +const y = composite(1); +console.log(y); // '4' +``` + +[view raw][39][function-composition-elegant.js][40] hosted with ❤ by [GitHub][41] + +Okay, so we can do function composition in JavaScript. What's the big deal? Well, if you're really onboard with functional programming, then ideally your entire program will be nothing but function composition. There will be no loops (**for**, **for...of**, **for...in**, **while**, **do**) in your code. None (period). But that's impossible, you say! Not so. That leads us to the next two topics: recursion and higher-order functions. + +### Recursion + +Let's say that you would like to implement a function that computes the factorial of a number. Let's recall the definition of factorial from mathematics: + +**n! = n * (n-1) * (n-2) * ... * 1**. + +That is, **n!** is the product of all the integers from **n** down to **1**. We can write a loop that computes that for us easily enough. + +``` +function iterativeFactorial(n) { + let product = 1; + for (let i = 1; i <= n; i++) { + product *= i; + } + return product; +} +``` + + +[view raw][42][iterative-factorial.js][43] hosted with ❤ by [GitHub][44] + +Notice that both **product** and **i** are repeatedly being reassigned inside the loop. This is a standard procedural approach to solving the problem. How would we solve it using a functional approach? We would need to eliminate the loop and make sure we have no variables being reassigned. Recursion is one of the most powerful tools in the functional programmer's toolbelt. Recursion asks us to break down the overall problem into sub-problems that resemble the overall problem. + +Computing the factorial is a perfect example. To compute **n!**, we simply need to take **n** and multiply it by all the smaller integers. That's the same thing as saying:  + +**n! = n * (n-1)!**  + +A-ha! We found a sub-problem to solve **(n-1)!** and it resembles the overall problem **n!**. There's one more thing to take care of: the base case. The base case tells us when to stop the recursion. If we didn't have a base case, then recursion would go on forever. In practice, you'll get a stack overflow error if there are too many recursive calls. + +What is the base case for the factorial function? At first you might think that it's when **n == 1**, but due to some [complex math stuff][94], it's when **n == 0**. **0!** is defined to be **1**. With this information in mind, let's write a recursive factorial function. + +``` +function recursiveFactorial(n) { + // Base case -- stop the recursion + if (n === 0) { + return 1; // 0! is defined to be 1. + } + return n * recursiveFactorial(n - 1); +} +``` + + +[view raw][45][recursive-factorial.js][46] hosted with ❤ by [GitHub][47] + +Okay, so let's compute **recursiveFactorial(20000)**, because... well, why not! When we do, we get this: + +### [stack-overflow.png][48] + +![Stack overflow error](https://opensource.com/sites/default/files/u128651/stack-overflow.png "Stack overflow error") + +Stack overflow error + +So what's going on here? We got a stack overflow error! It's not because of infinite recursion. We know that we handled the base case (i.e., **n === 0**). It's because the browser has a finite stack and we have exceeded it. Each call to **recursiveFactorial** causes a new frame to be put on the stack. We can visualize the stack as a set of boxes stacked on top of each other. Each time **recursiveFactorial** gets called, a new box is added to the top. The following diagram shows a stylized version of what the stack might look like when computing **recursiveFactorial(3)**. Note that in a real stack, the frame on top would store the memory address of where it should return after executing, but I have chosen to depict the return value using the variable **r**. I did this because JavaScript developers don't normally need to think about memory addresses. + +### [stack-frames.png][49] + +![The stack for recursively calculating 3! (three factorial)](https://opensource.com/sites/default/files/u128651/stack-frames.png "The stack for recursively calculating 3! (three factorial)") + +The stack for recursively calculating 3! (three factorial) + +You can imagine that the stack for **n = 20000** would be much higher. Is there anything we can do about that? It turns out that, yes, there is something we can do about it. As part of the **ES2015** (aka **ES6**) specification, an optimization was added to address this issue. It's called the  _proper tail calls optimization_  (PTC). It allows the browser to elide, or omit, stack frames if the last thing that the recursive function does is call itself and return the result. Actually, the optimization works for mutually recursive functions as well, but for simplicity we're just going to focus on a single recursive function. + +You'll notice in the stack above that after the recursive function call, there is still an additional computation to be made (i.e., **n * r**). That means that the browser cannot optimize it using PTC; however, we can rewrite the function in such a way so that the last step is the recursive call. One trick to doing that is to pass the intermediate result (in this case the **product**) into the function as an argument. + +``` +'use strict'; + +// Optimized for tail call optimization. +function factorial(n, product = 1) { + if (n === 0) { + return product; + } + return factorial(n - 1, product * n) +} +``` + + +[view raw][50][factorial-tail-recursion.js][51] hosted with ❤ by [GitHub][52] + +Let's visualize the optimized stack now when computing **factorial(3)**. As the following diagram shows, in this case the stack never grows beyond two frames. The reason is that we are passing all necessary information (i.e., the **product**) into the recursive function. So, after the **product** has been updated, the browser can throw out that stack frame. You'll notice in this diagram that each time the top frame falls down and becomes the bottom frame, the previous bottom frame gets thrown out. It's no longer needed. + +### [optimized-stack-frames.png][53] + +![The optimized stack for recursively calculating 3! (three factorial) using PTC](https://opensource.com/sites/default/files/u128651/optimized-stack-frames.png "The optimized stack for recursively calculating 3! (three factorial) using PTC") + +The optimized stack for recursively calculating 3! (three factorial) using PTC + +Now run that in a browser of your choice, and assuming that you ran it in Safari, then you will get the answer, which is **Infinity** (it's a number higher than the maximum representable number in JavaScript). But we didn't get a stack overflow error, so that's good! Now what about all the other browsers? It turns out that Safari is the only browser that has implemented PTC, and it might be the only browser to ever implement it. See the following compatibility table: + +### [ptc-compatibility.png][54] + +![PTC compatibility](https://opensource.com/sites/default/files/u128651/ptc-compatibility.png "PTC compatibility") + +PTC compatibility + +Other browsers have put forth a competing standard called [syntactic tail calls][95](STC). "Syntactic" means that you will have to specify via new syntax that you would like the function to participate in the tail-call optimization. Even though there is not widespread browser support yet, it's still a good idea to write your recursive functions so that they are ready for tail-call optimization whenever (and however) it comes. + +### Higher-order functions + +We already know that JavaScript has first-class functions that can be passed around just like any other value. So, it should come as no surprise that we can pass a function to another function. We can also return a function from a function. Voilà! We have higher-order functions. You're probably already familiar with several higher order functions that exist on the **Array.prototype**. For example, **filter**, **map**, and **reduce**, among others. One way to think of a higher-order function is: It's a function that accepts (what's typically called) a callback function. Let's see an example of using built-in higher-order functions: + +``` +const vehicles = [ + { make: 'Honda', model: 'CR-V', type: 'suv', price: 24045 }, + { make: 'Honda', model: 'Accord', type: 'sedan', price: 22455 }, + { make: 'Mazda', model: 'Mazda 6', type: 'sedan', price: 24195 }, + { make: 'Mazda', model: 'CX-9', type: 'suv', price: 31520 }, + { make: 'Toyota', model: '4Runner', type: 'suv', price: 34210 }, + { make: 'Toyota', model: 'Sequoia', type: 'suv', price: 45560 }, + { make: 'Toyota', model: 'Tacoma', type: 'truck', price: 24320 }, + { make: 'Ford', model: 'F-150', type: 'truck', price: 27110 }, + { make: 'Ford', model: 'Fusion', type: 'sedan', price: 22120 }, + { make: 'Ford', model: 'Explorer', type: 'suv', price: 31660 } +]; + +const averageSUVPrice = vehicles + .filter(v => v.type === 'suv') + .map(v => v.price) + .reduce((sum, price, i, array) => sum + price / array.length, 0); + +console.log(averageSUVPrice); // 33399 +``` + + +[view raw][55][built-in-higher-order-functions.js][56] hosted with ❤ by [GitHub][57] + +Notice that we are calling methods on an array object, which is characteristic of object-oriented programming. If we wanted to make this a bit more representative of functional programming, we could use functions provided by Ramda or lodash/fp instead. We can also use function composition, which we explored in a previous section. Note that we would need to reverse the order of the functions if we use **R.compose**, since it applies the functions right to left (i.e., bottom to top); however, if we want to apply them left to right (i.e., top to bottom), as in the example above, then we can use **R.pipe**. Both examples are given below using Ramda. Note that Ramda has a **mean** function that can be used instead of **reduce**. + +``` +const vehicles = [ + { make: 'Honda', model: 'CR-V', type: 'suv', price: 24045 }, + { make: 'Honda', model: 'Accord', type: 'sedan', price: 22455 }, + { make: 'Mazda', model: 'Mazda 6', type: 'sedan', price: 24195 }, + { make: 'Mazda', model: 'CX-9', type: 'suv', price: 31520 }, + { make: 'Toyota', model: '4Runner', type: 'suv', price: 34210 }, + { make: 'Toyota', model: 'Sequoia', type: 'suv', price: 45560 }, + { make: 'Toyota', model: 'Tacoma', type: 'truck', price: 24320 }, + { make: 'Ford', model: 'F-150', type: 'truck', price: 27110 }, + { make: 'Ford', model: 'Fusion', type: 'sedan', price: 22120 }, + { make: 'Ford', model: 'Explorer', type: 'suv', price: 31660 } +]; + +// Using `pipe` executes the functions from top-to-bottom. +const averageSUVPrice1 = R.pipe( + R.filter(v => v.type === 'suv'), + R.map(v => v.price), + R.mean +)(vehicles); + +console.log(averageSUVPrice1); // 33399 + +// Using `compose` executes the functions from bottom-to-top. +const averageSUVPrice2 = R.compose( + R.mean, + R.map(v => v.price), + R.filter(v => v.type === 'suv') +)(vehicles); + +console.log(averageSUVPrice2); // 33399 +``` + + +[view raw][58][composing-higher-order-functions.js][59] hosted with ❤ by [GitHub][60] + +The advantage of the functional programming approach is that it clearly separates the data (i.e., **vehicles**) from the logic (i.e., the functions **filter**, **map**, and **reduce**). Contrast that with the object-oriented code that blends data and functions in the form of objects with methods. + +### Currying + +Informally, **currying** is the process of taking a function that accepts **n** arguments and turning it into **n** functions that each accepts a single argument. The **arity** of a function is the number of arguments that it accepts. A function that accepts a single argument is **unary**, two arguments **binary**, three arguments **ternary**, and **n** arguments is **n-ary**. Therefore, we can define currying as the process of taking an **n-ary** function and turning it into **n** unary functions. Let's start with a simple example, a function that takes the dot product of two vectors. Recall from linear algebra that the dot product of two vectors **[a, b, c]** and **[x, y, z]** is equal to **ax + by + cz**. + +``` +function dot(vector1, vector2) { + return vector1.reduce((sum, element, index) => sum += element * vector2[index], 0); +} + +const v1 = [1, 3, -5]; +const v2 = [4, -2, -1]; + +console.log(dot(v1, v2)); // 1(4) + 3(-2) + (-5)(-1) = 4 - 6 + 5 = 3 +``` + + +[view raw][61][dot-product.js][62] hosted with ❤ by [GitHub][63] + +The **dot** function is binary since it accepts two arguments; however, we can manually convert it into two unary functions, as the following code example shows. Notice how **curriedDot** is a unary function that accepts a vector and returns another unary function that then accepts the second vector. + +``` +function curriedDot(vector1) { + return function(vector2) { + return vector1.reduce((sum, element, index) => sum += element * vector2[index], 0); + } +} + +// Taking the dot product of any vector with [1, 1, 1] +// is equivalent to summing up the elements of the other vector. +const sumElements = curriedDot([1, 1, 1]); + +console.log(sumElements([1, 3, -5])); // -1 +console.log(sumElements([4, -2, -1])); // 1 +``` + + +[view raw][64][manual-currying.js][65] hosted with ❤ by [GitHub][66] + +Fortunately for us, we don't have to manually convert each one of our functions to a curried form. Libraries including [Ramda][96] and [lodash][97] have functions that will do it for us. In fact, they do a hybrid type of currying, where you can either call the function one argument at a time, or you can continue to pass in all the arguments at once, just like the original. + +``` +function dot(vector1, vector2) { + return vector1.reduce((sum, element, index) => sum += element * vector2[index], 0); +} + +const v1 = [1, 3, -5]; +const v2 = [4, -2, -1]; + +// Use Ramda to do the currying for us! +const curriedDot = R.curry(dot); + +const sumElements = curriedDot([1, 1, 1]); + +console.log(sumElements(v1)); // -1 +console.log(sumElements(v2)); // 1 + +// This works! You can still call the curried function with two arguments. +console.log(curriedDot(v1, v2)); // 3 +``` + +[view raw][67][fancy-currying.js][68] hosted with ❤ by [GitHub][69] + +Both Ramda and lodash also allow you to "skip over" an argument and specify it later. They do this using a placeholder. Because taking the dot product is commutative, it won't make a difference in which order we passed the vectors into the function. Let's use a different example to illustrate using a placeholder. Ramda uses a double underscore as its placeholder. + +``` +const giveMe3 = R.curry(function(item1, item2, item3) { + return ` + 1: ${item1} + 2: ${item2} + 3: ${item3} + `; +}); + +const giveMe2 = giveMe3(R.__, R.__, 'French Hens'); // Specify the third argument. +const giveMe1 = giveMe2('Partridge in a Pear Tree'); // This will go in the first slot. +const result = giveMe1('Turtle Doves'); // Finally fill in the second argument. + +console.log(result); +// 1: Partridge in a Pear Tree +// 2: Turtle Doves +// 3: French Hens +``` + +[view raw][70][currying-placeholder.js][71] hosted with ❤ by [GitHub][72] + +One final point before we complete the topic of currying, and that is partial application. Partial application and currying often go hand in hand, though they really are separate concepts. A curried function is still a curried function even if it hasn't been given any arguments. Partial application, on the other hand, is when a function has been given some, but not all, of its arguments. Currying is often used to do partial application, but it's not the only way. + +The JavaScript language has a built-in mechanism for doing partial application without currying. This is done using the [**function.prototype.bind**][98] method. One idiosyncrasy of this method is that it requires you to pass in the value of **this** as the first argument. If you're not doing object-oriented programming, then you can effectively ignore **this** by passing in **null**. + +``` +function giveMe3(item1, item2, item3) { + return ` + 1: ${item1} + 2: ${item2} + 3: ${item3} + `; +} + +const giveMe2 = giveMe3.bind(null, 'rock'); +const giveMe1 = giveMe2.bind(null, 'paper'); +const result = giveMe1('scissors'); + +console.log(result); +// 1: rock +// 2: paper +// 3: scissors +``` + + +[view raw][73][partial-application-using-bind.js][74] hosted with ❤ by [GitHub][75] + +### Wrapping up + +I hope you enjoyed exploring functional programming in JavaScript with me! For some it may be a completely new programming paradigm, but I hope you will give it a chance. I think you'll find that your programs are easier to read and debug. Immutability will also allow you to take advantage of performance optimizations in Angular and React. + + _This article is based on Matt's OpenWest talk, [JavaScript the Good-er Parts][77]. [OpenWest][78] will be held July 12-15, 2017 in Salt Lake City, Utah._ + +-------------------------------------------------------------------------------- + +作者简介: + +Matt Banz - Matt graduated from the University of Utah with a degree in mathematics in May of 2008. One month later he landed a job as a web developer, and he's been loving it ever since! In 2013, he earned a Master of Computer Science degree from North Carolina State University. He has taught courses in web development for LDS Business College and the Davis School District Community Education program. He is currently a Senior Front-End Developer for Motorola Solutions. + +-------------- + +via: https://opensource.com/article/17/6/functional-javascript + +作者:[Matt Banz ][a] +译者:[译者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/battmanz +[1]:https://opensource.com/tags/python?src=programming_resource_menu1 +[2]:https://opensource.com/tags/javascript?src=programming_resource_menu2 +[3]:https://opensource.com/tags/perl?src=programming_resource_menu3 +[4]:https://developers.redhat.com/?intcmp=7016000000127cYAAQ&src=programming_resource_menu4 +[5]:https://gist.github.com/battmanz/62fa0a78841aa0fe29d99e80ba8db2b1/raw/fd586c5da7c936235a6d99b11cb80c9c67e4deaf/pure-function-example.js +[6]:https://gist.github.com/battmanz/62fa0a78841aa0fe29d99e80ba8db2b1#file-pure-function-example-js +[7]:https://github.com/ +[8]:https://gist.github.com/battmanz/459c13138ea8e333fc6603ae688b7992/raw/ceda8a5c36c5bde69d4000b6ecb8fee98c9edcd3/impure-functions.js +[9]:https://gist.github.com/battmanz/459c13138ea8e333fc6603ae688b7992#file-impure-functions-js +[10]:https://github.com/ +[11]:https://gist.github.com/battmanz/bc13c4cf24b380cbd7b3f7b0c12ab8e4/raw/e2b6365e79def9b80bd7652cf15078d613ed686f/mutable-state.js +[12]:https://gist.github.com/battmanz/bc13c4cf24b380cbd7b3f7b0c12ab8e4#file-mutable-state-js +[13]:https://github.com/ +[14]:https://gist.github.com/battmanz/b65416550d62da94a69eea51c2678983/raw/6792dd568e0fc3e6b372d078735d5b74857dbae4/immutable-state.js +[15]:https://gist.github.com/battmanz/b65416550d62da94a69eea51c2678983#file-immutable-state-js +[16]:https://github.com/ +[17]:https://gist.github.com/battmanz/d32f2be485f4224121019ba4d070c25b/raw/f7318904effbef28e3a47989d4899ab019127c05/captured-mutable-object.js +[18]:https://gist.github.com/battmanz/d32f2be485f4224121019ba4d070c25b#file-captured-mutable-object-js +[19]:https://github.com/ +[20]:https://gist.github.com/battmanz/c5046c2d0af45938190e1178ab9cb007/raw/6cfd1b9644486f257357e611b2eeb148b3956baf/immutability-vs-reassignment.js +[21]:https://gist.github.com/battmanz/c5046c2d0af45938190e1178ab9cb007#file-immutability-vs-reassignment-js +[22]:https://github.com/ +[23]:https://gist.github.com/battmanz/a400ad93d9922fdc3a2ff87c0bf7da68/raw/6771481278c95942b4627a709c377f62856a0a3a/array-mutator-method-replacement.js +[24]:https://gist.github.com/battmanz/a400ad93d9922fdc3a2ff87c0bf7da68#file-array-mutator-method-replacement-js +[25]:https://github.com/ +[26]:https://gist.github.com/battmanz/9ffbac3c18c6cf33d97a4ad511129e94/raw/433f65ebe3d2a7fda7ac1f434c2d56ad98a04ce0/map-mutator-method-replacement.js +[27]:https://gist.github.com/battmanz/9ffbac3c18c6cf33d97a4ad511129e94#file-map-mutator-method-replacement-js +[28]:https://github.com/ +[29]:https://gist.github.com/battmanz/d42d3224c99d76d780f68daaa6a87338/raw/111578801a4120726a369a43f87d33a64b39dc83/set-mutator-method-replacement.js +[30]:https://gist.github.com/battmanz/d42d3224c99d76d780f68daaa6a87338#file-set-mutator-method-replacement-js +[31]:https://github.com/ +[32]:https://opensource.com/file/357111 +[33]:https://gist.github.com/battmanz/7cec8c2f22ee55f60dd0c478236892de/raw/2cad9d5441ebef816e3d1cbc03af883451e68dc3/immutable-js-demo.js +[34]:https://gist.github.com/battmanz/7cec8c2f22ee55f60dd0c478236892de#file-immutable-js-demo-js +[35]:https://github.com/ +[36]:https://gist.github.com/battmanz/99325b35a147c37b20f5652785430381/raw/28a6dc814aaf7d023cebefb6d7f694d76f99f9da/function-composition-basic.js +[37]:https://gist.github.com/battmanz/99325b35a147c37b20f5652785430381#file-function-composition-basic-js +[38]:https://github.com/ +[39]:https://gist.github.com/battmanz/e250ae6c628550f6f0ac718d046ea74e/raw/a0c22d4a1afaf68c6297df3de4736c62e58cb028/function-composition-elegant.js +[40]:https://gist.github.com/battmanz/e250ae6c628550f6f0ac718d046ea74e#file-function-composition-elegant-js +[41]:https://github.com/ +[42]:https://gist.github.com/battmanz/bc225959e1328e73b08c1fe4ab59b630/raw/648090bc2d40f4fc6e137f7426b803337c5fa3bb/iterative-factorial.js +[43]:https://gist.github.com/battmanz/bc225959e1328e73b08c1fe4ab59b630#file-iterative-factorial-js +[44]:https://github.com/ +[45]:https://gist.github.com/battmanz/63961ad6fa380463785b69a1b34e7997/raw/550f6922ecc5adc21ab38f281a788e286abc107a/recursive-factorial.js +[46]:https://gist.github.com/battmanz/63961ad6fa380463785b69a1b34e7997#file-recursive-factorial-js +[47]:https://github.com/ +[48]:https://opensource.com/file/357126 +[49]:https://opensource.com/file/357131 +[50]:https://gist.github.com/battmanz/26ecb25247a01030ca4ab0cd1ebfc5b3/raw/e3aaa078b9d262dcd35e534145cba0f52b5d5d67/factorial-tail-recursion.js +[51]:https://gist.github.com/battmanz/26ecb25247a01030ca4ab0cd1ebfc5b3#file-factorial-tail-recursion-js +[52]:https://github.com/ +[53]:https://opensource.com/file/357116 +[54]:https://opensource.com/file/357121 +[55]:https://gist.github.com/battmanz/9eda50362457362f2d8a28384bf1adfc/raw/bb7252ef116d5a2ae430e68c6b5650d1dd6f44a4/built-in-higher-order-functions.js +[56]:https://gist.github.com/battmanz/9eda50362457362f2d8a28384bf1adfc#file-built-in-higher-order-functions-js +[57]:https://github.com/ +[58]:https://gist.github.com/battmanz/bee10f02a076f064f72e20cd4aea6b85/raw/bd3de649887d515f4166290802d4a3d89f80210c/composing-higher-order-functions.js +[59]:https://gist.github.com/battmanz/bee10f02a076f064f72e20cd4aea6b85#file-composing-higher-order-functions-js +[60]:https://github.com/ +[61]:https://gist.github.com/battmanz/e28311f765a18fc6a841201912422d60/raw/e3e5489652e1f4815bf810f98b4aba6f5ec934e6/dot-product.js +[62]:https://gist.github.com/battmanz/e28311f765a18fc6a841201912422d60#file-dot-product-js +[63]:https://github.com/ +[64]:https://gist.github.com/battmanz/3a3694f87b9c48ac0752e8fe3e3a0b8d/raw/c886e5ea1fd7b6e4a130925634c1d1d6f8ffc689/manual-currying.js +[65]:https://gist.github.com/battmanz/3a3694f87b9c48ac0752e8fe3e3a0b8d#file-manual-currying-js +[66]:https://github.com/ +[67]:https://gist.github.com/battmanz/3335a949ea88b8d969c359774b76ee35/raw/99a2997e4609e9ca294d7b58e330f2cf6dbaefcb/fancy-currying.js +[68]:https://gist.github.com/battmanz/3335a949ea88b8d969c359774b76ee35#file-fancy-currying-js +[69]:https://github.com/ +[70]:https://gist.github.com/battmanz/ea5e1f34cf468214039557c78e43a9b5/raw/9b6556bd9111efd03dd69bee5596c29002e2279a/currying-placeholder.js +[71]:https://gist.github.com/battmanz/ea5e1f34cf468214039557c78e43a9b5#file-currying-placeholder-js +[72]:https://github.com/ +[73]:https://gist.github.com/battmanz/dadae797f9d3cfcce85af0aecfd6f6e3/raw/3d248b9810cab7d02ecd050ec549247499de6f31/partial-application-using-bind.js +[74]:https://gist.github.com/battmanz/dadae797f9d3cfcce85af0aecfd6f6e3#file-partial-application-using-bind-js +[75]:https://github.com/ +[76]:https://opensource.com/article/17/6/functional-javascript?rate=rGE6lsdTzq9H9vSv4jiF7pTN9hYG5Ehm_GsfSJbJsDM +[77]:https://www.openwest.org/schedule/#talk-5 +[78]:https://www.openwest.org/ +[79]:https://opensource.com/user/146401/feed +[80]:https://www.flickr.com/photos/jurvetson/882193732/ +[81]:https://brendaneich.com/2008/04/popularity/ +[82]:https://angular-2-training-book.rangle.io/handout/change-detection/change_detection_strategy_onpush.html +[83]:https://facebook.github.io/react/docs/optimizing-performance.html#the-power-of-not-mutating-data +[84]:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map +[85]:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set +[86]:https://facebook.github.io/immutable-js/ +[87]:https://facebook.github.io/immutable-js/docs/#/List +[88]:https://facebook.github.io/immutable-js/docs/#/Stack +[89]:https://facebook.github.io/immutable-js/docs/#/Map +[90]:https://facebook.github.io/immutable-js/docs/#/Set +[91]:https://en.wikipedia.org/wiki/Persistent_data_structure +[92]:http://ramdajs.com/ +[93]:https://github.com/lodash/lodash/wiki/FP-Guide +[94]:https://math.stackexchange.com/questions/20969/prove-0-1-from-first-principles +[95]:https://github.com/tc39/proposal-ptc-syntax#syntactic-tail-calls-stc +[96]:http://ramdajs.com/docs/#curry +[97]:https://lodash.com/docs/4.17.4#curry +[98]:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind +[99]:https://opensource.com/users/battmanz From 191e01cfd9f4402855cde08d455d281b034aa805 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 3 Jul 2017 11:36:52 +0800 Subject: [PATCH 023/100] =?UTF-8?q?20170704-6=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... around video and subtitle embed errors.md | 107 ++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 sources/tech/20170303 How to work around video and subtitle embed errors.md diff --git a/sources/tech/20170303 How to work around video and subtitle embed errors.md b/sources/tech/20170303 How to work around video and subtitle embed errors.md new file mode 100644 index 0000000000..7f39a3ffb6 --- /dev/null +++ b/sources/tech/20170303 How to work around video and subtitle embed errors.md @@ -0,0 +1,107 @@ +# How to work around video and subtitle embed errors + + +This is going to be a slightly weird tutorial. The background story is as follows. Recently, I created a bunch of [sweet][1] [parody][2] [clips][3] of the [Risitas y las paelleras][4] sketch, famous for its insane laughter by the protagonist, Risitas. As always, I had them uploaded to Youtube, but from the moment I decided on what subtitles to use to the moment when the videos finally became available online, there was a long and twisty journey. + +In this guide, I would like to present several typical issues that you may encounter when creating your own media, mostly with subtitles and the subsequent upload to media sharing portals, specifically Youtube, and how you can work around those. After me. + +### The background story + +My software of choice for video editing is Kdenlive, which I started using when I created the most silly [Frankenstein][5] clip, and it's been my loyal companion ever since. Normally, I render files to WebM container, with VP8 video codec and Vorbis audio codec, because that's what Google likes. Indeed, I had no issues with the roughly 40 different clips I uploaded in the last seven odd years. + +![Kdenlive, create project](http://www.dedoimedo.com/images/computers-years/2016-2/vlc-subs-errors-kdenlive-create-project.jpg) + +![Kdenlive, render](http://www.dedoimedo.com/images/computers-years/2016-2/vlc-subs-errors-kdenlive-render.png) + +However, after I completed my Risitas & Linux project, I was in a bit of a predicament. The video file and the subtitle file were still two separate entities, and I needed somehow to put them together. My original article for subtitles work mentions Avidemux and Handbrake, and both these are valid options. + +However, I was not too happy with the output generated by either one of these, and for a variety of reasons, something was ever so slightly off. Avidemux did not handle the video codecs well, whereas Handbrake omitted a couple of lines of subtitle text from the final product, and the font was ugly. Solvable, but not the topic for today. + +Therefore, I decided to use VideoLAN (VLC) to embed subtitles onto the video. There are several ways to do this. You can use the Media > Convert/Save option, but this one does not have everything we need. Instead, you should use Media > Stream, which comes with a more fully fledged wizard, and it also offers an editable summary of the transcoding options, which we DO need - see my [tutorial][6] on subtitles for this please. + +### Errors! + +The process of embedding subtitles is not trivial. You will most likely encounter several problems along the way. This guide should help you work around these so you can focus on your work and not waste time debugging weird software errors. Anyhow, here's a small but probable collection of issues you will face while working with subtitles in VLC. Trial & error, but also nerdy design. + +### No playable streams + +You have probably chosen weird output settings. You might want to double check you have selected the right video and audio codecs. Also, remember that some media players may not have all the codecs. Also, make sure you test on the system you want these clips to play. + +![No playable streams](http://www.dedoimedo.com/images/computers-years/2016-2/vlc-subs-errors-no-playable-streams.png) + +### Subtitles overlaid twice + +This can happen if you check the box that reads Use a subtitle file in the first step of the streaming media wizard. Just select the file you need and click Stream. Leave the box unchecked. + +![Select file](http://www.dedoimedo.com/images/computers-years/2016-2/vlc-subs-select.png) + +### No subtitle output is generated + +This can happen for two main reasons. One, you have selected the wrong encapsulation format. Do make sure the subtitles are marked correctly on the profile page when you edit it before proceeding. If the format does not support subtitles, it might not work. + +![Encapsulation](http://www.dedoimedo.com/images/computers-years/2016-2/vlc-subs-encap.png) + +Two, you may have left the subtitle codec render enabled in the final output. You do not need this. You only need to overlay the subtitles onto the video clip. Please check the generated stream output string and delete an option that reads scodec= before you click the Stream button. + +![Remove text from output string](http://www.dedoimedo.com/images/computers-years/2016-2/vlc-subs-remove-text.png) + +### Missing codecs + workaround + +This is a common [bug][7] due to how experimental codecs are implemented, and you will most likely see it if you choose the following profile: Video - H.264 + AAC (MP4). The file will be rendered, and if you selected subtitles, they will be overlaid, too, but without any audio. However, we can fix this with a hack. + +![AAC codec](http://www.dedoimedo.com/images/computers-years/2016-2/vlc-subs-errors-aac-codec.png) + +![MP4A error](http://www.dedoimedo.com/images/computers-years/2016-2/vlc-subs-errors-mp4a.png) + +One possible hack is to start VLC from command line with the --sout-ffmpeg-strict=-2 option (might work). The other and more sureway workaround is to take the audio-less video but with the subtitles overlayed and re-render it through Kdenlive with the original project video render without subtitles as an audio source. Sounds complicated, so in detail: + +* Move existing clips (containing audio) from video to audio. Delete the rest. + +* Alternatively, use rendered WebM file as your audio source. + +* Add new clip - the one we created with embedded subtitles AND no audio. + +* Place the clip as new video. + +* Render as WebM again. + +![Repeat render](http://www.dedoimedo.com/images/computers-years/2016-2/vlc-subs-errors-kdenlive-repeat-render.jpg) + +Using other types of audio codecs will most likely work (e.g. MP3), and you will have a complete project with video, audio and subtitles. If you're happy that nothing is missing, you can now upload to Youtube. But then ... + +### Youtube video manager & unknown format + +If you're trying to upload a non-WebM clip (say MP4), you might get an unspecified error that your clip does not meet the media format requirements. I was not sure why VLC generated a non-Youtube-compliant file. However, again, the fix is easy. Use Kdenlive to recreate the video, and this should result in a file that has all the right meta fields and whatnot that Youtube likes. Back to my original story and the 40-odd clips created through Kdenlive this way. + +P.S. If your clip has valid audio, then just re-run it through Kdenlive. If it does not, do the video/audio trick from before. Mute clips as necessary. In the end, this is just like overlay, except you're using the video source from one clip and audio from another for the final render. Job done. + +### More reading + +I do not wish to repeat myself or spam unnecessarily with links. I have loads of clips on VLC in the Software & Security section, so you might want to consult those. The earlier mentioned article on VLC & Subtitles has links to about half a dozen related tutorials, covering additional topics like streaming, logging, video rotation, remote file access, and more. I'm sure you can work the search engine like pros. + +### Conclusion + +I hope you find this guide helpful. It covers a lot, and I tried to make it linear and simple and address as many pitfalls entrepreneuring streamers and subtitle lovers may face when working with VLC. It's all about containers and codecs, but also the fact there are virtually no standards in the media world, and when you go from one format to another, sometimes you may encounter corner cases. + +If you do hit an error or three, the tips and tricks here should help you solve at least some of them, including unplayable streams, missing or duplicate subtitles, missing codecs and the wicked Kdenlive workaround, Youtube upload errors, hidden VLC command line options, and a few other extras. Quite a lot for a single piece of text, right. Luckily, all good stuff. Take care, children of the Internet. And if you have any other requests as to what next my future VLC articles should cover, do feel liberated enough to send an email. + +Cheers. + +-------------------------------------------------------------------------------- + +via: http://www.dedoimedo.com/computers/vlc-subtitles-errors.html + +作者:[Dedoimedo ][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.dedoimedo.com/faq.html +[1]:https://www.youtube.com/watch?v=MpDdGOKZ3dg +[2]:https://www.youtube.com/watch?v=KHG6fXEba0A +[3]:https://www.youtube.com/watch?v=TXw5lRi97YY +[4]:https://www.youtube.com/watch?v=cDphUib5iG4 +[5]:http://www.dedoimedo.com/computers/frankenstein-media.html +[6]:http://www.dedoimedo.com/computers/vlc-subtitles.html +[7]:https://trac.videolan.org/vlc/ticket/6184 From 5371fc0634c37756f03cde7777e41800d360044f Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 3 Jul 2017 11:38:41 +0800 Subject: [PATCH 024/100] =?UTF-8?q?20170704-7=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nslation tools to localize your project.md | 176 ++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 sources/tech/20170626 18 open source translation tools to localize your project.md diff --git a/sources/tech/20170626 18 open source translation tools to localize your project.md b/sources/tech/20170626 18 open source translation tools to localize your project.md new file mode 100644 index 0000000000..81cdebdcc8 --- /dev/null +++ b/sources/tech/20170626 18 open source translation tools to localize your project.md @@ -0,0 +1,176 @@ +18 open source translation tools to localize your project +============================================================ + +### Localization plays a key role in adapting projects for users around the world. + + +![18 open source translation tools to localize your project](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/people_remote_teams_world.png?itok=wI-GW8zX "18 open source translation tools to localize your project") +>Image by : opensource.com + +Localization plays a central role in the ability to customize an open source project to suit the needs of users around the world. Besides coding, language translation is one of the main ways people around the world contribute to and engage with open source projects. + +There are tools specific to the language services industry (surprised to hear that's a thing?) that enable a smooth localization process with a high level of quality. Categories that localization tools fall into include: + +* Computer-assisted translation (CAT) tools + +* Machine translation (MT) engines + +* Translation management systems (TMS) + +* Terminology management tools + +* Localization automation tools + +The proprietary versions of these tools can be quite expensive. A single license for SDL Trados Studio (the leading CAT tool) can cost thousands of euros, and even then it is only useful for one individual and the customizations are limited (and psst, they cost more, too). Open source projects looking to localize into many languages and streamline their localization processes will want to look at open source tools to save money and get the flexibility they need with customization. I've compiled this high-level survey of many of the open source localization tool projects out there to help you decide what to use. + +### Computer-assisted translation (CAT) tools + +### [omegat_cat.png][1] + +![OmegaT CAT tool](https://opensource.com/sites/default/files/u128651/omegat_cat.png "OmegaT CAT tool") + +OmegaT CAT tool. Here you see the translation memory (Fuzzy Matches) and terminology recall (Glossary) features at work. OmegaT is licensed under the GNU Public License version 3+. + +CAT tools are a staple of the language services industry. As the name implies, CAT tools help translators perform the tasks of translation, bilingual review, and monolingual review as quickly as possible and with the highest possible consistency through reuse of translated content (also known as translation memory). Translation memory and terminology recall are two central features of CAT tools. They enable a translator to reuse previously translated content from old projects in new projects. This allows them to translate a high volume of words in a shorter amount of time while maintaining a high level of quality through terminology and style consistency. This is especially handy for localization, as text in a lot of software and web UIs is often the same across platforms and applications. CAT tools are standalone pieces of software though, requiring translators that use them to work locally and merge to a central repository. + +**Tools to check out:** + +* [OmegaT][7] + +* [OmegaT+][8] + +* [OpenTM2][9] + +* [Anaphraseus][10] + +* [Subtitles Translator][11] + +### Machine translation (MT) engines + +![apertium_screenshot.png](https://opensource.com/sites/default/files/images/life-uploads/apertium_screenshot.png) + +MT engines automate the transfer of text from one language to another. MT is broken up into three primary methodologies: rules-based, statistical, and neural (which is the new player). The most widespread MT methodology is statistical, which (in very brief terms) draws conclusions about the interconnectedness of a pair of languages by running statistical analyses over annotated bilingual corpus data using  [_n_ -gram models][29]. When a new source language phrase is introduced to the engine for translation, it looks within its analyzed corpus data to find statistically relevant equivalents, which it produces in the target language. MT can be useful as a productivity aid to translators, changing their primary task from translating a source text to a target text to post-editing the MT engine's target language output. I don't recommend using raw MT output in localizations, but if your community is trained in the art of post-editing, MT can be a useful tool to help them make large volumes of contributions. + +**Tools to check out:** + +* [Apertium][12] + +* [Moses][13] + +### Translation management systems (TMS) + +### [mozilla_pontoon.png][2] + +![Mozilla's Pontoon translation management system user interface](https://opensource.com/sites/default/files/u128651/mozilla_pontoon.png "Mozilla's Pontoon translation management system user interface") + +Mozilla's Pontoon translation management system user interface. With WYSIWYG editing, you can translate content in context and simultaneously perform translation and quality assurance. Pontoon is licensed under the BSD 3-clause New or Revised License. + +TMS tools are web-based platforms that allow you to manage a localization project and enable translators and reviewers to do what they do best. Most TMS tools aim to automate many manual parts of the localization process by including version control system (VCS) integrations, cloud services integrations, project reporting, as well as the standard translation memory and terminology recall features. These tools are most amenable to community localization or translation projects, as they allow large groups of translators and reviewers to contribute to a project. Some also use a WYSIWYG editor to give translators context for their translations. This added context improves translation accuracy and cuts down on the amount of time a translator has to wait between doing the translation and reviewing the translation within the user interface. + +**Tools to check out** + +* [Pontoon][14] + +* [Pootle][15] + +* [Weblate][16] + +* [Translate5][17] + +* [GlobalSight][18] + +* [Zanata][19] + +* [Jabylon][20] + +### Terminology management tools + +### [baseterm_term_entry_example.png][3] + +![Brigham Young University's BaseTerm tool](https://opensource.com/sites/default/files/u128651/baseterm_term_entry_example.png "Brigham Young University's BaseTerm tool") + +Brigham Young University's BaseTerm tool displays the new-term entry dialogue window. BaseTerm is licensed under the Eclipse Public License. + +Terminology management tools give you a GUI to create terminology resources (known as termbases) to add context and ensure translation consistency. These resources are consumed by CAT tools and TMS platforms to aid translators in the process of translation. For languages in which a term could be either a noun or a verb based on the context, terminology management tools allows you to add metadata for a term that labels its gender, part of speech, monolingual definition, as well as context clues. Terminology management is often an underserved, but no less important, part of the localization process. In both the open source and proprietary ecosystems, there are only a small handful of options available. + +**Tools to check out** + +* [BaseTerm][21] + +* [Terminator][22] + +### Localization automation tools + +### [okapi_framework.jpg][4] + +![Ratel and Rainbow components of the Okapi Framework](https://opensource.com/sites/default/files/u128651/okapi_framework.jpg "Ratel and Rainbow components of the Okapi Framework") + +The Ratel and Rainbow components of the Okapi Framework. Photo courtesy of the Okapi Framework. The Okapi Framework is licensed under the Apache License version 2.0. + +Localization automation tools facilitate the way you process localization data. This can include text extraction, file format conversion, tokenization, VCS synchronization, term extraction, pre-translation, and various quality checks over common localization standard file formats. In some tool suites, like the Okapi Framework, you can create automation pipelines for performing various localization tasks. This can be very useful for a variety of situations, but their main utility is in the time they save by automating many tasks. They can also move you closer to a more continuous localization process. + +**Tools to check out** + +* [Okapi Framework][23] + +* [Mojito][24] + +### Why open source is key + +Localization is most powerful and effective when done in the open. These tools should give you and your communities the power to localize your projects into as many languages as humanly possible. + +Want to learn more? Check out these additional resources: + +* [Free/open-source machine translation software][25] list + +* _[Open Translation Tools][5]_  e-book + + _Jeff Beatty will be talking about [open source localization tools][26] at [OpenWest][27], which will be held July 12-15 in Salt Lake City._ + +-------------------------------------------------------------------------------- + +作者简介: + +Jeff Beatty - Jeff Beatty is the Head of Localization at Mozilla, the makers of the popular open source web browser, Firefox. He holds a MSc in Multilingual Computing and Localisation from the University of Limerick. Jeff has also been featured as a localization expert in prominent global publications, such as The Economist, El Universal, Multilingual Magazine and others. Jeff aims to showcase Mozilla's localization program, create disruptive, open source translation technology, and serve as intermediary + +----------- + +via: https://opensource.com/article/17/6/open-source-localization-tools + +作者:[Jeff Beatty][a] +译者:[译者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/guerojeff +[1]:https://opensource.com/file/357341 +[2]:https://opensource.com/file/357331 +[3]:https://opensource.com/file/357326 +[4]:https://opensource.com/file/357336 +[5]:https://booki.flossmanuals.net/open-translation-tools/index +[6]:https://opensource.com/article/17/6/open-source-localization-tools?rate=QVxhNMYU2Rzrul0hmvzCTqOUinduQ8Au5L8sT8bVbFk +[7]:http://www.omegat.org/ +[8]:http://omegatplus.sourceforge.net/ +[9]:http://opentm2.org/ +[10]:http://anaphraseus.sourceforge.net/ +[11]:http://www.mironto.sk/ +[12]:http://www.apertium.org/ +[13]:http://www.statmt.org/moses/ +[14]:http://pontoon.mozilla.org/ +[15]:http://pootle.translatehouse.org/ +[16]:https://weblate.org/ +[17]:http://translate5.net/ +[18]:http://www.globalsight.com/ +[19]:http://zanata.org/ +[20]:http://jabylon.org/ +[21]:http://certsoftadmin.byu.edu/baseterm/termbase/search_all +[22]:https://github.com/translate/terminator +[23]:http://okapiframework.org/ +[24]:http://www.mojito.global/ +[25]:http://fosmt.org/ +[26]:https://www.openwest.org/custom/description.php?id=156 +[27]:https://www.openwest.org/ +[28]:https://opensource.com/user/143806/feed +[29]:https://en.wikipedia.org/wiki/N-gram#n-gram_models +[30]:https://opensource.com/users/guerojeff From 52e70f338abd06ccbdc985e619c069d588a576dd Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 3 Jul 2017 11:41:05 +0800 Subject: [PATCH 025/100] =?UTF-8?q?20170704-8=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... install latest version into Linux Mint.md | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 sources/tech/20170609 Python 3.6 - install latest version into Linux Mint.md diff --git a/sources/tech/20170609 Python 3.6 - install latest version into Linux Mint.md b/sources/tech/20170609 Python 3.6 - install latest version into Linux Mint.md new file mode 100644 index 0000000000..f17be7cd2e --- /dev/null +++ b/sources/tech/20170609 Python 3.6 - install latest version into Linux Mint.md @@ -0,0 +1,68 @@ +Python 3.6 - install latest version into Linux Mint +============================================================ + + +![Python 3.6 - install latest version into Linux Mint](https://mintguide.org/uploads/posts/2017-06/1496865727_python-logo.png) +**Python** is one of the most popular programming languages for [Linux][3]. It is written many different tools and libraries. In addition, Python is popular among developers because it is very easy and quick programming, and it's actually simple to master. [][1]If you have installed the operating system [Linux mint][4], you are learning the programming language **Python** and want to work with the latest version, then this article is for you. +Now I have installed [Linux Mint 18][5].1 and the default installed version 2.7 and 3.5\. You can check this with commands + +``` +TerminalShekin@mylinuxmintpc~$python -V +python2 -V +python3 -V +``` +**Installation latest Python 3.6 version into Linux Mint**: + +``` +TerminalShekin@mylinuxmintpc~$sudo add-apt-repository ppa:jonathonf/python-3.6 +sudo apt update +sudo apt install python3.6 +``` +Check the version of the installed Python 3.6 + +``` +TerminalShekin@mylinuxmintpc~$python3.6 -V +``` +**Please note** that the old version is still here, it still available by the name of **python3**and the new can now be loaded with the command **python3.6**. If you want to use this version instead of the 3.5 to run all the programs, there is a utility **update-alternatives**. But if you try to get a list of possibilities, we get the error: + [![Python 3.6 - install latest version into Linux Mint](https://mintguide.org/uploads/posts/2017-06/thumbs/1496871711_linux_mint_001.png)][6] This is normal, you need to first setup what files for that answer, because the maintainers did not care about it : + +``` +TerminalShekin@mylinuxmintpc~$sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1 +sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2 +``` +Now look again: + +``` +TerminalShekin@mylinuxmintpc~$update-alternatives --list python3 +``` + [![Python 3.6 - install latest version into Linux Mint](https://mintguide.org/uploads/posts/2017-06/thumbs/1496871720_linux_mint_002.png)][7] Now we can choose the required version and switch as needed. For settings use the config command: + +``` +TerminalShekin@mylinuxmintpc~$sudo update-alternatives --config python3 +``` + [![Python 3.6 - install latest version into Linux Mint](https://mintguide.org/uploads/posts/2017-06/thumbs/1496871722_linux_mint_003.png)][8] In the prompt you need to specify the program number you want to use by default. +Be careful with a selection of versions, not to touch the python (python2), just use python3, as I said, Python 2.7 written in a variety of system tools, and if you try to run them the wrong version of the interpreter, then nothing happens.May the Force be with you, +Good Luck!!! +[python.org][9] + +-------------------------------------------------------------------------------- + +via: https://mintguide.org/other/794-python-3-6-install-latest-version-into-linux-mint.html + +作者:[ Shekin][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://mintguide.org/user/Shekin/ +[1]:http://www.codeweavers.com/?ad=708 +[2]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly93d3cucHl0aG9uLm9yZw%3D%3D +[3]:https://mintguide.org/ +[4]:https://mintguide.org/ +[5]:https://mintguide.org/ +[6]:https://mintguide.org/uploads/posts/2017-06/1496871711_linux_mint_001.png +[7]:https://mintguide.org/uploads/posts/2017-06/1496871720_linux_mint_002.png +[8]:https://mintguide.org/uploads/posts/2017-06/1496871722_linux_mint_003.png +[9]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly93d3cucHl0aG9uLm9yZw%3D%3D +[10]:https://mintguide.org/other/ From 24610964c6e169a0251e75e86a417764fa2c73f6 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 3 Jul 2017 11:42:38 +0800 Subject: [PATCH 026/100] =?UTF-8?q?20170704-9=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...y-Focused Open-Source Skype Alternative.md | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 sources/tech/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md diff --git a/sources/tech/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md b/sources/tech/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md new file mode 100644 index 0000000000..117471b3e1 --- /dev/null +++ b/sources/tech/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md @@ -0,0 +1,88 @@ +Ring is a Privacy-Focused, Open-Source Skype Alternative +============================================================ + + +[![](https://mintguide.org/uploads/posts/2017-06/thumbs/1498158697_screenshot-at-2017-06-22-12-08-39.png)][13] + +**If you’re sick of Skype for [Linux][2]’s lack of progress, or rankled by the imminent[][1][ retirement of the older (but superior) Qt Skype client,][3] there’s a GNU alternative in town called Ring.** + +Hi, User. It seems that you are using **AdBlock** or similar. MintGuide develops and exists through advertising revenue. + +
**Add us to the exceptions**. +We do not use Intrusive advertising!
+ +GNU Ring is a cross-platform, privacy-minded communication app that is fast gaining a following in FOSS and security-conscious circles. + +Like an **open-source alternative to Skype **sans the baggage that [Microsoft][7]’s VoIP client comes saddled with, Ring is not only able to do most of what Skype can do, but does it in a secure, reassuringly private way: + +* Voice calls + +* Conference calls + +* Video calls + +* Instant messaging + +All of these features work across devices, too. It doesn’t matter if your mates are using Ring for [Windows][8], or Ring for Android. So long as they’re on Ring you can, well, ring ’em! + +Ring works over a distributed peer network. This means it doesn’t rely on one big centralized server that stores all your details, call history and account info. Instead, the service uses distributed hash tables to establish communication. + +The [][4][Ring website][9] touts end-to-end encryption with authentification (sic), manages identity with X.509 certificates, and is based on RSA/AES/DTLS/SRTP technologies + +### Download Ring for [Linux][10] + +You can [][5][download Ring for Linux][11] from the project website or follow along with the installation instructions listed to add the official Ring repo on Ubuntu. There are two versions of the client available: a KDE version and a GNOME version. + +If you’re running Ubuntu with Unity, or GNOME Shell, then opt for the GNOME version. + +If you’re at all confused about installing it there’s a [][6][step-by-step tutorial][12] on the project website. + +The official website also has handy links to apps for Windows, macOS, and Android. + +#### Getting Set Up with Ring on Ubuntu + +Once you have installed the Ring Linux client you’re almost good to go: you just to get set up with a Ring ID before you can make or take calls. + +Getting set up with Ring is different to Skype, Telegram and WhatsApp do it. You’re **not**tied to a specific mobile number or an email address. + +Instead, Ring will ask you to enter a username (you can enter anything) and then assigned you a lengthy identification number. It’s this identification number you will need to send to other Ring users so they can call you. + +To **make your first call with Ring** you need to enter a contact’s Ring ID in the search bar of the main app, then click on the phone icon button to trigger the call. + +Everything else should be relatively straightforward. You can install Ring on other devices and authenticate them with your account so that you never miss a call (if you install it on Android you can scan a Qr code for faster set-up). + +Details and configurations for Ring are stored in the ‘dring.yml’ file stashed in your home folder’s config directory. + +### How Well Does Ring Work? + +The “sucky” part of this post is telling you how well Ring works: I don’t know because I don’t know anyone else who uses Ring. As such I haven’t had a chance to actually use it. + +I did try to Google for Ring reviews but this was a nightmare because the app name is so ubiquitous (I am now very well informed about the Ring video doorbell, though). + + _**If you already use Ring, or you’re able to persuade at least one person you know to try it out, do come back to share a word or two about the connection quality and performance. **_ + +-------------------------------------------------------------------------------- + +via: https://mintguide.org/internet/795-ring-is-a-privacy-focused-open-source-skype-alternative.html + +作者:[fabiomorales9999][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://mintguide.org/user/fabiomorales9999/ +[1]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cDovL3d3dy5vbWd1YnVudHUuY28udWsvMjAxNy8wNi9za3lwZS00LTMtbGludXgtc3RvcC13b3JraW5nLWp1bHktMjAxNw%3D%3D +[2]:https://mintguide.org/ +[3]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cDovL3d3dy5vbWd1YnVudHUuY28udWsvMjAxNy8wNi9za3lwZS00LTMtbGludXgtc3RvcC13b3JraW5nLWp1bHktMjAxNw%3D%3D +[4]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4 +[5]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4L2VuL2Rvd25sb2FkL2dudS1saW51eA%3D%3D +[6]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4L2VuL3R1dG9yaWFscy9nbnUtbGludXgjUmluZ0lE +[7]:https://mintguide.org/tools/537-crossover-run-any-windows-programs-on-linux-mint.html +[8]:https://mintguide.org/tools/537-crossover-run-any-windows-programs-on-linux-mint.html +[9]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4 +[10]:https://mintguide.org/ +[11]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4L2VuL2Rvd25sb2FkL2dudS1saW51eA%3D%3D +[12]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4L2VuL3R1dG9yaWFscy9nbnUtbGludXgjUmluZ0lE +[13]:https://mintguide.org/uploads/posts/2017-06/1498158697_screenshot-at-2017-06-22-12-08-39.png +[14]:https://mintguide.org/internet/ From 3cb93c8b8ca389cc28ca1a34e80d7dfb2bfb389e Mon Sep 17 00:00:00 2001 From: "Dream.I have a dream" <1192877628@qq.com> Date: Mon, 3 Jul 2017 17:29:57 +0800 Subject: [PATCH 027/100] done --- ...egration server for Android development.md | 259 +++++++++--------- 1 file changed, 130 insertions(+), 129 deletions(-) diff --git a/sources/tech/20161228 How to set up a Continuous Integration server for Android development.md b/sources/tech/20161228 How to set up a Continuous Integration server for Android development.md index 388f908415..3c975d05a2 100644 --- a/sources/tech/20161228 How to set up a Continuous Integration server for Android development.md +++ b/sources/tech/20161228 How to set up a Continuous Integration server for Android development.md @@ -1,56 +1,55 @@ -++++翻译中++++++ -How to set up a Continuous Integration server for Android development (Ubuntu + Jenkins + SonarQube) +如何在安卓开发中搭建一个连续集成服务器 ============================================================ -I have recently acquired a new MacBook Pro as my main Android development machine and instead of selling or giving away my old Mac BookPro (13", late 2011, 16GB RAM, 500G SSD, Core i5 2,4GHz, 64Bit) I have wiped it out and turned it into a Continuous Integration Server with dual boot MacOS-Ubuntu. +我最近买了新 MacBook Pro 作为我的安卓开发主力,我的老式的 MacBookPro(2011发布,16GB 500G的固态硬盘,内核是i5,主频4GHz,64位),我也没卖,我打算用它搭建一个连续集成服务器. -The goal of this article is to summarize the installation steps for me as future reference and for any developer that may be interested in setting up its own CI server, I will explain how to: +写这篇文章我主要想总结一下安装步骤,好给自己以后作参考,当然,这篇文章也是给同行看的,只要他们感兴趣.好了,现在开始: -* Configure a fresh Ubuntu installation to be able to run the Android SDK. -* Install Jenkins CI as a service to pull, compile, and run tests of an Android multi-module project hosted in GitHub. -* Install Docker to run a MySQL server and SonarQube in their own containers, to perform static code analysis triggered by Jenkins -* Android App configuration requirements. +* 1.让 Ubuntu 成功运行 SDK (Software Development Kit) +* 2.安装 Jenkins CI ,将其作为服务器.这样,我们可以拉取,编译,运行 已经上传到 Github 的 Android 项目 +* 3.安装 Docker.我们使用 Docker 来运行 +* 4.Android app 配置需求 -### Step 1 — Ubuntu Installation: +### 第一步-安装 Ubuntu: -I’m going to use Ubuntu as the SO of the CI because it has a strong community that will provide you support for any issue you may encounter and my personal recommendation is always to use the last LTS version, currently 16.04 LTS. There are plenty of tutorials about how to install it on virtually any hardware so I’m just providing the link to download it. +我个人比较倾向于使用 Ubuntu 作为持续集成中的 SO,怎么说呢,谁让 Ubuntu 的社区热情呢!你问什么都有人回答,这样可轻松不少.我推荐大家用 LTS (长期技术支持)的最新版.已经有很多教程教大家怎么安装了,我就不废话了,贴个下载链接就行了. [Install Ubuntu Desktop 16.04 LTS][1] -You may wonder why I’m using the Desktop version instead of the pure server version, this is just a matter of personal preference, I’m not worried of losing a bit of performance and available RAM due to be running the desktop interface because I think that the usability that provides de GUI pays off enough in increased productivity. +有人可能很奇怪:用什么桌面版,服务器版多好.额,这个嘛,萝卜青菜,各有所爱.我倒不在乎 UI 占用的那点运算资源.相反,用那一点资源换来可用性,我觉得挺值的. -### Step 2 — Remote access management: +### 第二步-远程管理: -#### SSH-Server: +#### SSH 服务器 -Ubuntu desktop is not shipped with the ssh server installed by default, so to be able to manage your server remotely through the command line just install it: +Ubuntu 桌面版默认安装配置并没有 ssh 服务器,所以你想用的话就只好自己安装. ``` $ sudo apt-get install openssh-server ``` -#### NoMachine Remote Desktop: +#### 虚拟远程桌面 -Probably your CI is not going to be next to you but closer to your router, other room or even miles away from your current location. I have been dealing with different remote desktop solutions and I have to say that IMHO NoMachine performs the best, it is platform agnostic and works just out of the box just using your ssh credentials. (Obviously you have to install it both in your CI and your machine) +可能你的持续集成服务器在你的路由器后面,而不是你的工作环境后面,甚至还可能远离你数里.你可以用不同的远程桌面解决,不得不说,IMHO NoMachine在这方面表现的最好,它只需要你的 ssh 证书就可以工作了(显然你要先把它安装在 CI 和你的机器中 [NoMachine - Free Remote Access For Everybody Free remote access and desktop sharing software. Access your computer to work on files and transfer documents, watch…www.nomachine.com][2][][3] -### Step 3 — Environment configuration +### 第三步-配置环境: -Here I’m going to install JAVA8, Git and the Android SDK that are required by Jenkins to pull, compile and run android projects. +这里我打算安装 Java8,Git,和 Android SDK #### SDKMAN!: -This marvelous command line tool allows you install many popular SDK (eg. Gradle, Groovy, Grails, Kotlin, Scala…), list candidates and switch among different versions in parallel in a really easy and handy way. +有许多超级厉害的命令行工具让你可以安装各种流行的 SDK(软件开发包)比如说,Gradle,Groovy, Grails, Kotlin, Scala...),这样在各个版本中进行选择就容易,顺手多了. [SDKMAN! the Software Development Kit Manager SDKMAN! is a tool for managing parallel versions of multiple Software Development Kits on most Unix based systems. It…sdkman.io][4][][5] -They have added recently support for JAVA8 so I preferred to install Java using it instead of using the popular webupd8 repository, so it is up to you to choose whether to install SDKMAN! or not but I’m pretty sure it is a tool that you will use in the near future. +社区最近又增加了对 JAVA8 的支持,所以我不太喜欢烂大街的 webupd8 库,而是更倾向于安装 Java .在你安装开始前,务必要想清你要不要安装 SDKMAN,话说回来,最好还是装上,因为我们以后应该会用到. -Installation of SDKMAN! is as easy as executing the following line: +执行以下命令即可安装 SDKMAN ``` $ curl -s "https://get.sdkman.io" | bash @@ -59,20 +58,22 @@ $ curl -s "https://get.sdkman.io" | bash #### Oracle JAVA8: -As we have previously installed SDKMAN! now installing JAVA8 is as easy as: +因为我们已经安装了 SDKMAN,所以安装 JAVA8 就相当简单了 ``` $ sdk install java ``` Or using the webupd8 repository: +或者使用 webupd8 这个源 [Install Oracle Java 8 In Ubuntu Or Linux Mint Via PPA Repository [JDK8] Oracle Java 8 is now stable. Below you'll find instructions on how to install it in Ubuntu or Debian via a PPA…www.webupd8.org][6][][7] +Oracle Java 8 不太稳定,在文章底部你可以找到相关指导,教你如何在 Ubuntu 或者 Debian 下通过 PPA 安装. #### Git: -Installing git is straight forward, no more comments needed: +安装git的命令也非常直观,就不废话了 ``` $ sudo apt install git @@ -81,18 +82,18 @@ $ sudo apt install git #### Android SDK: -At the bottom of this page: +这下面这篇文章的底部 [Download Android Studio and SDK Tools | Android Studio Download the official Android IDE and developer tools to build apps for Android phones, tablets, wearables, TVs, and…developer.android.com][8][][9] -you can find “_Get just the command line tools_”, copy the link e.g: +你可以找到 "Get just the command line tools" 等字样,复制这个链接.比如: ``` https://dl.google.com/android/repository/tools_r25.2.3-linux.zip ``` -Then download and unzip it at /opt/android-sdk-linux +下载,然后解压到 /opt/android-sdk-linux 下 ``` $ cd /opt @@ -106,27 +107,27 @@ $ sudo wget https://dl.google.com/android/repository/tools_r25.2.3-linux.zip $ sudo unzip tools_r25.2.3-linux.zip -d android-sdk-linux ``` -As we have used root user to create de directory we need to fix folder permissions to make it readable and writable by our main user: +我们限定了目录权限为 root,所以想要一般情况下使用,还是要重新授权. ``` $ sudo chown -R YOUR_USERNAME:YOUR_USERNAME android-sdk-linux/ ``` -Let’s set the SDK environmental variables editing the /.bashrc file: +然后,在 /.bashr 文件下 增加 SDK 的环境变量 ``` $ cd $ nano .bashrc ``` -Then add at the bottom (but before SDKMAN! config line) these lines: +在底部写入这些行:(注意,但要在 SDKMAN 配置文件前) ``` export ANDROID_HOME="/opt/android-sdk-linux" export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH" ``` -Close the terminal and open a new one to verify that variables have been properly exported: +关闭此终端,再打开一个看看环境变量是否生效 ``` $ echo $ANDROID_HOME @@ -139,31 +140,31 @@ $ android ![](https://cdn-images-1.medium.com/max/1000/1*Q4o_LpfC5A3evFUwd62MOQ.png) -Running Android SDK Manager GUI +运行 Android SDK Manager 的图形交互界面 -### Step 4 — Jenkins server: +### Step 4 _ Jenkins 服务器 -Here I’m going to describe how to install the server, configure it, create a Jenkins Job to pull, build and test an Android project and how to get to the console output. +这里,我要讲讲怎么安装,配置服务器,并创建可拉取的 Jenkin Jobs, -#### Jenkins installation: +#### 安装 Jenkins -Jenkins server is available at: +你可以在下面的链接找到 Jenkins server 相关信息 [Jenkins Jenkins is an open source automation serverjenkins.io][12][][13] -There are many ways to run Jenkins, executing a .war file, as a linux service, as a Docker container, etc…. +我们有许多办法运行 Jenkins,比如说Linux服务器下就可以运行 .war 文件,作为 Docker 容器.等等..... -My first thought was to run it using a Docker container but then I realized that it was a nightmare to properly configure code folders, android-sdk folder visibility and USB visibility of physical devices plug to run Android Tests. +我起初是想把它当做 Docker 容器运行,但是后来我意识到在实体机上配置代码文件夹,android-sdk文件夹和 USB 设备的可见性简直是一场噩梦. -For ease of use I finally decided to use it as service adding the Stable repository key to install and get updates with apt +少操点心,我最终决定给它增加 Stable 源当一个服务器用,自动安装,自动更新. ``` $ wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - ``` -Edit the sources.list file and add: +编辑 source.list,写入这一行 ``` $ sudo nano /etc/apt/sources.list @@ -174,30 +175,30 @@ $ sudo nano /etc/apt/sources.list deb https://pkg.jenkins.io/debian-stable binary/ ``` -Then install it: +然后安装 ``` sudo apt-get update sudo apt-get install jenkins ``` -Add user _jenkins_ to your username group to allow it to read and write the Android SDK folder +在用户组里面增加 _jenkins_ ,允许其读写 Android SDK 文件夹 ``` $ sudo usermod -a -G YOUR_USERNAME jenkins ``` -Jenkins service will always start at boot time and will be available at [http://localhost:8080][15] +Jenkins 服务在开机引导时就会被加载到内存,对外默认开放本机 8080 端口 -Just after installation due to security reasons this screen is shown, just follow the instructions to finally get your Jenkins instance up and running. +安装完毕会有一些安全预警信息,没什么好讲的,跟着引导程序走,人家说啥你做啥就行了.引导结束,你的 Jenkins就会运行了. ![](https://cdn-images-1.medium.com/max/1000/1*gN6-ncU7mRdQWL3wmlS_5g.png) -Unlocking a successfully installed Jenkins server +启用安装成功的 Jenkins 服务器. -#### Jenkins Configuration: +#### Jenkins 配置 -After unlocking Jenkins installation you are prompted to install plugins, click “Select plugins to Install” browse and select the following ones to be installed in addition to suggested plugins: +启用成功后,会有提示程序提示你安装插件,单击 "Select plugins to Install"就可以开始浏览所有插件,然后选择你要安装的插件就OK了. * JUnit @@ -222,109 +223,111 @@ This plugin requires that you have an HTTP URL reachable from GitHub, which mean ![](https://cdn-images-1.medium.com/max/1000/1*xvG06qRSCvfw5OQgQleG0A.png) -Installing Jenkins plugins +安装 Jenkins 插件 -Create the admin user and complete installation. +创建管理员用户,并完成安装 -To finish configuration we have to configure ANDROID_HOME and JAVA_HOME environmental variables: +配置环境变量 ANDROID_HOME,JAVA_HOME -Go to Manage Jenkins > Configure System +点击 Manage Jenkins,接着 Configure System Scroll down and at Global properties section check the Environment variables box and add _ANDROID_HOME_ and _JAVA_HOME_ +滚动文件至底部,在全局属性模块中复核环境变量,并增加 _ANDROID_HOMOE_,和_JAVA_HOME_变量 ![](https://cdn-images-1.medium.com/max/1000/1*rpgkUsqWhkHk4xOKCGPcvw.png) -Adding global environmental variables common to all Jenkins jobs +给所有 Jenkins 工作(jobs)增加全局变量. -#### Creating a “Jenkins Job” +#### 创建 Jenkins Job + +一个 Jenkins Job 定义了一系列不间断的操作.如果你跟随本篇引导的话,那么你可以使用我已经在 GitHub 上为你准备了一个 Android 练习项目,你可以使用这个来试试手.它只是一个复合模块的 app,包括多个方面,比如单元测试,Android测试,和 JaCoCo,SonarQube插件. -A Jenkins Job describes a series of steps that are executed consecutively. I have prepared a “Hello Jenkins” Android project in GitHub that you can use to test your Jenkins configuration as you follow this tutorial. It is just a hello world multi-module app with Unit tests, Android tests and includes JaCoCo and SonarQube plugins. [pamartineza/helloJenkins helloJenkins - Hello Jenkins project for CI configuration testgithub.com][24][][25] -First create a new _Freestyle project Job _and give it a name eg. “_Hello_Android_” (Don’t use spaces in Jenkins Job names to avoid future compatibility problems with SonarQube) +首先创建一个新的 Job 项目,取名为 _Hello_Android_.不要使用空格,这样可以避免与 SonarQube 不兼容的问题. ![](https://cdn-images-1.medium.com/max/1000/1*ITE7xIrbsrChWv45PSlPPw.png) -Creating a Freestyle Jenkins Job +创建一个 Freestyle Jenkins Job -Then let’s configure it, I’m going to add screenshots of every section: +接下来就是配置了,我给每一块都增加了截屏 -General: +概况 -This section is not very interesting for our goals, here you can change the name of the Job, add a description and if using a GitHub project add the project URL, (without *.git, the url of the web not the repo) +这部分比较繁琐,你可以在这里变更 Job 的名字,增加简介.如果你使用 GitHub 项目,你还可以写下项目的 URL(不要 *.git,是 web 的 url,不是 repo) ![](https://cdn-images-1.medium.com/max/1000/1*7QF2pfgM73FVIWTfQhcbEA.png) -Project Url Configuration +项目 Url 配置 -Source Code Management: +源代码管理 -Here is where we have to chose our CVS as Git and add the repository url (this time include *.git) and select the branch to pull. As this is a public GitHub repository you don’t need to add credentials but otherwise you will have to add your user and password. +这时候我们就要选择我们的 CVS 作为 Git,并且增加源的 url(这次就要包括 *.git)然后选择分支拉取.因为这是一个公开的 GitHub 库,我们就不需要提交证书了,否则的话就要设置账号和密码 -I recommend you that instead of using your actual GitHub user with full permissions create a new GitHub user with read-only privileges of your private repos to be used exclusively by your Jenkins Jobs. +相比于使用自己的公用仓库我更倾向于创建一个只读的私人仓库专门配给 Jenkins Job 使用 -In addition if you have enabled Two-Factor authentication Jenkins won’t be able to pull code and again having this exclusively created for Jenkins user will be the solution to pull code from private repos. +另外,如果你已经使用了 Two-Factor 认证,Jenkins 就无法拉取代码.所以为 Jenkins 专门开启一个库很有必要,这样可以直接从私人库中拉取代码 ![](https://cdn-images-1.medium.com/max/1000/1*wkzdL70XrCzIpXDsHPA2Pg.png) -Repository configuration +配置仓库 -Build Triggers: +构建 (build) 触发器 -Builds can be triggered manually, remotely, periodically, after another Job build, when changes are detected, etc… +你可以手动开始构建,也可以远程,周期性地,或者在另一个 Job 构建完成之后开始构建,只要这些改变可以被检测到. + +最好的情况肯定是一旦你更改了某些地方,就会立刻触发构建事件,Github为此提供了名叫 webhooks 的回调函数 -Ideally the optimal situation is to just trigger a build when a change has been pushed to the repository, GitHub provides a system called Webhooks [Webhooks | GitHub Developer Guide Webhooks allow you to build or set up integrations which subscribe to certain events on GitHub.com. When one of those…developer.github.com][26][][27] -that we can configure to send events to the CI server and then trigger the build, but this obviously requires our CI sever to be online and reachable by GitHub servers. +这样,我们就可以发送这些事件到 CI 服务器,然后触发构建.显然,我们的 CI 服务器必须要联网,并且可以与 GitHub 服务器通信. + +你的 CI 服务器为了安全只限于内网使用,那么解决办法就只有集中周期性的提交.我就是只有工作时才打开 CI,我把它设置为每十五分钟上交一次.集中时间可以通过 CRON 语法设置,如果你不熟悉,请点击案例文件的右侧的帮助按钮. -Your CI is going to be probably isolated in a private network for security reasons then the only solution is to poll GitHub periodically. In my personal case I just turn on the CI when I’m working, in the following screenshot I have configured it to poll Github every 15 minutes. Polling times are defined with CRON syntax, if you are not familiar with it, press the help button on the right to get an extensive documentation with examples. ![](https://cdn-images-1.medium.com/max/1000/1*eONz8DAwJ9PW7uc8VQw7wQ.png) -Repository polling configuration +源的集中配置 -Build Environment: +构建环境 -Here I recommend to configure the build _stuck_ timeout to avoid Jenkins blocking memory and CPU if any unexpected error happens. Here also you can Inject environmental variables, passwords, etc… +这里我推荐设置超时模块避免 Jenkings 禁用内存和 CPU ,毕竟有时候有意外发生.当然,你还可以设置环境变量和密码等等. ![](https://cdn-images-1.medium.com/max/1000/1*Y6FgbIQq8pMk6D72Sr9KdQ.png) -Build stuck time out +构建超时 Build: -Here is where the magic happens! Add a _Build Step _that _Invokes Gradle Script _select the Gradle Wrapper (Android projects are shipped with a Gradle Wrapper by default, don’t forget to check it into Git) and let’s define which tasks are going to be executed: - -1. clean: Deletes all build outputs of previous builds, this ensures nothing is cached and the freshness of this build. -2. assembleDebug: Generates the debug .apk -3. test: executes JUnit tests in all modules -4. connectedDebugAndroidTest: executes Android Tests on actual android devices connected to the CI. (It is also possible to run Android Test against an Android Emulator installing the Android Emulator Jenkins plugin, but it doesn’t support all emulator versions and its configuration is not trivial at all) +神奇的事情发生了,使用 Gradle 脚本,增加 Build 步骤,选择 Gradle Wrapper (默认情况下,Gradle Wrapper 配置了 Android 项目,不要忘记在 Git 上检查一下)然后选择你要执行的任务 +1. clean: 清除所有历史输出,这样可以刷新缓存 +2. asseembleDebug: 生成调试 .apk 文件 (Android application 文件) +3. test:在所有模块上执行 JUnit 测试文件 +4. connectteDebugAndroidTest:在实体机上执行安卓测试单元,连接到 CI (也可以使用安装了 Jenkins 插件的安卓模拟器,但是它不支持所有型号,而且相当麻烦) ![](https://cdn-images-1.medium.com/max/1000/1*D0HDPOUYCWzsWKiLv4LrBA.png) -Gradle tasks definition +配置 Gradle -Post-build Actions: +我们将要增加 JUnit 测试报告.JUnit插件需要这一步,再搜集由 JUnit 测试结果生成的 XML 文件,这样我们就能即时知道测试结果的变化. -Here we are going to add _Publish JUnit test result report _this step is provided by the JUnit plugin and collects the .XML reports generated with the outcome of the JUnit tests that will generate a fancy chart with the evolution of tests results in time. -The path for debug flavor tests results in our app module is: +这我们 app 模块中,测试运行结果的路径是: app/build/test-results/debug/*.xml -In multi-module projects the path for test results in other “pure” java modules is: +在其他 "纯净模式" 下,综合模块的测试结果在这里: */build/test-results/*.xml @@ -332,58 +335,58 @@ In multi-module projects the path for test results in other “pure” java modu ![](https://cdn-images-1.medium.com/max/1000/1*ZQtamiQ_8PzAFBd-pMfvdg.png) -Also add _Record JaCoCo coverage report _that will create a chart to show the evolution of the code coverage +还要增加记录报告,表明将要创建一张显示代码作用域的表单. ![](https://cdn-images-1.medium.com/max/1000/1*wKaFykDl0qg-c79QwRTR2w.png) -#### Executing a Jenkins Job +#### 运行 Jenkins Job -Our Job will execute every 15 minutes if new changes have been pushed to the repository but it can also be triggered manually if you don’t want to wait until next polling or you just want to verify any change in the configuration straight forward. Click _Build Now_ and then current build will be shown in the _Build History _, click on it to see the details. +只要有任何改变提交到仓库,它们就会在十五分钟之内被执行,但是如果你不想等的话,或者你只是想验证一下配置的改变,你也可以手动运行.单击构建按钮,这样你就可以在构建历史中找到它,接着单击就可以了. ![](https://cdn-images-1.medium.com/max/1000/1*vKi-BGQ2blimaoTl7PTXtQ.png) -Manual Job execution - -The most interesting part here is the console output, you can see how Jenkins pulls the code and starts executing the Gradle tasks we have previously defined e.g _clean._ +手动执行 Job +最有趣的部分是控制台输出 (console output) 你可以看到 Jenkins 是如何开始执行我们的 Gradle 项目 ![](https://cdn-images-1.medium.com/max/1000/1*dbtmlSr2owrj_CQfGXjdsw.png) -Beginning of console output +控制台输出的开始 -If everything is OK console output will finish as follows (any repository connectivity problem, failing JUnit or Android test failure would make the build to fail) +你要是做的正确的话,控制台将会有如下输出 (任何源连接问题,测试单元的失败都将导致构建不可用) ![](https://cdn-images-1.medium.com/max/1000/1*WpOH-aHuuNRDYmY710ecLQ.png) -Yeehaa! build Sucsessful and test results with coverage collected +哈哈哈哈,构建成功,测试结果符合预期 -### Step 5 — SonarQube +### 第五步-SonarQube -In this section I will describe how to install and configure SonarQube and its companion MySQL database using Docker containers. +这部分我会讲讲如何安装,配置 SonarQube 和使用 Docker 作为容器的 MySQL 数据库 [Continuous Code Quality | SonarQube The leading open source platform for continuous code qualitywww.sonarqube.org][28][][29] -SonarQube is a code static analysis tool that helps developers to write cleaner code, detect bugs, learn good practices and it also keeps track of code coverage, tests results, technical debt, etc… all SonarQube detected issues can be imported easily to be fixed into Android Studio/IntelliJ with a plugin: +SonarQube 是个代码静态分析工具,它可以帮助开发者写出干净,优雅的代码.它还可以跟踪代码规模,测试结果,功能需求等等.SonarQube检测到的问题可以使用插件十分容易的导入到 Android Studion/IntelliJ 中去. [JetBrains Plugin Repository :: SonarQube Community Plugin Edit descriptionplugins.jetbrains.com][30][][31] -#### Installing Docker: +#### 安装 Docker -Installation of Docker is pretty straightforward following official Docker documentation: +安装 Docker 十分容易,按照下面的教程即可 [Install Docker on Ubuntu Instructions for installing Docker on Ubuntudocs.docker.com][32][][33] -#### Creating Containers: +#### 生成容器 (Containers) MySQL: -Let’s create a MySQL 5.7.17 server container called _mysqlserver, _that will allways start at boot time, with a local volume in your user folder, a password and exposed at localhost:3306 _(replace YOUR_USER and YOUR_MYSQL_PASSWORD with your values)_ + +我们先搭建一个 MySQL5.7.17服务器容器,命名为 _mysqlserver.在你的家目录下建立一个本地文件夹,使用如下命令让服务在开机引导时候就被加载.把命令中的 YOUR_USER 和 YOUR_MYSQL_PASSWORD 替换为你自己账号密码. ``` $ docker run --name mysqlserver --restart=always -v /home/YOUR_USER/mysqlVolume:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=YOUR_MYSQL_PASSWORD -p 3306:3306 -d mysql:5.7.17 @@ -391,94 +394,92 @@ $ docker run --name mysqlserver --restart=always -v /home/YOUR_USER/mysqlVolume: phpMyAdmin: -To manage the MySQL server I’m used to phpMyAdmin then nothing more easy than creating another container called _phpmyadmin _linked to our _mysqlserver _container, that also starts at boot time, exposed at localhost:9090 and using the last version available. + +想要优雅简单地管理 MySQL服务器,我强烈推荐phpMyAdmin.你只要建立个容器,命名为 _phpmyadin,然后指向你的 mysqlserver容器,这样也会在开机引导时加载,你可以在 localhost:9090 找到它. ``` $ docker run --name phpmyadmin --restart=always --link mysqlserver:db -p 9090:80 -d phpmyadmin/phpmyadmin ``` -Using the phpMyAdmin interface at localhost:9090 login as _root and YOUR_MYSQL_PASSWORD _andcreate a database called _sonar_ with _utf8_general_ci _collation. Also create a new user _sonar_ with password _YOUR_SONAR_PASSWORD _and give it all privileges on the _sonar_ database. +你可以在 localhost:9090 用你的 mysql 密码,以 root 身份登录,然后你需要创建一个数据库,_sonar_with_uft8_general_ci SonarQube: -Now we are ready to create our SonarQube container called _sonarqube _that starts at boot time, linked to our db, exposed at localhost:9000 and using the 5.6.4 (LTS) version. +现在我们已经创建好了我们的 SonarQube 容器,就叫 sonarqube,它会自启动,自动连接我们的数据库,你可以在 localhost:9090 使用 5.6.4(长期技术支持)版本 ``` $ docker run --name sonarqube --restart=always --link mysqlserver:db -p 9000:9000 -p 9092:9092 -e "SONARQUBE_JDBC_URL=jdbc:mysql://db:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance" -e "SONARQUBE_JDBC_USER=sonar" -e "SONARQUBE_JDBC_PASSWORD=YOUR_SONAR_PASSWORD" -d sonarqube:5.6.4 ``` -#### SonarQube Configuration: +#### 配置 SonarQube -If everything is OK browsing to localhost:9000 will lead you to this page: +如果你配置成功,你将在 localhost:9000 看到如下页面 ![](https://cdn-images-1.medium.com/max/1000/1*tcgww8PENXdyrLS3K95ZEw.png) -Now let’s configure necessary plugins and Quality Profiles: +好了,让我们来配置必要的插件和基本的配置文件 -1. Login at the top right corner (Default administrator login is admin/admin) -2. Go to Administration > System > Update Center > Updates Only +1. 在页面的右上角可以登录(默认的管理员账号和密码是 admin/admin) +2. 进入到管理员 (Administration),然后点击 System,接下来是 Updata Center,最后是 Updates Only * Update Java plugin if necessary -3\. Now switch to Available and install the following plugins: +3. 现在启用,并安装以下插件 * Android (provides Android lint rules) * Checkstyle * Findbugs * XML -4\. Scroll back to the top and press restart button to complete the installation +4. 返回顶部,点击重启按钮完成整个安装. -#### SonarQube Profiles: +#### SonarQube 配置文件 -The plugins that we have installed define profiles that are sets of rules used to evaluate the code quality of a project. +我们刚刚安装的插件可以定义配置文件,这里有一套规则去衡量项目的代码质量 -Only 1 profile can be applied to a project at a time but we can make profiles have a parent and therefore inherit rules, so to be able to have all rules evaluated against our project we can create a new custom profile and chain all profiles. +同一时间只有一个项目只能使用一个配置文件.但是我们可以抽象配置文件,让配置的实例集成这些规则(借用 OOP 概念),所以想在一个项目中灵活地使用配置,我们可以创建个性化配置,约束所有的配置. -Let’s do it, go to Quality Profiles > Create and give it a name e.g. CustomAndroidProfile +就这么干,点击 Quality Profiles ,跳转到 Create ,然后命名,比如 CustomAndroidProfile -Add Android Lint as parent, then switch to the Android Lint profile and add FindBugs Security Minimal as parent, continue this chain until you get this inheritance schema and set the CustomAndroidProfile as the default one: +将 Android Lint 作为父级,然后选择 Android Lint 配置,增加 FindBugs Security Minial 作为上一级,当你得到父级继承,并且设置 CustomAndroidProfile 作为默认主题的时候,你就完成了. ![](https://cdn-images-1.medium.com/max/1000/1*w2CvH8uAOUcvajzjsOoCgQ.png) -#### Executing the SonarQube Analysis: +#### 运行 Sonarqube 分析器 -Now that our SonarQube is properly configured we just have to add a new Gradle task, _sonarqube_, to our Jenkins job, that will be executed in last place: +现在我们的 SonarQube 已经正式配置完毕,我们需要添加一个 Gradle 任务,_sonarqube_到我们的 Jenkins Job.我们在最后执行. ![](https://cdn-images-1.medium.com/max/1000/1*EDAjalNzmdU-ptjhWzuCcQ.png) - - -Execute again the Jenkins job and once it has finished let’s see our sonarQube dashboard at localhost:9000 : +再次运行 Jenkins Job,一旦运行完毕,我们可以在 localhost:9090 中找到我们的 sonarQube 控制面板 ![](https://cdn-images-1.medium.com/max/1000/1*n7dKdPXyUPj1AZe6ujL3vw.png) -Dashboard with Analysis result +分析结果的显示 -If we press the project name we can navigate different dashboards, with tons of info, the most important one is probably _Issues.  -_In the next screenshot I’m showing the detail of a _major _issue that flags an empty constructor method. Here personally what gives me the most important value of using Sonarqube is the explanation shown at the screen bottom when you click on the period … , this is an invaluable way of learning tips and tricks of programming. +长按项目名称我们可以进入到相应的显示界面,最重要的可能就是问题界面了 +我将展示一个空构造方法下的主要问题细节.就我个人而言,使用 SonarQube 最大的好处就是可以显示分析结果.这是一个学习编程十分有用的技能. ![](https://cdn-images-1.medium.com/max/1000/1*KKM9T2qHzanraAetghYCqg.png) -Getting the explanation of the issue -### Step 6 — Extra: configuring other Android apps +### 第六步 小贴士:配置其他 Android apps -Configuring an Android app to get coverage and sonarqube results is just having the JaCoCo and SonarQube plugins applied. Again you can find more details at my demo app HelloJenkins: +想要配置 Android app 得到 sonarqube 结果,只要安装 JaCoCo和Sonarqube 插件就可以了.你也可以在我的示例中得到更多信息 [pamartineza/helloJenkins helloJenkins - Hello Jenkins project for CI configuration testgithub.com][34][][35] -### The end! +### 最后 -Yes, you have finally reached the end of this long article! I hope you found it useful. If you find any error or you have any doubt please don’t hesitate to make any comment, I’ll do my best to try to help and if you liked it please share it! +啊,你终于走到头了,希望你觉得本文有点用处.你要是发现了任何错误,有任何疑问,别迟疑,赶紧评论.我拼了老命也要帮你.哦,忘了提醒,好东西要和朋友分享. -------------------------------------------------------------------------------- @@ -493,7 +494,7 @@ Entrepreneur & CEO at GreenLionSoft · Android Lead @MadridMBC & @Shoptimix · A via: https://medium.com/@pamartineza/how-to-set-up-a-continuous-integration-server-for-android-development-ubuntu-jenkins-sonarqube-43c1ed6b08d3#.x6jhcpg98 作者:[Pablo A. Martínez][a] -译者:[译者ID](https://github.com/译者ID) +译者:[Taylor1024](https://github.com/Taylor1024) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From c5fd0d04429167877ca8b66f8230923ab639ca9b Mon Sep 17 00:00:00 2001 From: "Dream.I have a dream" <1192877628@qq.com> Date: Mon, 3 Jul 2017 21:26:55 +0800 Subject: [PATCH 028/100] finished --- ...egration server for Android development.md | 537 ++++++++++++++++++ 1 file changed, 537 insertions(+) create mode 100644 translated/tech/20161228 How to set up a Continuous Integration server for Android development.md diff --git a/translated/tech/20161228 How to set up a Continuous Integration server for Android development.md b/translated/tech/20161228 How to set up a Continuous Integration server for Android development.md new file mode 100644 index 0000000000..3c975d05a2 --- /dev/null +++ b/translated/tech/20161228 How to set up a Continuous Integration server for Android development.md @@ -0,0 +1,537 @@ +如何在安卓开发中搭建一个连续集成服务器 +============================================================ + +我最近买了新 MacBook Pro 作为我的安卓开发主力,我的老式的 MacBookPro(2011发布,16GB 500G的固态硬盘,内核是i5,主频4GHz,64位),我也没卖,我打算用它搭建一个连续集成服务器. + +写这篇文章我主要想总结一下安装步骤,好给自己以后作参考,当然,这篇文章也是给同行看的,只要他们感兴趣.好了,现在开始: + +* 1.让 Ubuntu 成功运行 SDK (Software Development Kit) +* 2.安装 Jenkins CI ,将其作为服务器.这样,我们可以拉取,编译,运行 已经上传到 Github 的 Android 项目 +* 3.安装 Docker.我们使用 Docker 来运行 +* 4.Android app 配置需求 + +### 第一步-安装 Ubuntu: + +我个人比较倾向于使用 Ubuntu 作为持续集成中的 SO,怎么说呢,谁让 Ubuntu 的社区热情呢!你问什么都有人回答,这样可轻松不少.我推荐大家用 LTS (长期技术支持)的最新版.已经有很多教程教大家怎么安装了,我就不废话了,贴个下载链接就行了. + +[Install Ubuntu Desktop 16.04 LTS][1] + +有人可能很奇怪:用什么桌面版,服务器版多好.额,这个嘛,萝卜青菜,各有所爱.我倒不在乎 UI 占用的那点运算资源.相反,用那一点资源换来可用性,我觉得挺值的. + +### 第二步-远程管理: + +#### SSH 服务器 + +Ubuntu 桌面版默认安装配置并没有 ssh 服务器,所以你想用的话就只好自己安装. + +``` +$ sudo apt-get install openssh-server +``` + +#### 虚拟远程桌面 + +可能你的持续集成服务器在你的路由器后面,而不是你的工作环境后面,甚至还可能远离你数里.你可以用不同的远程桌面解决,不得不说,IMHO NoMachine在这方面表现的最好,它只需要你的 ssh 证书就可以工作了(显然你要先把它安装在 CI 和你的机器中 + +[NoMachine - Free Remote Access For Everybody +Free remote access and desktop sharing software. Access your computer to work on files and transfer documents, watch…www.nomachine.com][2][][3] + + +### 第三步-配置环境: + +这里我打算安装 Java8,Git,和 Android SDK + +#### SDKMAN!: + +有许多超级厉害的命令行工具让你可以安装各种流行的 SDK(软件开发包)比如说,Gradle,Groovy, Grails, Kotlin, Scala...),这样在各个版本中进行选择就容易,顺手多了. + +[SDKMAN! the Software Development Kit Manager +SDKMAN! is a tool for managing parallel versions of multiple Software Development Kits on most Unix based systems. It…sdkman.io][4][][5] + +社区最近又增加了对 JAVA8 的支持,所以我不太喜欢烂大街的 webupd8 库,而是更倾向于安装 Java .在你安装开始前,务必要想清你要不要安装 SDKMAN,话说回来,最好还是装上,因为我们以后应该会用到. + +执行以下命令即可安装 SDKMAN + +``` +$ curl -s "https://get.sdkman.io" | bash +``` + + +#### Oracle JAVA8: + +因为我们已经安装了 SDKMAN,所以安装 JAVA8 就相当简单了 + +``` +$ sdk install java +``` + +Or using the webupd8 repository: +或者使用 webupd8 这个源 + +[Install Oracle Java 8 In Ubuntu Or Linux Mint Via PPA Repository [JDK8] +Oracle Java 8 is now stable. Below you'll find instructions on how to install it in Ubuntu or Debian via a PPA…www.webupd8.org][6][][7] +Oracle Java 8 不太稳定,在文章底部你可以找到相关指导,教你如何在 Ubuntu 或者 Debian 下通过 PPA 安装. + +#### Git: + +安装git的命令也非常直观,就不废话了 + +``` +$ sudo apt install git +``` + + +#### Android SDK: + +这下面这篇文章的底部 + +[Download Android Studio and SDK Tools | Android Studio +Download the official Android IDE and developer tools to build apps for Android phones, tablets, wearables, TVs, and…developer.android.com][8][][9] + +你可以找到 "Get just the command line tools" 等字样,复制这个链接.比如: + +``` +https://dl.google.com/android/repository/tools_r25.2.3-linux.zip +``` + +下载,然后解压到 /opt/android-sdk-linux 下 + +``` +$ cd /opt +``` + +``` +$ sudo wget https://dl.google.com/android/repository/tools_r25.2.3-linux.zip +``` + +``` +$ sudo unzip tools_r25.2.3-linux.zip -d android-sdk-linux +``` + +我们限定了目录权限为 root,所以想要一般情况下使用,还是要重新授权. + +``` +$ sudo chown -R YOUR_USERNAME:YOUR_USERNAME android-sdk-linux/ +``` + +然后,在 /.bashr 文件下 增加 SDK 的环境变量 + +``` +$ cd +$ nano .bashrc +``` + +在底部写入这些行:(注意,但要在 SDKMAN 配置文件前) + +``` +export ANDROID_HOME="/opt/android-sdk-linux" +export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH" +``` + +关闭此终端,再打开一个看看环境变量是否生效 + +``` +$ echo $ANDROID_HOME +/opt/android-sdk-linux +``` + +``` +$ android +``` + + ![](https://cdn-images-1.medium.com/max/1000/1*Q4o_LpfC5A3evFUwd62MOQ.png) + +运行 Android SDK Manager 的图形交互界面 + + +### Step 4 _ Jenkins 服务器 + +这里,我要讲讲怎么安装,配置服务器,并创建可拉取的 Jenkin Jobs, + +#### 安装 Jenkins + +你可以在下面的链接找到 Jenkins server 相关信息 + +[Jenkins +Jenkins is an open source automation serverjenkins.io][12][][13] + +我们有许多办法运行 Jenkins,比如说Linux服务器下就可以运行 .war 文件,作为 Docker 容器.等等..... + +我起初是想把它当做 Docker 容器运行,但是后来我意识到在实体机上配置代码文件夹,android-sdk文件夹和 USB 设备的可见性简直是一场噩梦. + +少操点心,我最终决定给它增加 Stable 源当一个服务器用,自动安装,自动更新. + +``` +$ wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - +``` + +编辑 source.list,写入这一行 + +``` +$ sudo nano /etc/apt/sources.list +``` + +``` +#Jenkin Stable +deb https://pkg.jenkins.io/debian-stable binary/ +``` + +然后安装 + +``` +sudo apt-get update +sudo apt-get install jenkins +``` + +在用户组里面增加 _jenkins_ ,允许其读写 Android SDK 文件夹 + +``` +$ sudo usermod -a -G YOUR_USERNAME jenkins +``` + +Jenkins 服务在开机引导时就会被加载到内存,对外默认开放本机 8080 端口 + +安装完毕会有一些安全预警信息,没什么好讲的,跟着引导程序走,人家说啥你做啥就行了.引导结束,你的 Jenkins就会运行了. + + ![](https://cdn-images-1.medium.com/max/1000/1*gN6-ncU7mRdQWL3wmlS_5g.png) + +启用安装成功的 Jenkins 服务器. + +#### Jenkins 配置 + +启用成功后,会有提示程序提示你安装插件,单击 "Select plugins to Install"就可以开始浏览所有插件,然后选择你要安装的插件就OK了. + +* JUnit + +[JUnit Plugin - Jenkins - Jenkins Wiki +The JUnit plugin provides a publisher that consumes XML test reports generated during the builds and provides some…wiki.jenkins-ci.org][16][][17] + +* JaCoCo + +[JaCoCo Plugin - Jenkins - Jenkins Wiki +In order to get the coverage data published to Jenkins, you need to add a JaCoCo publisher and configure it so it will…wiki.jenkins-ci.org][18][][19] + +* EnvInject + +[EnvInject Plugin - Jenkins - Jenkins Wiki +Only previous environment variables are available for polling Some plugins provide polling mechanisms (such as SCM…wiki.jenkins-ci.org][20][][21] + +* GitHub plugins + +[GitHub Plugin - Jenkins - Jenkins Wiki +This plugin requires that you have an HTTP URL reachable from GitHub, which means it's reachable from the whole…wiki.jenkins-ci.org][22][][23] + + + ![](https://cdn-images-1.medium.com/max/1000/1*xvG06qRSCvfw5OQgQleG0A.png) + +安装 Jenkins 插件 + +创建管理员用户,并完成安装 + +配置环境变量 ANDROID_HOME,JAVA_HOME + +点击 Manage Jenkins,接着 Configure System + +Scroll down and at Global properties section check the Environment variables box and add _ANDROID_HOME_ and _JAVA_HOME_ +滚动文件至底部,在全局属性模块中复核环境变量,并增加 _ANDROID_HOMOE_,和_JAVA_HOME_变量 + + + ![](https://cdn-images-1.medium.com/max/1000/1*rpgkUsqWhkHk4xOKCGPcvw.png) + +给所有 Jenkins 工作(jobs)增加全局变量. + +#### 创建 Jenkins Job + +一个 Jenkins Job 定义了一系列不间断的操作.如果你跟随本篇引导的话,那么你可以使用我已经在 GitHub 上为你准备了一个 Android 练习项目,你可以使用这个来试试手.它只是一个复合模块的 app,包括多个方面,比如单元测试,Android测试,和 JaCoCo,SonarQube插件. + + +[pamartineza/helloJenkins +helloJenkins - Hello Jenkins project for CI configuration testgithub.com][24][][25] + +首先创建一个新的 Job 项目,取名为 _Hello_Android_.不要使用空格,这样可以避免与 SonarQube 不兼容的问题. + + + ![](https://cdn-images-1.medium.com/max/1000/1*ITE7xIrbsrChWv45PSlPPw.png) + +创建一个 Freestyle Jenkins Job + +接下来就是配置了,我给每一块都增加了截屏 + +概况 + +这部分比较繁琐,你可以在这里变更 Job 的名字,增加简介.如果你使用 GitHub 项目,你还可以写下项目的 URL(不要 *.git,是 web 的 url,不是 repo) + + + ![](https://cdn-images-1.medium.com/max/1000/1*7QF2pfgM73FVIWTfQhcbEA.png) + +项目 Url 配置 + +源代码管理 + +这时候我们就要选择我们的 CVS 作为 Git,并且增加源的 url(这次就要包括 *.git)然后选择分支拉取.因为这是一个公开的 GitHub 库,我们就不需要提交证书了,否则的话就要设置账号和密码 + +相比于使用自己的公用仓库我更倾向于创建一个只读的私人仓库专门配给 Jenkins Job 使用 + +另外,如果你已经使用了 Two-Factor 认证,Jenkins 就无法拉取代码.所以为 Jenkins 专门开启一个库很有必要,这样可以直接从私人库中拉取代码 + + + ![](https://cdn-images-1.medium.com/max/1000/1*wkzdL70XrCzIpXDsHPA2Pg.png) + +配置仓库 + +构建 (build) 触发器 + +你可以手动开始构建,也可以远程,周期性地,或者在另一个 Job 构建完成之后开始构建,只要这些改变可以被检测到. + +最好的情况肯定是一旦你更改了某些地方,就会立刻触发构建事件,Github为此提供了名叫 webhooks 的回调函数 + + +[Webhooks | GitHub Developer Guide +Webhooks allow you to build or set up integrations which subscribe to certain events on GitHub.com. When one of those…developer.github.com][26][][27] + +这样,我们就可以发送这些事件到 CI 服务器,然后触发构建.显然,我们的 CI 服务器必须要联网,并且可以与 GitHub 服务器通信. + +你的 CI 服务器为了安全只限于内网使用,那么解决办法就只有集中周期性的提交.我就是只有工作时才打开 CI,我把它设置为每十五分钟上交一次.集中时间可以通过 CRON 语法设置,如果你不熟悉,请点击案例文件的右侧的帮助按钮. + + + + ![](https://cdn-images-1.medium.com/max/1000/1*eONz8DAwJ9PW7uc8VQw7wQ.png) + +源的集中配置 + +构建环境 + +这里我推荐设置超时模块避免 Jenkings 禁用内存和 CPU ,毕竟有时候有意外发生.当然,你还可以设置环境变量和密码等等. + + + ![](https://cdn-images-1.medium.com/max/1000/1*Y6FgbIQq8pMk6D72Sr9KdQ.png) + +构建超时 + +Build: + +神奇的事情发生了,使用 Gradle 脚本,增加 Build 步骤,选择 Gradle Wrapper (默认情况下,Gradle Wrapper 配置了 Android 项目,不要忘记在 Git 上检查一下)然后选择你要执行的任务 + +1. clean: 清除所有历史输出,这样可以刷新缓存 +2. asseembleDebug: 生成调试 .apk 文件 (Android application 文件) +3. test:在所有模块上执行 JUnit 测试文件 +4. connectteDebugAndroidTest:在实体机上执行安卓测试单元,连接到 CI (也可以使用安装了 Jenkins 插件的安卓模拟器,但是它不支持所有型号,而且相当麻烦) + + ![](https://cdn-images-1.medium.com/max/1000/1*D0HDPOUYCWzsWKiLv4LrBA.png) + +配置 Gradle + +我们将要增加 JUnit 测试报告.JUnit插件需要这一步,再搜集由 JUnit 测试结果生成的 XML 文件,这样我们就能即时知道测试结果的变化. + + +这我们 app 模块中,测试运行结果的路径是: + +app/build/test-results/debug/*.xml + +在其他 "纯净模式" 下,综合模块的测试结果在这里: + +*/build/test-results/*.xml + + + ![](https://cdn-images-1.medium.com/max/1000/1*ZQtamiQ_8PzAFBd-pMfvdg.png) + + +还要增加记录报告,表明将要创建一张显示代码作用域的表单. + + ![](https://cdn-images-1.medium.com/max/1000/1*wKaFykDl0qg-c79QwRTR2w.png) + + +#### 运行 Jenkins Job + +只要有任何改变提交到仓库,它们就会在十五分钟之内被执行,但是如果你不想等的话,或者你只是想验证一下配置的改变,你也可以手动运行.单击构建按钮,这样你就可以在构建历史中找到它,接着单击就可以了. + + + ![](https://cdn-images-1.medium.com/max/1000/1*vKi-BGQ2blimaoTl7PTXtQ.png) + +手动执行 Job + +最有趣的部分是控制台输出 (console output) 你可以看到 Jenkins 是如何开始执行我们的 Gradle 项目 + + ![](https://cdn-images-1.medium.com/max/1000/1*dbtmlSr2owrj_CQfGXjdsw.png) + +控制台输出的开始 + +你要是做的正确的话,控制台将会有如下输出 (任何源连接问题,测试单元的失败都将导致构建不可用) + + + ![](https://cdn-images-1.medium.com/max/1000/1*WpOH-aHuuNRDYmY710ecLQ.png) + +哈哈哈哈,构建成功,测试结果符合预期 + +### 第五步-SonarQube + +这部分我会讲讲如何安装,配置 SonarQube 和使用 Docker 作为容器的 MySQL 数据库 + +[Continuous Code Quality | SonarQube +The leading open source platform for continuous code qualitywww.sonarqube.org][28][][29] + +SonarQube 是个代码静态分析工具,它可以帮助开发者写出干净,优雅的代码.它还可以跟踪代码规模,测试结果,功能需求等等.SonarQube检测到的问题可以使用插件十分容易的导入到 Android Studion/IntelliJ 中去. + +[JetBrains Plugin Repository :: SonarQube Community Plugin +Edit descriptionplugins.jetbrains.com][30][][31] + + +#### 安装 Docker + +安装 Docker 十分容易,按照下面的教程即可 + +[Install Docker on Ubuntu +Instructions for installing Docker on Ubuntudocs.docker.com][32][][33] + +#### 生成容器 (Containers) + +MySQL: + +我们先搭建一个 MySQL5.7.17服务器容器,命名为 _mysqlserver.在你的家目录下建立一个本地文件夹,使用如下命令让服务在开机引导时候就被加载.把命令中的 YOUR_USER 和 YOUR_MYSQL_PASSWORD 替换为你自己账号密码. + +``` +$ docker run --name mysqlserver --restart=always -v /home/YOUR_USER/mysqlVolume:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=YOUR_MYSQL_PASSWORD -p 3306:3306 -d mysql:5.7.17 +``` + + +phpMyAdmin: + +想要优雅简单地管理 MySQL服务器,我强烈推荐phpMyAdmin.你只要建立个容器,命名为 _phpmyadin,然后指向你的 mysqlserver容器,这样也会在开机引导时加载,你可以在 localhost:9090 找到它. + +``` +$ docker run --name phpmyadmin --restart=always --link mysqlserver:db -p 9090:80 -d phpmyadmin/phpmyadmin +``` + +你可以在 localhost:9090 用你的 mysql 密码,以 root 身份登录,然后你需要创建一个数据库,_sonar_with_uft8_general_ci + + +SonarQube: +现在我们已经创建好了我们的 SonarQube 容器,就叫 sonarqube,它会自启动,自动连接我们的数据库,你可以在 localhost:9090 使用 5.6.4(长期技术支持)版本 + +``` +$ docker run --name sonarqube --restart=always --link mysqlserver:db -p 9000:9000 -p 9092:9092 -e "SONARQUBE_JDBC_URL=jdbc:mysql://db:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance" -e "SONARQUBE_JDBC_USER=sonar" -e "SONARQUBE_JDBC_PASSWORD=YOUR_SONAR_PASSWORD" -d sonarqube:5.6.4 +``` + + +#### 配置 SonarQube + +如果你配置成功,你将在 localhost:9000 看到如下页面 + + + ![](https://cdn-images-1.medium.com/max/1000/1*tcgww8PENXdyrLS3K95ZEw.png) + +好了,让我们来配置必要的插件和基本的配置文件 + +1. 在页面的右上角可以登录(默认的管理员账号和密码是 admin/admin) +2. 进入到管理员 (Administration),然后点击 System,接下来是 Updata Center,最后是 Updates Only + +* Update Java plugin if necessary + +3. 现在启用,并安装以下插件 + +* Android (provides Android lint rules) +* Checkstyle +* Findbugs +* XML + +4. 返回顶部,点击重启按钮完成整个安装. + + +#### SonarQube 配置文件 + +我们刚刚安装的插件可以定义配置文件,这里有一套规则去衡量项目的代码质量 + +同一时间只有一个项目只能使用一个配置文件.但是我们可以抽象配置文件,让配置的实例集成这些规则(借用 OOP 概念),所以想在一个项目中灵活地使用配置,我们可以创建个性化配置,约束所有的配置. + +就这么干,点击 Quality Profiles ,跳转到 Create ,然后命名,比如 CustomAndroidProfile + +将 Android Lint 作为父级,然后选择 Android Lint 配置,增加 FindBugs Security Minial 作为上一级,当你得到父级继承,并且设置 CustomAndroidProfile 作为默认主题的时候,你就完成了. + + + ![](https://cdn-images-1.medium.com/max/1000/1*w2CvH8uAOUcvajzjsOoCgQ.png) + + +#### 运行 Sonarqube 分析器 + +现在我们的 SonarQube 已经正式配置完毕,我们需要添加一个 Gradle 任务,_sonarqube_到我们的 Jenkins Job.我们在最后执行. + + ![](https://cdn-images-1.medium.com/max/1000/1*EDAjalNzmdU-ptjhWzuCcQ.png) + +再次运行 Jenkins Job,一旦运行完毕,我们可以在 localhost:9090 中找到我们的 sonarQube 控制面板 + + + ![](https://cdn-images-1.medium.com/max/1000/1*n7dKdPXyUPj1AZe6ujL3vw.png) + +分析结果的显示 + +长按项目名称我们可以进入到相应的显示界面,最重要的可能就是问题界面了 +我将展示一个空构造方法下的主要问题细节.就我个人而言,使用 SonarQube 最大的好处就是可以显示分析结果.这是一个学习编程十分有用的技能. + + + ![](https://cdn-images-1.medium.com/max/1000/1*KKM9T2qHzanraAetghYCqg.png) + + +### 第六步 小贴士:配置其他 Android apps + +想要配置 Android app 得到 sonarqube 结果,只要安装 JaCoCo和Sonarqube 插件就可以了.你也可以在我的示例中得到更多信息 + +[pamartineza/helloJenkins +helloJenkins - Hello Jenkins project for CI configuration testgithub.com][34][][35] + +### 最后 + +啊,你终于走到头了,希望你觉得本文有点用处.你要是发现了任何错误,有任何疑问,别迟疑,赶紧评论.我拼了老命也要帮你.哦,忘了提醒,好东西要和朋友分享. + +-------------------------------------------------------------------------------- + +作者简介: + +![](https://cdn-images-1.medium.com/fit/c/60/60/0*DQl4jAoi2wXr6S3p.jpg) + +Entrepreneur & CEO at GreenLionSoft · Android Lead @MadridMBC & @Shoptimix · Android, OpenSource and OpenData promoter · Runner · Traveller + +-------------------------------------------------------------------------------- + +via: https://medium.com/@pamartineza/how-to-set-up-a-continuous-integration-server-for-android-development-ubuntu-jenkins-sonarqube-43c1ed6b08d3#.x6jhcpg98 + +作者:[Pablo A. Martínez][a] +译者:[Taylor1024](https://github.com/Taylor1024) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://medium.com/@pamartineza +[1]:https://www.ubuntu.com/download/desktop +[2]:https://www.nomachine.com/download +[3]:https://www.nomachine.com/download +[4]:http://sdkman.io/ +[5]:http://sdkman.io/ +[6]:http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html +[7]:http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html +[8]:https://developer.android.com/studio/index.html +[9]:https://developer.android.com/studio/index.html +[10]:https://dl.google.com/android/repository/tools_r25.2.3-linux.zip +[11]:https://dl.google.com/android/repository/tools_r25.2.3-linux.zip +[12]:https://jenkins.io/ +[13]:https://jenkins.io/ +[14]:https://pkg.jenkins.io/debian-stable/jenkins.io.key +[15]:http://localhost:8080/ +[16]:https://wiki.jenkins-ci.org/display/JENKINS/JUnit+Plugin +[17]:https://wiki.jenkins-ci.org/display/JENKINS/JUnit+Plugin +[18]:https://wiki.jenkins-ci.org/display/JENKINS/JaCoCo+Plugin +[19]:https://wiki.jenkins-ci.org/display/JENKINS/JaCoCo+Plugin +[20]:https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin +[21]:https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin +[22]:https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin +[23]:https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin +[24]:https://github.com/pamartineza/helloJenkins +[25]:https://github.com/pamartineza/helloJenkins +[26]:https://developer.github.com/webhooks/ +[27]:https://developer.github.com/webhooks/ +[28]:https://www.sonarqube.org/ +[29]:https://www.sonarqube.org/ +[30]:https://plugins.jetbrains.com/idea/plugin/7238-sonarqube-community-plugin +[31]:https://plugins.jetbrains.com/idea/plugin/7238-sonarqube-community-plugin +[32]:https://docs.docker.com/engine/installation/linux/ubuntulinux/ +[33]:https://docs.docker.com/engine/installation/linux/ubuntulinux/ +[34]:https://github.com/pamartineza/helloJenkins +[35]:https://github.com/pamartineza/helloJenkins From 32ae9ead8ba84a1deaca33a7181f3af83652e5f8 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 3 Jul 2017 22:46:12 +0800 Subject: [PATCH 029/100] =?UTF-8?q?=E8=A1=A5=E5=AE=8C=20PR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @Taylor1024 --- ...egration server for Android development.md | 537 ------------------ 1 file changed, 537 deletions(-) delete mode 100644 sources/tech/20161228 How to set up a Continuous Integration server for Android development.md diff --git a/sources/tech/20161228 How to set up a Continuous Integration server for Android development.md b/sources/tech/20161228 How to set up a Continuous Integration server for Android development.md deleted file mode 100644 index 3c975d05a2..0000000000 --- a/sources/tech/20161228 How to set up a Continuous Integration server for Android development.md +++ /dev/null @@ -1,537 +0,0 @@ -如何在安卓开发中搭建一个连续集成服务器 -============================================================ - -我最近买了新 MacBook Pro 作为我的安卓开发主力,我的老式的 MacBookPro(2011发布,16GB 500G的固态硬盘,内核是i5,主频4GHz,64位),我也没卖,我打算用它搭建一个连续集成服务器. - -写这篇文章我主要想总结一下安装步骤,好给自己以后作参考,当然,这篇文章也是给同行看的,只要他们感兴趣.好了,现在开始: - -* 1.让 Ubuntu 成功运行 SDK (Software Development Kit) -* 2.安装 Jenkins CI ,将其作为服务器.这样,我们可以拉取,编译,运行 已经上传到 Github 的 Android 项目 -* 3.安装 Docker.我们使用 Docker 来运行 -* 4.Android app 配置需求 - -### 第一步-安装 Ubuntu: - -我个人比较倾向于使用 Ubuntu 作为持续集成中的 SO,怎么说呢,谁让 Ubuntu 的社区热情呢!你问什么都有人回答,这样可轻松不少.我推荐大家用 LTS (长期技术支持)的最新版.已经有很多教程教大家怎么安装了,我就不废话了,贴个下载链接就行了. - -[Install Ubuntu Desktop 16.04 LTS][1] - -有人可能很奇怪:用什么桌面版,服务器版多好.额,这个嘛,萝卜青菜,各有所爱.我倒不在乎 UI 占用的那点运算资源.相反,用那一点资源换来可用性,我觉得挺值的. - -### 第二步-远程管理: - -#### SSH 服务器 - -Ubuntu 桌面版默认安装配置并没有 ssh 服务器,所以你想用的话就只好自己安装. - -``` -$ sudo apt-get install openssh-server -``` - -#### 虚拟远程桌面 - -可能你的持续集成服务器在你的路由器后面,而不是你的工作环境后面,甚至还可能远离你数里.你可以用不同的远程桌面解决,不得不说,IMHO NoMachine在这方面表现的最好,它只需要你的 ssh 证书就可以工作了(显然你要先把它安装在 CI 和你的机器中 - -[NoMachine - Free Remote Access For Everybody -Free remote access and desktop sharing software. Access your computer to work on files and transfer documents, watch…www.nomachine.com][2][][3] - - -### 第三步-配置环境: - -这里我打算安装 Java8,Git,和 Android SDK - -#### SDKMAN!: - -有许多超级厉害的命令行工具让你可以安装各种流行的 SDK(软件开发包)比如说,Gradle,Groovy, Grails, Kotlin, Scala...),这样在各个版本中进行选择就容易,顺手多了. - -[SDKMAN! the Software Development Kit Manager -SDKMAN! is a tool for managing parallel versions of multiple Software Development Kits on most Unix based systems. It…sdkman.io][4][][5] - -社区最近又增加了对 JAVA8 的支持,所以我不太喜欢烂大街的 webupd8 库,而是更倾向于安装 Java .在你安装开始前,务必要想清你要不要安装 SDKMAN,话说回来,最好还是装上,因为我们以后应该会用到. - -执行以下命令即可安装 SDKMAN - -``` -$ curl -s "https://get.sdkman.io" | bash -``` - - -#### Oracle JAVA8: - -因为我们已经安装了 SDKMAN,所以安装 JAVA8 就相当简单了 - -``` -$ sdk install java -``` - -Or using the webupd8 repository: -或者使用 webupd8 这个源 - -[Install Oracle Java 8 In Ubuntu Or Linux Mint Via PPA Repository [JDK8] -Oracle Java 8 is now stable. Below you'll find instructions on how to install it in Ubuntu or Debian via a PPA…www.webupd8.org][6][][7] -Oracle Java 8 不太稳定,在文章底部你可以找到相关指导,教你如何在 Ubuntu 或者 Debian 下通过 PPA 安装. - -#### Git: - -安装git的命令也非常直观,就不废话了 - -``` -$ sudo apt install git -``` - - -#### Android SDK: - -这下面这篇文章的底部 - -[Download Android Studio and SDK Tools | Android Studio -Download the official Android IDE and developer tools to build apps for Android phones, tablets, wearables, TVs, and…developer.android.com][8][][9] - -你可以找到 "Get just the command line tools" 等字样,复制这个链接.比如: - -``` -https://dl.google.com/android/repository/tools_r25.2.3-linux.zip -``` - -下载,然后解压到 /opt/android-sdk-linux 下 - -``` -$ cd /opt -``` - -``` -$ sudo wget https://dl.google.com/android/repository/tools_r25.2.3-linux.zip -``` - -``` -$ sudo unzip tools_r25.2.3-linux.zip -d android-sdk-linux -``` - -我们限定了目录权限为 root,所以想要一般情况下使用,还是要重新授权. - -``` -$ sudo chown -R YOUR_USERNAME:YOUR_USERNAME android-sdk-linux/ -``` - -然后,在 /.bashr 文件下 增加 SDK 的环境变量 - -``` -$ cd -$ nano .bashrc -``` - -在底部写入这些行:(注意,但要在 SDKMAN 配置文件前) - -``` -export ANDROID_HOME="/opt/android-sdk-linux" -export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH" -``` - -关闭此终端,再打开一个看看环境变量是否生效 - -``` -$ echo $ANDROID_HOME -/opt/android-sdk-linux -``` - -``` -$ android -``` - - ![](https://cdn-images-1.medium.com/max/1000/1*Q4o_LpfC5A3evFUwd62MOQ.png) - -运行 Android SDK Manager 的图形交互界面 - - -### Step 4 _ Jenkins 服务器 - -这里,我要讲讲怎么安装,配置服务器,并创建可拉取的 Jenkin Jobs, - -#### 安装 Jenkins - -你可以在下面的链接找到 Jenkins server 相关信息 - -[Jenkins -Jenkins is an open source automation serverjenkins.io][12][][13] - -我们有许多办法运行 Jenkins,比如说Linux服务器下就可以运行 .war 文件,作为 Docker 容器.等等..... - -我起初是想把它当做 Docker 容器运行,但是后来我意识到在实体机上配置代码文件夹,android-sdk文件夹和 USB 设备的可见性简直是一场噩梦. - -少操点心,我最终决定给它增加 Stable 源当一个服务器用,自动安装,自动更新. - -``` -$ wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - -``` - -编辑 source.list,写入这一行 - -``` -$ sudo nano /etc/apt/sources.list -``` - -``` -#Jenkin Stable -deb https://pkg.jenkins.io/debian-stable binary/ -``` - -然后安装 - -``` -sudo apt-get update -sudo apt-get install jenkins -``` - -在用户组里面增加 _jenkins_ ,允许其读写 Android SDK 文件夹 - -``` -$ sudo usermod -a -G YOUR_USERNAME jenkins -``` - -Jenkins 服务在开机引导时就会被加载到内存,对外默认开放本机 8080 端口 - -安装完毕会有一些安全预警信息,没什么好讲的,跟着引导程序走,人家说啥你做啥就行了.引导结束,你的 Jenkins就会运行了. - - ![](https://cdn-images-1.medium.com/max/1000/1*gN6-ncU7mRdQWL3wmlS_5g.png) - -启用安装成功的 Jenkins 服务器. - -#### Jenkins 配置 - -启用成功后,会有提示程序提示你安装插件,单击 "Select plugins to Install"就可以开始浏览所有插件,然后选择你要安装的插件就OK了. - -* JUnit - -[JUnit Plugin - Jenkins - Jenkins Wiki -The JUnit plugin provides a publisher that consumes XML test reports generated during the builds and provides some…wiki.jenkins-ci.org][16][][17] - -* JaCoCo - -[JaCoCo Plugin - Jenkins - Jenkins Wiki -In order to get the coverage data published to Jenkins, you need to add a JaCoCo publisher and configure it so it will…wiki.jenkins-ci.org][18][][19] - -* EnvInject - -[EnvInject Plugin - Jenkins - Jenkins Wiki -Only previous environment variables are available for polling Some plugins provide polling mechanisms (such as SCM…wiki.jenkins-ci.org][20][][21] - -* GitHub plugins - -[GitHub Plugin - Jenkins - Jenkins Wiki -This plugin requires that you have an HTTP URL reachable from GitHub, which means it's reachable from the whole…wiki.jenkins-ci.org][22][][23] - - - ![](https://cdn-images-1.medium.com/max/1000/1*xvG06qRSCvfw5OQgQleG0A.png) - -安装 Jenkins 插件 - -创建管理员用户,并完成安装 - -配置环境变量 ANDROID_HOME,JAVA_HOME - -点击 Manage Jenkins,接着 Configure System - -Scroll down and at Global properties section check the Environment variables box and add _ANDROID_HOME_ and _JAVA_HOME_ -滚动文件至底部,在全局属性模块中复核环境变量,并增加 _ANDROID_HOMOE_,和_JAVA_HOME_变量 - - - ![](https://cdn-images-1.medium.com/max/1000/1*rpgkUsqWhkHk4xOKCGPcvw.png) - -给所有 Jenkins 工作(jobs)增加全局变量. - -#### 创建 Jenkins Job - -一个 Jenkins Job 定义了一系列不间断的操作.如果你跟随本篇引导的话,那么你可以使用我已经在 GitHub 上为你准备了一个 Android 练习项目,你可以使用这个来试试手.它只是一个复合模块的 app,包括多个方面,比如单元测试,Android测试,和 JaCoCo,SonarQube插件. - - -[pamartineza/helloJenkins -helloJenkins - Hello Jenkins project for CI configuration testgithub.com][24][][25] - -首先创建一个新的 Job 项目,取名为 _Hello_Android_.不要使用空格,这样可以避免与 SonarQube 不兼容的问题. - - - ![](https://cdn-images-1.medium.com/max/1000/1*ITE7xIrbsrChWv45PSlPPw.png) - -创建一个 Freestyle Jenkins Job - -接下来就是配置了,我给每一块都增加了截屏 - -概况 - -这部分比较繁琐,你可以在这里变更 Job 的名字,增加简介.如果你使用 GitHub 项目,你还可以写下项目的 URL(不要 *.git,是 web 的 url,不是 repo) - - - ![](https://cdn-images-1.medium.com/max/1000/1*7QF2pfgM73FVIWTfQhcbEA.png) - -项目 Url 配置 - -源代码管理 - -这时候我们就要选择我们的 CVS 作为 Git,并且增加源的 url(这次就要包括 *.git)然后选择分支拉取.因为这是一个公开的 GitHub 库,我们就不需要提交证书了,否则的话就要设置账号和密码 - -相比于使用自己的公用仓库我更倾向于创建一个只读的私人仓库专门配给 Jenkins Job 使用 - -另外,如果你已经使用了 Two-Factor 认证,Jenkins 就无法拉取代码.所以为 Jenkins 专门开启一个库很有必要,这样可以直接从私人库中拉取代码 - - - ![](https://cdn-images-1.medium.com/max/1000/1*wkzdL70XrCzIpXDsHPA2Pg.png) - -配置仓库 - -构建 (build) 触发器 - -你可以手动开始构建,也可以远程,周期性地,或者在另一个 Job 构建完成之后开始构建,只要这些改变可以被检测到. - -最好的情况肯定是一旦你更改了某些地方,就会立刻触发构建事件,Github为此提供了名叫 webhooks 的回调函数 - - -[Webhooks | GitHub Developer Guide -Webhooks allow you to build or set up integrations which subscribe to certain events on GitHub.com. When one of those…developer.github.com][26][][27] - -这样,我们就可以发送这些事件到 CI 服务器,然后触发构建.显然,我们的 CI 服务器必须要联网,并且可以与 GitHub 服务器通信. - -你的 CI 服务器为了安全只限于内网使用,那么解决办法就只有集中周期性的提交.我就是只有工作时才打开 CI,我把它设置为每十五分钟上交一次.集中时间可以通过 CRON 语法设置,如果你不熟悉,请点击案例文件的右侧的帮助按钮. - - - - ![](https://cdn-images-1.medium.com/max/1000/1*eONz8DAwJ9PW7uc8VQw7wQ.png) - -源的集中配置 - -构建环境 - -这里我推荐设置超时模块避免 Jenkings 禁用内存和 CPU ,毕竟有时候有意外发生.当然,你还可以设置环境变量和密码等等. - - - ![](https://cdn-images-1.medium.com/max/1000/1*Y6FgbIQq8pMk6D72Sr9KdQ.png) - -构建超时 - -Build: - -神奇的事情发生了,使用 Gradle 脚本,增加 Build 步骤,选择 Gradle Wrapper (默认情况下,Gradle Wrapper 配置了 Android 项目,不要忘记在 Git 上检查一下)然后选择你要执行的任务 - -1. clean: 清除所有历史输出,这样可以刷新缓存 -2. asseembleDebug: 生成调试 .apk 文件 (Android application 文件) -3. test:在所有模块上执行 JUnit 测试文件 -4. connectteDebugAndroidTest:在实体机上执行安卓测试单元,连接到 CI (也可以使用安装了 Jenkins 插件的安卓模拟器,但是它不支持所有型号,而且相当麻烦) - - ![](https://cdn-images-1.medium.com/max/1000/1*D0HDPOUYCWzsWKiLv4LrBA.png) - -配置 Gradle - -我们将要增加 JUnit 测试报告.JUnit插件需要这一步,再搜集由 JUnit 测试结果生成的 XML 文件,这样我们就能即时知道测试结果的变化. - - -这我们 app 模块中,测试运行结果的路径是: - -app/build/test-results/debug/*.xml - -在其他 "纯净模式" 下,综合模块的测试结果在这里: - -*/build/test-results/*.xml - - - ![](https://cdn-images-1.medium.com/max/1000/1*ZQtamiQ_8PzAFBd-pMfvdg.png) - - -还要增加记录报告,表明将要创建一张显示代码作用域的表单. - - ![](https://cdn-images-1.medium.com/max/1000/1*wKaFykDl0qg-c79QwRTR2w.png) - - -#### 运行 Jenkins Job - -只要有任何改变提交到仓库,它们就会在十五分钟之内被执行,但是如果你不想等的话,或者你只是想验证一下配置的改变,你也可以手动运行.单击构建按钮,这样你就可以在构建历史中找到它,接着单击就可以了. - - - ![](https://cdn-images-1.medium.com/max/1000/1*vKi-BGQ2blimaoTl7PTXtQ.png) - -手动执行 Job - -最有趣的部分是控制台输出 (console output) 你可以看到 Jenkins 是如何开始执行我们的 Gradle 项目 - - ![](https://cdn-images-1.medium.com/max/1000/1*dbtmlSr2owrj_CQfGXjdsw.png) - -控制台输出的开始 - -你要是做的正确的话,控制台将会有如下输出 (任何源连接问题,测试单元的失败都将导致构建不可用) - - - ![](https://cdn-images-1.medium.com/max/1000/1*WpOH-aHuuNRDYmY710ecLQ.png) - -哈哈哈哈,构建成功,测试结果符合预期 - -### 第五步-SonarQube - -这部分我会讲讲如何安装,配置 SonarQube 和使用 Docker 作为容器的 MySQL 数据库 - -[Continuous Code Quality | SonarQube -The leading open source platform for continuous code qualitywww.sonarqube.org][28][][29] - -SonarQube 是个代码静态分析工具,它可以帮助开发者写出干净,优雅的代码.它还可以跟踪代码规模,测试结果,功能需求等等.SonarQube检测到的问题可以使用插件十分容易的导入到 Android Studion/IntelliJ 中去. - -[JetBrains Plugin Repository :: SonarQube Community Plugin -Edit descriptionplugins.jetbrains.com][30][][31] - - -#### 安装 Docker - -安装 Docker 十分容易,按照下面的教程即可 - -[Install Docker on Ubuntu -Instructions for installing Docker on Ubuntudocs.docker.com][32][][33] - -#### 生成容器 (Containers) - -MySQL: - -我们先搭建一个 MySQL5.7.17服务器容器,命名为 _mysqlserver.在你的家目录下建立一个本地文件夹,使用如下命令让服务在开机引导时候就被加载.把命令中的 YOUR_USER 和 YOUR_MYSQL_PASSWORD 替换为你自己账号密码. - -``` -$ docker run --name mysqlserver --restart=always -v /home/YOUR_USER/mysqlVolume:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=YOUR_MYSQL_PASSWORD -p 3306:3306 -d mysql:5.7.17 -``` - - -phpMyAdmin: - -想要优雅简单地管理 MySQL服务器,我强烈推荐phpMyAdmin.你只要建立个容器,命名为 _phpmyadin,然后指向你的 mysqlserver容器,这样也会在开机引导时加载,你可以在 localhost:9090 找到它. - -``` -$ docker run --name phpmyadmin --restart=always --link mysqlserver:db -p 9090:80 -d phpmyadmin/phpmyadmin -``` - -你可以在 localhost:9090 用你的 mysql 密码,以 root 身份登录,然后你需要创建一个数据库,_sonar_with_uft8_general_ci - - -SonarQube: -现在我们已经创建好了我们的 SonarQube 容器,就叫 sonarqube,它会自启动,自动连接我们的数据库,你可以在 localhost:9090 使用 5.6.4(长期技术支持)版本 - -``` -$ docker run --name sonarqube --restart=always --link mysqlserver:db -p 9000:9000 -p 9092:9092 -e "SONARQUBE_JDBC_URL=jdbc:mysql://db:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance" -e "SONARQUBE_JDBC_USER=sonar" -e "SONARQUBE_JDBC_PASSWORD=YOUR_SONAR_PASSWORD" -d sonarqube:5.6.4 -``` - - -#### 配置 SonarQube - -如果你配置成功,你将在 localhost:9000 看到如下页面 - - - ![](https://cdn-images-1.medium.com/max/1000/1*tcgww8PENXdyrLS3K95ZEw.png) - -好了,让我们来配置必要的插件和基本的配置文件 - -1. 在页面的右上角可以登录(默认的管理员账号和密码是 admin/admin) -2. 进入到管理员 (Administration),然后点击 System,接下来是 Updata Center,最后是 Updates Only - -* Update Java plugin if necessary - -3. 现在启用,并安装以下插件 - -* Android (provides Android lint rules) -* Checkstyle -* Findbugs -* XML - -4. 返回顶部,点击重启按钮完成整个安装. - - -#### SonarQube 配置文件 - -我们刚刚安装的插件可以定义配置文件,这里有一套规则去衡量项目的代码质量 - -同一时间只有一个项目只能使用一个配置文件.但是我们可以抽象配置文件,让配置的实例集成这些规则(借用 OOP 概念),所以想在一个项目中灵活地使用配置,我们可以创建个性化配置,约束所有的配置. - -就这么干,点击 Quality Profiles ,跳转到 Create ,然后命名,比如 CustomAndroidProfile - -将 Android Lint 作为父级,然后选择 Android Lint 配置,增加 FindBugs Security Minial 作为上一级,当你得到父级继承,并且设置 CustomAndroidProfile 作为默认主题的时候,你就完成了. - - - ![](https://cdn-images-1.medium.com/max/1000/1*w2CvH8uAOUcvajzjsOoCgQ.png) - - -#### 运行 Sonarqube 分析器 - -现在我们的 SonarQube 已经正式配置完毕,我们需要添加一个 Gradle 任务,_sonarqube_到我们的 Jenkins Job.我们在最后执行. - - ![](https://cdn-images-1.medium.com/max/1000/1*EDAjalNzmdU-ptjhWzuCcQ.png) - -再次运行 Jenkins Job,一旦运行完毕,我们可以在 localhost:9090 中找到我们的 sonarQube 控制面板 - - - ![](https://cdn-images-1.medium.com/max/1000/1*n7dKdPXyUPj1AZe6ujL3vw.png) - -分析结果的显示 - -长按项目名称我们可以进入到相应的显示界面,最重要的可能就是问题界面了 -我将展示一个空构造方法下的主要问题细节.就我个人而言,使用 SonarQube 最大的好处就是可以显示分析结果.这是一个学习编程十分有用的技能. - - - ![](https://cdn-images-1.medium.com/max/1000/1*KKM9T2qHzanraAetghYCqg.png) - - -### 第六步 小贴士:配置其他 Android apps - -想要配置 Android app 得到 sonarqube 结果,只要安装 JaCoCo和Sonarqube 插件就可以了.你也可以在我的示例中得到更多信息 - -[pamartineza/helloJenkins -helloJenkins - Hello Jenkins project for CI configuration testgithub.com][34][][35] - -### 最后 - -啊,你终于走到头了,希望你觉得本文有点用处.你要是发现了任何错误,有任何疑问,别迟疑,赶紧评论.我拼了老命也要帮你.哦,忘了提醒,好东西要和朋友分享. - --------------------------------------------------------------------------------- - -作者简介: - -![](https://cdn-images-1.medium.com/fit/c/60/60/0*DQl4jAoi2wXr6S3p.jpg) - -Entrepreneur & CEO at GreenLionSoft · Android Lead @MadridMBC & @Shoptimix · Android, OpenSource and OpenData promoter · Runner · Traveller - --------------------------------------------------------------------------------- - -via: https://medium.com/@pamartineza/how-to-set-up-a-continuous-integration-server-for-android-development-ubuntu-jenkins-sonarqube-43c1ed6b08d3#.x6jhcpg98 - -作者:[Pablo A. Martínez][a] -译者:[Taylor1024](https://github.com/Taylor1024) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://medium.com/@pamartineza -[1]:https://www.ubuntu.com/download/desktop -[2]:https://www.nomachine.com/download -[3]:https://www.nomachine.com/download -[4]:http://sdkman.io/ -[5]:http://sdkman.io/ -[6]:http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html -[7]:http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html -[8]:https://developer.android.com/studio/index.html -[9]:https://developer.android.com/studio/index.html -[10]:https://dl.google.com/android/repository/tools_r25.2.3-linux.zip -[11]:https://dl.google.com/android/repository/tools_r25.2.3-linux.zip -[12]:https://jenkins.io/ -[13]:https://jenkins.io/ -[14]:https://pkg.jenkins.io/debian-stable/jenkins.io.key -[15]:http://localhost:8080/ -[16]:https://wiki.jenkins-ci.org/display/JENKINS/JUnit+Plugin -[17]:https://wiki.jenkins-ci.org/display/JENKINS/JUnit+Plugin -[18]:https://wiki.jenkins-ci.org/display/JENKINS/JaCoCo+Plugin -[19]:https://wiki.jenkins-ci.org/display/JENKINS/JaCoCo+Plugin -[20]:https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin -[21]:https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin -[22]:https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin -[23]:https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin -[24]:https://github.com/pamartineza/helloJenkins -[25]:https://github.com/pamartineza/helloJenkins -[26]:https://developer.github.com/webhooks/ -[27]:https://developer.github.com/webhooks/ -[28]:https://www.sonarqube.org/ -[29]:https://www.sonarqube.org/ -[30]:https://plugins.jetbrains.com/idea/plugin/7238-sonarqube-community-plugin -[31]:https://plugins.jetbrains.com/idea/plugin/7238-sonarqube-community-plugin -[32]:https://docs.docker.com/engine/installation/linux/ubuntulinux/ -[33]:https://docs.docker.com/engine/installation/linux/ubuntulinux/ -[34]:https://github.com/pamartineza/helloJenkins -[35]:https://github.com/pamartineza/helloJenkins From cb570f2b8cb10d42d77f1dda8c0b777a1124ccf3 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 3 Jul 2017 23:14:29 +0800 Subject: [PATCH 030/100] PUB:20170331 Writing a Linux Debugger Part 3 Registers and memory.md @ictlyh @jasminepeng --- ...ux Debugger Part 3 Registers and memory.md | 50 +++++-------------- 1 file changed, 12 insertions(+), 38 deletions(-) rename {translated/tech => published}/20170331 Writing a Linux Debugger Part 3 Registers and memory.md (81%) diff --git a/translated/tech/20170331 Writing a Linux Debugger Part 3 Registers and memory.md b/published/20170331 Writing a Linux Debugger Part 3 Registers and memory.md similarity index 81% rename from translated/tech/20170331 Writing a Linux Debugger Part 3 Registers and memory.md rename to published/20170331 Writing a Linux Debugger Part 3 Registers and memory.md index 3fcf15ab9c..3b04faf841 100644 --- a/translated/tech/20170331 Writing a Linux Debugger Part 3 Registers and memory.md +++ b/published/20170331 Writing a Linux Debugger Part 3 Registers and memory.md @@ -1,39 +1,26 @@ -开发 Linux 调试器(三):寄存器和内存 +开发一个 Linux 调试器(三):寄存器和内存 ============================================================ 上一篇博文中我们给调试器添加了一个简单的地址断点。这次,我们将添加读写寄存器和内存的功能,这将使我们能够使用我们的程序计数器、观察状态和改变程序的行为。 -* * * - ### 系列文章索引 随着后面文章的发布,这些链接会逐渐生效。 -1.  [准备环境][3] - +1. [准备环境][3] 2. [断点][4] - 3. [寄存器和内存][5] - 4. [Elves 和 dwarves][6] - 5. [源码和信号][7] - 6. [源码级逐步执行][8] - 7. 源码级断点 - 8. 调用栈展开 - 9. 读取变量 - 10. 下一步 -* * * - ### 注册我们的寄存器 -在我们真正读取任何寄存器之前,我们需要告诉调试器一些关于我们的目标,也就是 x86_64 的信息。除了多组通用和专用目的寄存器,x86_64 还提供浮点和向量寄存器。为了简化,我将跳过后两种寄存器,但是你如果喜欢的话也可以选择支持它们。x86_64 也允许你像访问 32、16 或者 8 位寄存器那样访问一些 64 位寄存器,但我只会介绍 64 位寄存器。由于这些简化,对于每个寄存器我们只需要它的名称,它的 DWARF 寄存器编号以及 `ptrace` 返回结构体中的存储地址。我使用范围枚举引用这些寄存器,然后我列出了一个全局寄存器描述符数组,其中元素顺序和 `ptrace` 中寄存器结构体相同。 +在我们真正读取任何寄存器之前,我们需要告诉调试器一些关于我们的目标平台的信息,这里是 x86_64 平台。除了多组通用和专用目的寄存器,x86_64 还提供浮点和向量寄存器。为了简化,我将跳过后两种寄存器,但是你如果喜欢的话也可以选择支持它们。x86_64 也允许你像访问 32、16 或者 8 位寄存器那样访问一些 64 位寄存器,但我只会介绍 64 位寄存器。由于这些简化,对于每个寄存器我们只需要它的名称、它的 DWARF 寄存器编号以及 `ptrace` 返回结构体中的存储地址。我使用范围枚举引用这些寄存器,然后我列出了一个全局寄存器描述符数组,其中元素顺序和 `ptrace` 中寄存器结构体相同。 ``` enum class reg { @@ -88,7 +75,7 @@ const std::array g_register_descriptors {{ 如果你想自己看看的话,你通常可以在 `/usr/include/sys/user.h` 找到寄存器数据结构,另外 DWARF 寄存器编号取自 [System V x86_64 ABI][11]。 -现在我们可以编写一堆函数来和寄存器交互。我们想要读取寄存器、写入数据、根据 DWARF 寄存器编号获取值,以及通过名称查找寄存器,反之类似。让我们先从实现 `get_register_value` 开始: +现在我们可以编写一堆函数来和寄存器交互。我们希望可以读取寄存器、写入数据、根据 DWARF 寄存器编号获取值,以及通过名称查找寄存器,反之类似。让我们先从实现 `get_register_value` 开始: ``` uint64_t get_register_value(pid_t pid, reg r) { @@ -100,7 +87,7 @@ uint64_t get_register_value(pid_t pid, reg r) { `ptrace` 使得我们可以轻易获得我们想要的数据。我们只需要构造一个 `user_regs_struct` 实例并把它和 `PTRACE_GETREGS` 请求传递给 `ptrace`。 -现在取决于被请求的寄存器,我们想要读取 `regs`。我们可以写一个很大的 switch 语句,但由于我们 `g_register_descriptors` 表的布局顺序和 `user_regs_struct` 相同,我们只需要搜索寄存器描述符的索引,然后作为 `uint64_t` 数组访问 `user_regs_struct`。[1][9] +现在根据要请求的寄存器,我们要读取 `regs`。我们可以写一个很大的 switch 语句,但由于我们 `g_register_descriptors` 表的布局顺序和 `user_regs_struct` 相同,我们只需要搜索寄存器描述符的索引,然后作为 `uint64_t` 数组访问 `user_regs_struct` 就行。(你也可以重新排序 `reg` 枚举变量,然后使用索引把它们转换为底层类型,但第一次我就使用这种方式编写,它能正常工作,我也就懒得改它了。) ``` auto it = std::find_if(begin(g_register_descriptors), end(g_register_descriptors), @@ -109,9 +96,9 @@ uint64_t get_register_value(pid_t pid, reg r) { return *(reinterpret_cast(®s) + (it - begin(g_register_descriptors))); ``` -到 `uint64_t` 的转换是安全的,因为 `user_regs_struct` 是一个标准布局类型,但我认为指针算术技术上是未定义的行为(undefined behavior)。当前没有编译器会对此产生警告,我也懒得修改,但是如果你想保持最严格的正确性,那就写一个大的 switch 语句。 +到 `uint64_t` 的转换是安全的,因为 `user_regs_struct` 是一个标准布局类型,但我认为指针算术技术上是未定义的行为undefined behavior。当前没有编译器会对此产生警告,我也懒得修改,但是如果你想保持最严格的正确性,那就写一个大的 switch 语句。 -`set_register_value` 非常类似,我们只是写入到地址并在最后写回寄存器: +`set_register_value` 非常类似,我们只是写入该位置并在最后写回寄存器: ``` void set_register_value(pid_t pid, reg r, uint64_t value) { @@ -166,12 +153,10 @@ void debugger::dump_registers() { } ``` -正如你看到的,iostreams 有非常精确的接口用于美观地输出十六进制数据[2][10]。如果你喜欢你也可以通过 I/O 操纵器来摆脱这种混乱。 +正如你看到的,iostreams 有非常精确的接口用于美观地输出十六进制数据(啊哈哈哈哈哈哈)。如果你喜欢你也可以通过 I/O 操纵器来摆脱这种混乱。 这些已经足够支持我们在调试器接下来的部分轻松地处理寄存器,所以我们现在可以把这些添加到我们的用户界面。 -* * * - ### 显示我们的寄存器 这里我们要做的就是给 `handle_command` 函数添加一个命令。通过下面的代码,用户可以输入 `register read rax`、 `register write rax 0x42` 以及类似的语句。 @@ -191,7 +176,6 @@ void debugger::dump_registers() { } ``` -* * * ### 接下来做什么? @@ -225,13 +209,11 @@ void debugger::write_memory(uint64_t address, uint64_t value) { } ``` -* * * - ### 给  `continue_execution` 打补丁 在我们测试我们的更改之前,我们现在可以实现一个更健全的 `continue_execution` 版本。由于我们可以获取程序计数器,我们可以检查我们的断点映射来判断我们是否处于一个断点。如果是的话,我们可以停用断点并在继续之前跳过它。 -为了清晰和简洁,首先我们要添加一些帮助函数: +为了清晰和简洁起见,首先我们要添加一些帮助函数: ``` uint64_t debugger::get_pc() { @@ -288,11 +270,9 @@ void debugger::continue_execution() { } ``` -* * * - ### 测试效果 -现在我们可以读取和修改寄存器了,我们可以对我们的 hello world 程序做一些有意思的更改。类似第一次测试,再次尝试在 call 指令处设置断点然后从那里继续执行。你可以看到输出了 `Hello world`。现在是有趣的部分,在输出调用后设一个断点、继续、将 call 参数设置代码的地址写入程序计数器(`rip`) 并继续。由于程序计数器操纵,你应该再次看到输出了 `Hello world`。为了以防你不确定在哪里设置断点,下面是我上一篇博文中的 `objdump` 输出: +现在我们可以读取和修改寄存器了,我们可以对我们的 hello world 程序做一些有意思的更改。类似第一次测试,再次尝试在 `call` 指令处设置断点然后从那里继续执行。你可以看到输出了 `Hello world`。现在是有趣的部分,在输出调用后设一个断点、继续、将 `call` 参数设置代码的地址写入程序计数器(`rip`)并继续。由于程序计数器操纵,你应该再次看到输出了 `Hello world`。为了以防你不确定在哪里设置断点,下面是我上一篇博文中的 `objdump` 输出: ``` @@ -313,18 +293,12 @@ void debugger::continue_execution() { 在下一篇博客中,我们会第一次接触到 DWARF 信息并给我们的调试器添加一系列逐步调试的功能。之后,我们会有一个功能工具,它能逐步执行代码、在想要的地方设置断点、修改数据以及其它。一如以往,如果你有任何问题请留下你的评论! 你可以在[这里][13]找到这篇博文的代码。 - -* * * - -1. 你也可以重新排序 `reg` 枚举变量,然后使用索引把它们转换为底层类型,但第一次我就使用这种方式编写,它能正常工作,我也就懒得改它了。 [↩][1] - -2. Ahahahahahahahahahahahahahahahaha [↩][2] - + -------------------------------------------------------------------------------- via: https://blog.tartanllama.xyz/c++/2017/03/31/writing-a-linux-debugger-registers/ -作者:[ TartanLlama ][a] +作者:[Simon Brand][a] 译者:[ictlyh](https://github.com/ictlyh) 校对:[jasminepeng](https://github.com/jasminepeng) From d79fe3522bdb9ae9588f442d4bc91180c775ee61 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 3 Jul 2017 23:43:19 +0800 Subject: [PATCH 031/100] PRF&PUB:20170620 Debian armhf VM on arm64 server.md @geekpi --- ...0170620 Debian armhf VM on arm64 server.md | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) rename {translated/tech => published}/20170620 Debian armhf VM on arm64 server.md (51%) diff --git a/translated/tech/20170620 Debian armhf VM on arm64 server.md b/published/20170620 Debian armhf VM on arm64 server.md similarity index 51% rename from translated/tech/20170620 Debian armhf VM on arm64 server.md rename to published/20170620 Debian armhf VM on arm64 server.md index 4ce4ed5310..b5a300770e 100644 --- a/translated/tech/20170620 Debian armhf VM on arm64 server.md +++ b/published/20170620 Debian armhf VM on arm64 server.md @@ -1,27 +1,25 @@ -# arm64 服务器中的 Debian armhf 虚拟机 +arm64 服务器中的 Debian armhf 虚拟机 +============= - -在 Collabora,我们所做的许多工作之一就是为客户构建包括 32 位和 64 位 ARM 系统在内的各种架构的 [Debian][1] 衍生版。就像 Debian 做的那样,我们的 [OBS][2] 系统建立在原生系统而不是仿真器上。 +在 Collabora 公司,我们所做的许多工作之一就是为客户构建包括 32 位和 64 位 ARM 系统在内的各种架构的 [Debian][1] 衍生版。就像 Debian 做的那样,我们的 [OBS][2] 系统建立在原生系统而不是仿真器上。 幸运的是随着几年前 ARM 服务器系统的出现,为这些系统原生构建不再像以前那么痛苦了。对于 32 位的 ARM,我们一直依赖 [Calxeda][3] 刀片服务器,然而不幸的是 Calxeda 在不久前淘汰,硬件开始显露其年龄(尽管幸运的是 Debian Stretch 还支持它,因此至少软件还是新的)。 -在 64 位 ARM 方面,我们运行在基于 Gigabyte MP30-AR1 的服务器上,该服务器可以运行 32 位的 ARM 代码(与之相反,比如基于 ThunderX 的服务器只能运行 64 位代码)。像这样在它们之上运行 armhf 虚拟机作为从构建服务器似乎是一个很好的选择,但是设置起来可能会需要更多东西的介入。 +在 64 位 ARM 方面,我们运行在基于 Gigabyte MP30-AR1 的服务器上,该服务器可以运行 32 位的 ARM 代码(与之相反,比如基于 ThunderX 的服务器只能运行 64 位代码)。像这样在它们之上运行 armhf 虚拟机作为从构建服务器(build slaves)似乎是一个很好的选择,但是设置起来可能会需要更多东西的介入。 第一个陷阱是 Debian 中没有标准的 bootloader 或者 boot 固件来启动 qemu 仿真的 “virt” 设备(我不想使用真实机器的仿真)。这也意味着在启动时客户机内没有任何东西会加载内核,也不会从客户机网络引导,这意味着需要直接的内核引导。 -第二个陷进是当前的 Debian Stretch armhf 内核并不支持 qemu 虚拟机暴露的通用 PCI 主机控制器,这意味着客户机中不会出现存储器和网络。希望这会被尽快解决([Debian bug 864726][4]),并会出现在 Stretch 更新中,那在之前需要使用 bug 报告中附带的补丁的自定义内核,但在这篇文章中我不想进一步说。 +第二个陷阱是当前的 Debian Stretch 的 armhf 内核并不支持 qemu 虚拟机所提供的通用 PCI 主机控制器,这意味着客户机中不会出现存储器和网络。希望这会被尽快解决([Debian bug 864726][4]),并出现在 Stretch 更新中,那在之前需要使用 bug 报告中附带的补丁的自定义内核,但在这篇文章中我不想进一步说。 -高兴的假设我们有一个可用的内核,剩下的挑战是很好地管理直接内核加载。或者更具体地说,如何确保主机通过标准 apt 工具来启动客户机安装的内核,而不必在客户机/主机之间复制内核,这本质上归结于客户机暴露 /boot 给主机。我们选择的方案是使用 qemu 的 9pfs 支持从主机共享一个文件夹,并将其用作客户机的 /boot。对于 9p 文件夹,似乎需要 “mapped” 安全模式,因为 “none” 模式对 dpkg 有问题([Debian bug 864718] [5])。 +高兴的假设我们有一个可用的内核,剩下的挑战是很好地管理直接内核加载。或者更具体地说,如何确保主机启动客户机通过标准 apt 工具安装的内核,而不必在客户机/主机之间复制内核,这本质上归结于客户机将 `/boot` 暴露给主机。我们选择的方案是使用 qemu 的 9pfs 支持来从主机共享一个文件夹,并将其用作客户机的 `/boot`。对于 9p 文件夹,似乎需要 “mapped” 安全模式,因为 “none” 模式对 dpkg 有问题([Debian bug 864718] [5])。 由于我们使用 libvirt 作为我们的虚拟机管理器,剩下的事情就是如何将它们组合到一起。 -第一步是安装系统,基本和平常一样。可以直接引导进入由普通的 Stretch armhf netboot 安装程序提供的 vmlinuz 和 initrd.gz(下载到如 /tmp 中)。 整体设置是直接的,会有一些小的调整: +第一步是安装系统,基本和平常一样。可以直接引导进入由普通的 Stretch armhf netboot 安装程序提供的 `vmlinuz` 和 `initrd.gz`(下载到如 `/tmp` 中)。 设置整体来说很直接,会有一些小的调整: -* /srv/armhf-vm-boot 设置为 9p 共享文件夹(这个应该存在,并且由 libvirt-qemu 拥有),这之后会被用于共享 /boot。 - -* 用 root= 后面加上 VM 中的 root 分区,根据你的使用调整。 - -* 镜像文件使用 virtio 总线,这似乎不是默认的。 +* `/srv/armhf-vm-boot` 设置为 9p 共享文件夹(这个应该存在,并且由 libvirt-qemu 拥有),这之后会被用于共享 `/boot`。 +* 内核参数中在 `root=` 后面加上 VM 中的 root 分区,根据你的情况调整。 +* 镜像文件使用 virtio 总线,这似乎不是默认的。 除了这些调整,最后的示例命令与 virt-install 手册页中的相似。 @@ -32,19 +30,19 @@ virt-install --name armhf-vm --arch armv7l --memory 512 \ --boot=kernel=/tmp/vmlinuz,initrd=/tmp/initrd.gz,kernel_args="console=ttyAMA0,root=/dev/vda1" ``` -按照通常的方式运行安装。到最后安装程序可能会提示它不知道如何安装引导程序,这个没什么问题。只要在结束安装/重启之前,切换到 shell 并以某种方式将目标系统中的 /boot/vmlinuz 和 /boot/initrd.img 复制到主机中(比如 chroot 进入 /target 并在已安装的系统中使用 scp)。 这是必需的,因为安装程序不支持 9p,但是要启动系统,需要 initramfs 以及能够能够挂载根文件系统的模块,这由已安装的 initramfs 提供。这些完成后,安装就可以完成了。 +按照通常的方式运行安装。到最后安装程序可能会提示它不知道如何安装引导程序,这个没什么问题。只要在结束安装和重启之前,切换到 shell 并以某种方式将目标系统中的 `/boot/vmlinuz` 和 `/boot/initrd.img` 复制到主机中(比如 chroot 进入 `/target` 并在已安装的系统中使用 scp)。 这是必需的,因为安装程序不支持 9p,但是要启动系统,需要 initramfs 以及能够挂载根文件系统的模块,这由已安装的 initramfs 提供。这些完成后,安装就可以完成了。 接下来,引导已安装的系统。调整 libvirt 配置(比如使用 virsh 编辑并调整 xml)来使用从安装程序复制过来的内核以及 initramfs,而不只是使用它提供的。再次启动虚拟机,它应该就能愉快地进入安装的 Debian 系统中了。 -要在客户机完成,/boot 应该移动到共享的 9pfs 中,/boot 的新 fatab 条目看上去应该这样: +要在客户机这一侧完成,`/boot` 应该移动到共享的 9pfs 中,`/boot` 的新 fstab 条目看上去应该这样: ``` virtio-boot /boot 9p trans=virtio,version=9p2000.L,x-systemd.automount 0 0 ``` -有了这一步,这只是将 /boot 中的文件进入新的文件系统,并且客户机完成了(确保 vmlinuz/initrd.img 保持符号链接)。内核可以如常升级,并对主机可见。 +有了这一步,这只是将 `/boot` 中的文件混到新的文件系统里面,并且客户机完事了(确保 `vmlinuz`/`initrd.img` 保持符号链接)。内核可以如常升级,并对主机可见。 -这时对于主机端,有另外一个问题需要跨过,由于客户机使用 9p 映射安全模式,客户机的符号链接对主机而言将是普通的包含链接目标的文件。为了解决这个问题,我们在客户机启动前使用 libvirt qemu 的 hook 支持来设置合适的符号链接。作为一个例子,下面是我们最终使用的脚本(/etc/libvirt/hooks/qemu): +这时对于主机端,有另外一个问题需要跨过,由于客户机使用 9p 映射安全模式,客户机的符号链接对主机而言将是普通的包含链接目标的文件。为了解决这个问题,我们在客户机启动前使用 libvirt qemu 的 hook 支持来设置合适的符号链接。作为一个例子,下面是我们最终使用的脚本(`/etc/libvirt/hooks/qemu`): ``` vm=$1 @@ -63,17 +61,17 @@ ln -sf $(basename $(cat ${bootdir}/vmlinuz)) ${bootdir}/virtio-vmlinuz ln -sf $(basename $(cat ${bootdir}/initrd.img)) ${bootdir}/virtio-initrd.img ``` -有了这个,我们可以简单地定义 libvirt 使用 /srv/${vm}-boot/virtio-{vmlinuz,initrd.img} 作为机器的内核/initramfs,并且当 VM 启动时,它会自动获取客户机安装的最新内核/initramfs。 +有了这个,我们可以简单地定义 libvirt 使用 `/srv/${vm}-boot/virtio-{vmlinuz,initrd.img}` 作为机器的内核 / `initramfs`,并且当 VM 启动时,它会自动获取客户机安装的最新内核 / `initramfs`。 -只有最后一个边缘情况存在,当从 VM libvirt 重启会让 qemu 处理它而不是重启 qemu。这不幸如果发生的话,这意味着重启不会加载新内核。所以现在我们通过配置 libvirt 来解决这个问题,从而在重启时停止虚拟机。由于我们通常只在升级内核(安装)时重启 VM,虽然这有点乏味,但这避免了重启加载的是旧内核/initramfs 而不是预期的。 +只有最后一个边缘情况了,当从 VM libvirt 重启会让 qemu 处理它而不是重启 qemu。如果这不幸发生的话,意味着重启不会加载新内核。所以现在我们通过配置 libvirt 来解决这个问题,从而在重启时停止虚拟机。由于我们通常只在升级内核(安装)时重启 VM,虽然这有点乏味,但这避免了重启加载的是旧内核 / `initramfs` 而不是预期的。 -------------------------------------------------------------------------------- via: https://www.collabora.com/news-and-blog/blog/2017/06/20/debian-armhf-vm-on-arm64-server/ -作者:[ Sjoerd Simons][a] +作者:[Sjoerd Simons][a] 译者:[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/) 荣誉推出 From db84abeca40b45f245e97c3a22d760d77533a871 Mon Sep 17 00:00:00 2001 From: XYenChi <466530436@qq.com> Date: Tue, 4 Jul 2017 08:04:09 +0800 Subject: [PATCH 032/100] translated --- ...puppy The hidden costs of free software.md | 64 ------------------- ...puppy The hidden costs of free software.md | 64 +++++++++++++++++++ 2 files changed, 64 insertions(+), 64 deletions(-) delete mode 100644 sources/talk/20170213 Free as in puppy The hidden costs of free software.md create mode 100644 translated/20170213 Free as in puppy The hidden costs of free software.md diff --git a/sources/talk/20170213 Free as in puppy The hidden costs of free software.md b/sources/talk/20170213 Free as in puppy The hidden costs of free software.md deleted file mode 100644 index e3c066d6f2..0000000000 --- a/sources/talk/20170213 Free as in puppy The hidden costs of free software.md +++ /dev/null @@ -1,64 +0,0 @@ -Free as in puppy: The hidden costs of free software -============================================================ - - ![Free as in puppy: The hidden costs of free software](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/osdc_whitehurst_money.png?itok=Xqow4bzq "Free as in puppy: The hidden costs of free software") -Image by : opensource.com - -We're used to hearing of software being described as "free as in freedom" and "free as in beer." But there's another kind of "free" that doesn't get talked about as much: "free as in puppy." This concept is based around the idea that when someone gives you a free puppy, that puppy isn't really free. There's a lot of work and expenses that go into its daily care. The business term is "total cost of ownership," or TCO, and it applies to anything, not just open source software and puppies. - -So if the free puppy problem applies to everything, how is it important to open source software specifically? There are a few ways. First, if you're already paying for software, then you've set the expectation that it has costs. Software that's free up front but costs money later seems like a major imposition. Secondly, if it happens on an organization's first open source adoption project, it can put the organization off of adopting open source software in the future. Lastly and counterintuitively, showing that open source software has a cost may make it an easier "sell." If it's truly no cost, it seems too good to be true. - -The following sections represent common areas for software costs to sneak in. This is by no means a comprehensive list. - -### Setup costs - -To begin using software, you must first have the software. - -* **Software:** Just because it's open source doesn't necessarily mean it's _gratis_. -* **Hardware:** Consider the requirements of the software. If you don't have the hardware that (this could be server hardware or client hardware) you need to use the software, you'll need to buy it. -* **Training:** Software is rarely completely intuitive. The choice is to get training or figure it out on your own. -* **Implementation** Getting all of the pieces in the same room is only the start. Now, it's time to put the puzzle together. - - * **Installation and configuration:** At a minimum this will take some staff time. If it's a big project, you may need to pay a systems integrator or some other vendor to do this. - * **Data import:** If you're replacing an existing system, there is data to move into a new home. In a happy world where everything complies with the same standard, this is not a problem. In many cases, though, it may be necessary to write some scripts to extract and reload data. - * **Interfaces with other systems:** Speaking of writing scripts, does this software tie in nicely with other software you use (for example, your directory service or your payroll software)? - * **Customization:** If the software doesn't meet all of your needs out of the box, it may need to be customized. You can do that, but it still requires effort and maybe some materials. -* **Business changes:** This new software will probably change how your organization does something—hopefully for the better. However, the shift isn't free. For example, productivity may dip initially as staff get used to the new software. - -### Operational costs - -Getting the software installed is the easy part. Now you have to use it. - -* **More training:** What, did you think we were done with this? Over time, new people will probably join your organization and they will also need to learn how to use the software, or a new release will come out that adds additional functionality. -* **Maintenance:** - - * **Subscription:** Some software provides updates via a paid subscription. - * **Patches:** Depending on the nature of the software, there may be some effort in applying patches. This includes both testing and deployment. - * **Development:** Did you make any customizations yourself? Now you have to maintain those forever. -* **Support:** Someone has to fix it when it goes wrong, and whether that's a vendor or your own team, there's a real cost. -* **Good citizenship:** This one isn't a requirement, but if you're using open source software, it would be nice if you gave back somehow. This might be code contributions, providing support on the mailing list, sponsoring the annual conference, etc. -* **Business benefits:** Okay, so this isn't a cost, but it can offset some of the costs. What does using this software mean for your organization? If it enables you to manufacture widgets with 25% less waste, then that's valuable. To provide another example, maybe it helps you increase repeat contributions to your nonprofit by 30%. - -Even with a list like this, it takes a lot of imagination to come up with all of the costs. Getting the values right requires some experience and a lot of good guessing, but just going through the process helps make it more clear. Much like with a puppy, if you know what you're getting yourself into up front, it can be a rewarding experience. - --------------------------------------------------------------------------------- - -作者简介: - -Ben Cotton - Ben Cotton is a meteorologist by training and a high-performance computing engineer by trade. Ben works as a technical evangelist at Cycle Computing. He is a Fedora user and contributor, co-founded a local open source meetup group, and is a member of the Open Source Initiative and a supporter of Software Freedom Conservancy. Find him on Twitter (@FunnelFiasco) - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/17/2/hidden-costs-free-software - -作者:[Ben Cotton ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/bcotton -[1]:https://opensource.com/article/17/2/hidden-costs-free-software?rate=gXfsYPWiIQNslwJ3zOAje71pTMRhp25Eo0HTdLWOKv4 -[2]:https://opensource.com/user/30131/feed -[3]:https://opensource.com/article/17/2/hidden-costs-free-software#comments -[4]:https://opensource.com/users/bcotton diff --git a/translated/20170213 Free as in puppy The hidden costs of free software.md b/translated/20170213 Free as in puppy The hidden costs of free software.md new file mode 100644 index 0000000000..64c3f8cb1f --- /dev/null +++ b/translated/20170213 Free as in puppy The hidden costs of free software.md @@ -0,0 +1,64 @@ +幼犬式免费:免费软件中的无形消费 +============================================================ + + ![幼犬式免费:免费软件中的无形消费](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/osdc_whitehurst_money.png?itok=Xqow4bzq "幼犬式免费: 免费软件中的无形消费") +Image by : opensource.com + +我们习惯于软件被描述为“自由式免费”和“啤酒式免费”。但还有另一种不常被提起的“免费”——“幼犬式免费”。这个概念来自于当别人送你一只免费的小狗,但那只小狗不是真的免费。日常照顾它需要花费大量精力与金钱。商业术语是“所有权的总花费”,或 TCO (总体拥有成本),这适用于所有场景,不仅仅是开源软件和小狗。 + +既然免费小狗问题适用于所有事,那么它是如何对于开源软件特别重要的呢?有一些解释。首先,如果你已经购买了软件,就会因为消费对它设定期望值。软件起初免费后来收费似乎是主要的无理要求。其次,如果这发生在一个组织首次采用开源项目的时候,就会阻碍该组织下一次采用开源项目。最终且违反直觉的是,表明开源软件需要消费可能使得它更轻易“卖出”,如果它真的免费,未免也太好了一点。 + +接下来的部分是软件消费渐显的共同之处。这绝不是一个详尽的列表。 + +### 起始消费 + +开始使用软件之前,你必须首先拥有这个软件。 + +* **软件:** 只因为它开源不一定意味着它是_免费的_. +* **硬件:** 考虑到软件的需求。如果你没有使用软件所需的硬件(可能是服务器硬件或者客户端硬件),你得买 +* **培训:** 很少有软件完全直白如话的。在于你是选择培训还是自己弄清楚。 +* **实战** 把所有零部件放在一起只是开始,现在,是时候把所有难题放在一起了。 + + * **安装和配置:** 至少这将花费一些员工的工作时间。如果这是一个大项目,你可能需要花钱请一个系统整合者或者其他供应商来做这件事。 + * **数据导入:** 如果要取代现成的系统,存在数据搬家的问题。皆大欢喜的是所有都是相同标准编译的,这样就没什么问题。然而在很多情况,需要写一些脚本来提取和重载数据。 + * **其他系统的接口:** 说到写脚本,这个软件能和你使用的其他软件(例如,词典服务或者工资单软件)很好联系起来吗? + * **定制:** 如果原本的软件不能满足你所有的需求,那它可能需要定制。你可以做到,但是仍需要努力或者是一些原材料。 +* **营业额变化:** 当你的组织希望有所改善时,新软件也会变化。然而这种转换不是免费的。例如,生产效率刚开始可能会下降因为员工还在适应新软件。 + +### 经营成本 + +安装软件是简单部分,现在你得使用它。 + +* **更多培训:** 什么, 你认为我们已经做好这了? 过段时间,你的组织会加入信任,他们需要学习如何使用这个软件,或者说是添加了额外功能的新发行版软件出版了。 +* **维护:** + + * **会员费:** 有些软件通过收取会员费来提供更新。 + * **补丁:**取决于软件的天性,打补丁需要费很多功夫。包括测试和调度。 + * **发展:**你自己做所有定制吗?现在你得永远保持这样了。、 +* **支持:** 当它坏了得有人来修,无论是供应商还是自己的团队,确实需要一笔花费。 +* **好身份:** 这个不是必需品,但如果你在使用开源软件,无论如何给一些回馈是非常好的。比如代码贡献、在邮件列表提供支持、赞助年度会议等等。 +* **商业利益:** 好吧,这不是一个付费项,而且它抵消了一些费用。使用软件对你的组织意味着什么呢?如果它使得量产产品减少了 25% 的浪费,这就是价值。再换个例子,它可能帮助你减少 30% 不盈利部分。 + +这样例子数不胜数,确实需要一定想象力来想出所有的花费。算出正确的价值需要一些实验和大量的的优质客户,但只是经历过程的话会使得它更加清晰。就好像一只小狗狗,如果预先知道自己会付出多少,这可能会是一个有价值的实验。 + +-------------------------------------------------------------------------------- + +作者简介: + +Ben Cotton - Ben Cotton 是一个培训过的气象学家和一个职业的高效计算机工程师。 Ben 在 Cycle Computing 做技术传教士.他是 Fedora 用户和贡献者, 合作创办当地的一个开源集会,是一名开源倡议者和软件自由机构的支持者。他的推特 (@FunnelFiasco) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/17/2/hidden-costs-free-software + +作者:[Ben Cotton ][a] +译者:[XYenChi](https://github.com/XYenChi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/bcotton +[1]:https://opensource.com/article/17/2/hidden-costs-free-software?rate=gXfsYPWiIQNslwJ3zOAje71pTMRhp25Eo0HTdLWOKv4 +[2]:https://opensource.com/user/30131/feed +[3]:https://opensource.com/article/17/2/hidden-costs-free-software#comments +[4]:https://opensource.com/users/bcotton From a73305746f5e05caaaf1e60d0fdb6fb7737e94f0 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 4 Jul 2017 08:49:23 +0800 Subject: [PATCH 033/100] translated --- ...How-to Ubuntu 17.04 GNOME and Chrome OS.md | 87 ------------------- ...How-to Ubuntu 17.04 GNOME and Chrome OS.md | 85 ++++++++++++++++++ 2 files changed, 85 insertions(+), 87 deletions(-) delete mode 100644 sources/tech/20170623 Chromebook Dual Boot How-to Ubuntu 17.04 GNOME and Chrome OS.md create mode 100644 translated/tech/20170623 Chromebook Dual Boot How-to Ubuntu 17.04 GNOME and Chrome OS.md diff --git a/sources/tech/20170623 Chromebook Dual Boot How-to Ubuntu 17.04 GNOME and Chrome OS.md b/sources/tech/20170623 Chromebook Dual Boot How-to Ubuntu 17.04 GNOME and Chrome OS.md deleted file mode 100644 index ef96a3d536..0000000000 --- a/sources/tech/20170623 Chromebook Dual Boot How-to Ubuntu 17.04 GNOME and Chrome OS.md +++ /dev/null @@ -1,87 +0,0 @@ -translating---geekpi - -Chromebook Dual Boot How-to: Ubuntu 17.04 GNOME and Chrome OS -============================================================ - - -### This tutorial uses the famous Crouton installer - - -Last year when I got my Acer Chromebook 11 (C740), I wrote a tutorial to teach you guys how to [remove Google Chrome OS and install a GNU/Linux distribution][1] of your choice, but things got boring. - -So after a few months, I reinstalled Chrome OS using a recovery image that Google provides on their website for this sort of things, which I wrote on a USB flash drive and booted from my Chromebook. Recently, I got bored again, and so I decided to install Ubuntu on my Acer Chromebook 11 (C740) using Crouton. - -Why? Because of a friend who came one day at a meeting we had with his laptop, a Dell Chromebook 13, on which he ran Ubuntu Linux alongside Chrome OS. It was really cool to see him switch so easily between the two operating systems with a simple keyboard shortcut that it made me wanna do the same. - -There are a lot of tutorials out there explaining how to install various releases of Ubuntu, Debian or  Kali Linux (these are the GNU/Linux distros currently supported by the Crouton installer), but I wanted to run the latest Ubuntu release, Ubuntu 17.04 (Zesty Zapus) in this case, with the GNOME 3.24 desktop environment. - -How to enable Developer Mode and download Crouton - -When I asked my friend which Ubuntu version is he running on his Chromebook, the answer was Ubuntu 14.04 LTS (Trusty Tahr), which I have to admit that it disappointed me. Immediately when I got home, I got my Chromebook and tried to see if I could run Ubuntu 17.04, with the GNOME desktop environment. - -The first thing I did was to put my Chromebook in Developer Mode. To do that, you'll have to shut down your Chromebook without closing the lid, then hold the ESC, Refresh and Power buttons at the same time for a few seconds until you enter recovery mode, which will wipe all the data on your Chromebook. - -It will take a few minutes to enter Developer Mode so be patient. When it's ready, you'll have to log in with your Google account and set various things like wallpaper or your avatar the way it was before. Now that you are in Developer Mode, access this tutorial on your Chromebook and [download Crouton][2], which will be saved in the Downloads folder. - -How to install Ubuntu 17.04 with GNOME 3.24 using Crouton - -Now, open Google Chrome and press CTRL+ALT+T to open the Chrome OS' terminal emulator, which is called crosh. At the command-line prompt, type the "shell" command (without quotes) and press Enter to access the Linux shell. Let's see what Crouton can do for us now. - -There are two commands (listed below) that you can run to see which GNU/Linux distributions and desktop environments Crouton supports, and we can tell you that it's possible to install Debian 7 "Wheezy", Debian 8 "Jessie", Debian 9 "Stretch" and Debian Sid, Kali Linux Rolling, as well as Ubuntu 12.04 LTS, Ubuntu 14.04 LTS, and Ubuntu 16.04 LTS. - -`sh -e /Downloads/crouton -r list -  _will list supported distros_ -sh -e /Downloads/crouton -t list -  _will list supported desktops_` - -Crouton will also list a bunch of older releases of Debian, Kali and Ubuntu, which are upstream end-of-life (all of them being marked with an exclamation mark after their name) and which you should not install because of security risks, as well as two unsupported versions of Ubuntu, namely Ubuntu 16.10 and Ubuntu 17.04. - -The developers of Crouton say that these "unsupported" Ubuntu release may work with some effort, but I took my chance and installed Ubuntu 17.04 (Zesty Zapus) with the GNOME 3.24 desktop environment (without any extra apps) using the following command. I put the "-e" parameter to encrypt the installation. - -`sh -e /Downloads/crouton -e -r zesty -t gnome` - -It will take a few minutes for everything to be downloaded and installed in the chrooted environment that Crouton will create inside your Chromebook so, again, be patient. When it's done, you'll know it, and you'll be able to start Ubuntu 17.04 with GNOME by running the following command at the shell prompt. - -`sudo startgnome` - -And voila! I'm running Ubuntu 17.04 (Zesty Zapus) with the GNOME 3.24 desktop environment on my old Acer Chromebook 11 (C740), which Google is yet to support with Android apps. The best part is that I can easily switch between Chrome OS and Ubuntu 17.04 using the CTRL+ALT+Shift+Back/Forward keyboard shortcuts. - -As an ending note, I would like to bring to your attention that because your Chromebook is now always in Developer Mode, you will always see a warning screen saying "OS verification is OFF - Press SPACE to re-enable" when the battery dies or you shut down and turn on the device, so press CTRL+D when you see that screen to boot. Have fun! - -[Ubuntu 17.04][9] -[GNOME 3.24][10] -[Chromebook][11] -[Acer Chrombook 11][12] -[Linux][13] - -### Ubuntu 17.04 on Acer Chrombook 11 (4 Images) - - [![Ubuntu 17.04 with GNOME 3.24 running on Acer Chromebook 11 (C740)](http://i1-news.softpedia-static.com/images/fitted/620x/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-2.jpg)][18] [![GNOME 3.24 desktop - System menu](http://i1-news.softpedia-static.com/images/newsrsz/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-3.jpg)][14] [![GNOME 3.24 desktop - Calendar applet](http://i1-news.softpedia-static.com/images/newsrsz/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-4.jpg)][15] [![GNOME 3.24 desktop - Overview mode](http://i1-news.softpedia-static.com/images/newsrsz/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-5.jpg)][16] - --------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624.shtml - -作者:[ Marius Nestor ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/marius-nestor -[1]:http://news.softpedia.com/news/here-s-how-to-install-any-linux-operating-system-on-your-chromebook-506212.shtml -[2]:https://goo.gl/fd3zc -[3]:http://news.softpedia.com/editors/browse/marius-nestor -[4]:http://news.softpedia.com/news/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624.shtml# -[5]:https://share.flipboard.com/bookmarklet/popout?v=2&title=Chromebook+Dual+Boot+How-to%3A+Ubuntu+17.04+GNOME+and+Chrome+OS&url=http%3A%2F%2Fnews.softpedia.com%2Fnews%2Fhow-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624.shtml&t=1498358928&utm_campaign=widgets&utm_medium=web&utm_source=flipit&utm_content=news.softpedia.com -[6]:http://news.softpedia.com/news/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624.shtml# -[7]:http://twitter.com/intent/tweet?related=softpedia&via=mariusnestor&text=Chromebook+Dual+Boot+How-to%3A+Ubuntu+17.04+GNOME+and+Chrome+OS&url=http%3A%2F%2Fnews.softpedia.com%2Fnews%2Fhow-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624.shtml -[8]:https://plus.google.com/share?url=http://news.softpedia.com/news/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624.shtml -[9]:http://news.softpedia.com/newsTag/Ubuntu%2017.04 -[10]:http://news.softpedia.com/newsTag/GNOME%203.24 -[11]:http://news.softpedia.com/newsTag/Chromebook -[12]:http://news.softpedia.com/newsTag/Acer%20Chrombook%2011 -[13]:http://news.softpedia.com/newsTag/Linux -[14]:http://i1-news.softpedia-static.com/images/news2/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-3.jpg -[15]:http://i1-news.softpedia-static.com/images/news2/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-4.jpg -[16]:http://i1-news.softpedia-static.com/images/news2/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-5.jpg -[17]:https://twitter.com/intent/follow?screen_name=mariusnestor -[18]:http://i1-news.softpedia-static.com/images/news2/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-2.jpg diff --git a/translated/tech/20170623 Chromebook Dual Boot How-to Ubuntu 17.04 GNOME and Chrome OS.md b/translated/tech/20170623 Chromebook Dual Boot How-to Ubuntu 17.04 GNOME and Chrome OS.md new file mode 100644 index 0000000000..3c1fe4c790 --- /dev/null +++ b/translated/tech/20170623 Chromebook Dual Boot How-to Ubuntu 17.04 GNOME and Chrome OS.md @@ -0,0 +1,85 @@ +Chromebook 如何双启动:Ubuntu 17.04 GNOME 和 Chrome OS +============================================================ + + +### 本教程使用著名的 Crouton 安装器 + + +在去年我拿到我的 Acer Chromebook 11 (C740) 时,我写了一篇教程教你们如何[如何移除 Google Chrome OS 并根据你的选择安装一个 GNU/Linux 发行版][1],但是事情变得乏味了。 + +因此几个月之后,我使用了 Google 在网站上提供的恢复镜像重新安装了 Chrome OS,我写入了 USB 并从 Chromebook 启动。最近,我又感到发威了,因此我决定使用 Crouton 在我的 Acer Chromebook 11 (C740) 上安装 Ubuntu。 + +为什么?因为在一次会议中来的一位朋友带了他的笔记本,一台 Dell Chromebook 13, 在上面他运行了 Ubuntu Linux 还有 Chrome OS。看他用快捷键在两个操作系统之间切换很酷,这让我也想这么做。 + +现在有很多教程解释如何安装不同的发行版 Ubuntu、Debian 或者 Kali Linux(这些是当前 Crouton 安装器支持的 GNU/Linux 发行版),但是我想要运行最新的 Ubuntu,此处是 Ubuntu 17.04 (Zesty Zapus),它有 GNOME 3.24 桌面环境。 + +如何启用开发者模式并下载 Crouton + +当我询问我的朋友他在他的 Chromebook 上运行的是什么 Ubuntu 时,回答是 Ubuntu 14.04 LTS (Trusty Tahr),我不得不承认这让我有点失望。我回家后立刻拿出我的 Chromebook 并尝试看看我是否能运行带有桌面环境的 Ubuntu 17.04。 + +我做的第一件事情是将我的 Chromebook 变成开发者模式。为此,你需要关闭你的 Chromebook 并不关闭翻盖,接着同时按住 ESC、Refresh 和 Power 键几秒直到进入恢复模式,这会擦除 Chromebook 上的所有数据。 + +进入开发者模式会花费你分钟,所以耐心点。当准备完成后,你需要登录你的 Google 账户,并设置不同的东西,比如壁纸或者头像之类。现在你进入开发者模式了,在你的 Chromebook 中访问这篇教程并[下载 Crouton][2],它会保存在下载文件夹中。 + +如何使用 Crouton 安装带有 GNOME 3.24 的 Ubuntu 17.04 + +现在打开 Google Chrome 并按下 CTRL+ALT+T 打开 Chrome OS 的终端模拟器,它叫做 crosh。在命令提示符中,输入 “shell” 命令(没有引号),按下回车进入 Linux shell。让我们看看 Crouton 能为我们做什么。 + +这有两个命令(下面列出的),你可以运行它们查看 Crouton 支持的 GNU/Linux 发行版和桌面环境,并且我可以告诉你这有可能安装 Debian 7 “Wheezy”、Debian 8 “Jessie”、Debian 9 “Stretch” 和 Debian Sid、Kali Linux 滚动版还有 Ubuntu 12.04 LTS、Ubuntu 14.04 LTS 和 Ubuntu 16.04 LTS。 + +`sh -e /Downloads/crouton -r list -  _会列出支持发行版_ +sh -e /Downloads/crouton -t list -  _会列出支持的桌面_` + +Crouton 也会列出一系列 Debian、Kali 和 Ubuntu 旧的发行版,它们在上游中止支持了(这些的名字后面都被标记了感叹号),并且因为安全风险你不应该安装它们,还有两个不支持的 Ubuntu 版本,Ubuntu 16.10 和 Ubuntu 17.04。 + +Crouton 开发者说这些“不支持”的 Ubuntu 版本用一些方法可能也可以使用,但是我试了一下并使用下面的命令安装了带有 GNOME 3.24 桌面环境(没有额外的程序)的 Ubuntu 17.04 (Zesty Zapus)。我使用 “-e” 参数来加密安装。 + +`sh -e /Downloads/crouton -e -r zesty -t gnome` + +将所有的都下载下来并安装在 Crouton 在你的 Chromebook 中创建的 chroot 环境中会花费一些时间,因此再说一次,请耐心。当一切完成后,你会知道,并且你能通过在 shell 中运行下面的命令启动 Ubuntu 17.04。 + +`sudo startgnome` + +瞧!我在我的旧 Acer Chromebook 11 (C740) 上运行着带有 GNOME 3.24 桌面环境的 Ubuntu 17.04 (Zesty Zapus),这笔记本 Google 还尚未支持 Android 程序。最棒的部分是我能够使用 CTRL+ALT+Shift+向后/向前键盘快捷键快速在 Chrome OS 和 Ubuntu 17.04 之间切换。 + +作为结尾笔记,我想提醒你注意,由于 Chromebook 现在始终处于开发人员模式,所以当电池电量耗尽、打开或关闭设备时,你会一直看到一个警告,显示 “OS verification is OFF - Press SPACE to re-enable”,当你看到它时,请按 CTRL+D。玩得开心! + +[Ubuntu 17.04][9] +[GNOME 3.24][10] +[Chromebook][11] +[Acer Chrombook 11][12] +[Linux][13] + +### Acer Chrombook 11 上的 Ubuntu 17.04 (4 张图片) + + [![Ubuntu 17.04 with GNOME 3.24 running on Acer Chromebook 11 (C740)](http://i1-news.softpedia-static.com/images/fitted/620x/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-2.jpg)][18] [![GNOME 3.24 desktop - System menu](http://i1-news.softpedia-static.com/images/newsrsz/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-3.jpg)][14] [![GNOME 3.24 desktop - Calendar applet](http://i1-news.softpedia-static.com/images/newsrsz/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-4.jpg)][15] [![GNOME 3.24 desktop - Overview mode](http://i1-news.softpedia-static.com/images/newsrsz/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-5.jpg)][16] + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624.shtml + +作者:[ Marius Nestor ][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/marius-nestor +[1]:http://news.softpedia.com/news/here-s-how-to-install-any-linux-operating-system-on-your-chromebook-506212.shtml +[2]:https://goo.gl/fd3zc +[3]:http://news.softpedia.com/editors/browse/marius-nestor +[4]:http://news.softpedia.com/news/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624.shtml# +[5]:https://share.flipboard.com/bookmarklet/popout?v=2&title=Chromebook+Dual+Boot+How-to%3A+Ubuntu+17.04+GNOME+and+Chrome+OS&url=http%3A%2F%2Fnews.softpedia.com%2Fnews%2Fhow-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624.shtml&t=1498358928&utm_campaign=widgets&utm_medium=web&utm_source=flipit&utm_content=news.softpedia.com +[6]:http://news.softpedia.com/news/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624.shtml# +[7]:http://twitter.com/intent/tweet?related=softpedia&via=mariusnestor&text=Chromebook+Dual+Boot+How-to%3A+Ubuntu+17.04+GNOME+and+Chrome+OS&url=http%3A%2F%2Fnews.softpedia.com%2Fnews%2Fhow-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624.shtml +[8]:https://plus.google.com/share?url=http://news.softpedia.com/news/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624.shtml +[9]:http://news.softpedia.com/newsTag/Ubuntu%2017.04 +[10]:http://news.softpedia.com/newsTag/GNOME%203.24 +[11]:http://news.softpedia.com/newsTag/Chromebook +[12]:http://news.softpedia.com/newsTag/Acer%20Chrombook%2011 +[13]:http://news.softpedia.com/newsTag/Linux +[14]:http://i1-news.softpedia-static.com/images/news2/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-3.jpg +[15]:http://i1-news.softpedia-static.com/images/news2/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-4.jpg +[16]:http://i1-news.softpedia-static.com/images/news2/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-5.jpg +[17]:https://twitter.com/intent/follow?screen_name=mariusnestor +[18]:http://i1-news.softpedia-static.com/images/news2/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-2.jpg From 1dd700d4b630055cdbaa22e558f1e47954bd966d Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 4 Jul 2017 09:17:33 +0800 Subject: [PATCH 034/100] translating --- ...70609 Python 3.6 - install latest version into Linux Mint.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170609 Python 3.6 - install latest version into Linux Mint.md b/sources/tech/20170609 Python 3.6 - install latest version into Linux Mint.md index f17be7cd2e..dbe0b12482 100644 --- a/sources/tech/20170609 Python 3.6 - install latest version into Linux Mint.md +++ b/sources/tech/20170609 Python 3.6 - install latest version into Linux Mint.md @@ -1,3 +1,5 @@ +translating---geekpi + Python 3.6 - install latest version into Linux Mint ============================================================ From 55b6287b884ba6731e836e160dd6409b78c1df2b Mon Sep 17 00:00:00 2001 From: GHLandy Date: Tue, 4 Jul 2017 11:54:59 +0800 Subject: [PATCH 035/100] [Translating] 20170529 LFCS sed Command.md --- sources/tech/20170529 LFCS sed Command.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170529 LFCS sed Command.md b/sources/tech/20170529 LFCS sed Command.md index acd63d5b12..e281cb09f5 100644 --- a/sources/tech/20170529 LFCS sed Command.md +++ b/sources/tech/20170529 LFCS sed Command.md @@ -1,3 +1,5 @@ +GHLandy Translating + LFCS sed Command ===================== From 605863f3975f7d070f9a3385ca89f3c49fd64208 Mon Sep 17 00:00:00 2001 From: Ezio Date: Tue, 4 Jul 2017 13:23:54 +0800 Subject: [PATCH 036/100] =?UTF-8?q?=E7=A7=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...20170213 Free as in puppy The hidden costs of free software.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename translated/{ => talk}/20170213 Free as in puppy The hidden costs of free software.md (100%) diff --git a/translated/20170213 Free as in puppy The hidden costs of free software.md b/translated/talk/20170213 Free as in puppy The hidden costs of free software.md similarity index 100% rename from translated/20170213 Free as in puppy The hidden costs of free software.md rename to translated/talk/20170213 Free as in puppy The hidden costs of free software.md From a2b83532791a0613b904fab77942c5422de05c41 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 5 Jul 2017 08:49:52 +0800 Subject: [PATCH 037/100] translated --- ... install latest version into Linux Mint.md | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) rename {sources => translated}/tech/20170609 Python 3.6 - install latest version into Linux Mint.md (55%) diff --git a/sources/tech/20170609 Python 3.6 - install latest version into Linux Mint.md b/translated/tech/20170609 Python 3.6 - install latest version into Linux Mint.md similarity index 55% rename from sources/tech/20170609 Python 3.6 - install latest version into Linux Mint.md rename to translated/tech/20170609 Python 3.6 - install latest version into Linux Mint.md index dbe0b12482..45529479ba 100644 --- a/sources/tech/20170609 Python 3.6 - install latest version into Linux Mint.md +++ b/translated/tech/20170609 Python 3.6 - install latest version into Linux Mint.md @@ -1,50 +1,46 @@ -translating---geekpi - -Python 3.6 - install latest version into Linux Mint +Python 3.6 - 安装最新的版本到 Linux Mint 中 ============================================================ ![Python 3.6 - install latest version into Linux Mint](https://mintguide.org/uploads/posts/2017-06/1496865727_python-logo.png) -**Python** is one of the most popular programming languages for [Linux][3]. It is written many different tools and libraries. In addition, Python is popular among developers because it is very easy and quick programming, and it's actually simple to master. [][1]If you have installed the operating system [Linux mint][4], you are learning the programming language **Python** and want to work with the latest version, then this article is for you. -Now I have installed [Linux Mint 18][5].1 and the default installed version 2.7 and 3.5\. You can check this with commands +**Python** 是 [Linux][3] 中一种最流行的编程语言。它被写成了不同的工具和库。除此之外,Python 在开发者之间很流行因为它非常简单,并且实际很容易掌握。[][1]如果你安装了[Linux mint][4] 系统,另外你正在学习 **Python** 并想要使用最新的版本,那么这篇文章就是为你而写的。现在我已经安装了 [Linux Mint 18][5]。默认安装的版本是 2.7 和 3.5。你可以用这个命令检查: ``` TerminalShekin@mylinuxmintpc~$python -V python2 -V python3 -V ``` -**Installation latest Python 3.6 version into Linux Mint**: +**安装最新的 Python 3.6 到 Linux 中**: ``` TerminalShekin@mylinuxmintpc~$sudo add-apt-repository ppa:jonathonf/python-3.6 sudo apt update sudo apt install python3.6 ``` -Check the version of the installed Python 3.6 +检查已安装的 Python 3.6 版本 ``` TerminalShekin@mylinuxmintpc~$python3.6 -V ``` -**Please note** that the old version is still here, it still available by the name of **python3**and the new can now be loaded with the command **python3.6**. If you want to use this version instead of the 3.5 to run all the programs, there is a utility **update-alternatives**. But if you try to get a list of possibilities, we get the error: - [![Python 3.6 - install latest version into Linux Mint](https://mintguide.org/uploads/posts/2017-06/thumbs/1496871711_linux_mint_001.png)][6] This is normal, you need to first setup what files for that answer, because the maintainers did not care about it : +**请注意**旧版本仍然还在,它仍然可以通过 **python3** 可用,新的版本可以通过命令 **python3.6**。如果你想要使用这个版本而不是 3.5 运行所有的程序,这有个工具叫 **update-alternatives**。但是如果你尝试获取可能的列表,我们会得到错误: + [![Python 3.6 - install latest version into Linux Mint](https://mintguide.org/uploads/posts/2017-06/thumbs/1496871711_linux_mint_001.png)][6] 这是正常的,你首先需要为那个问题设置文件,因为维护者并不关心这个: ``` TerminalShekin@mylinuxmintpc~$sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1 sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2 ``` -Now look again: +现在再次查看: ``` TerminalShekin@mylinuxmintpc~$update-alternatives --list python3 ``` - [![Python 3.6 - install latest version into Linux Mint](https://mintguide.org/uploads/posts/2017-06/thumbs/1496871720_linux_mint_002.png)][7] Now we can choose the required version and switch as needed. For settings use the config command: + [![Python 3.6 - install latest version into Linux Mint](https://mintguide.org/uploads/posts/2017-06/thumbs/1496871720_linux_mint_002.png)][7] 现在我们选择需要的版本并按需切换。对于设置使用配置命令: ``` TerminalShekin@mylinuxmintpc~$sudo update-alternatives --config python3 ``` - [![Python 3.6 - install latest version into Linux Mint](https://mintguide.org/uploads/posts/2017-06/thumbs/1496871722_linux_mint_003.png)][8] In the prompt you need to specify the program number you want to use by default. -Be careful with a selection of versions, not to touch the python (python2), just use python3, as I said, Python 2.7 written in a variety of system tools, and if you try to run them the wrong version of the interpreter, then nothing happens.May the Force be with you, -Good Luck!!! + [![Python 3.6 - install latest version into Linux Mint](https://mintguide.org/uploads/posts/2017-06/thumbs/1496871722_linux_mint_003.png)][8] 在提示符中,你需要指定默认使用的编号。小心选择一个版本,不要按到 python(python2),只使用 python3,如我所说,Python 2.7 写了不同的系统工具,如果你尝试用错误的解释器版本运行,那么什么都不会发生。愿原力与你同在,好运!!! + [python.org][9] -------------------------------------------------------------------------------- @@ -52,7 +48,7 @@ Good Luck!!! via: https://mintguide.org/other/794-python-3-6-install-latest-version-into-linux-mint.html 作者:[ Shekin][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From cd971edc2f51e19cb16148ea96700842217ccc62 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 5 Jul 2017 08:54:30 +0800 Subject: [PATCH 038/100] translating --- .../tech/20170629 4 cool facts you should know about FreeDOS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170629 4 cool facts you should know about FreeDOS.md b/sources/tech/20170629 4 cool facts you should know about FreeDOS.md index 049ca57925..4a630da33c 100644 --- a/sources/tech/20170629 4 cool facts you should know about FreeDOS.md +++ b/sources/tech/20170629 4 cool facts you should know about FreeDOS.md @@ -1,3 +1,5 @@ +translating---geekpi + 4 cool facts you should know about FreeDOS ============================================================ From eceeba19cfed6319e02c9928e3beab3aaba41809 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 5 Jul 2017 13:07:07 +0800 Subject: [PATCH 039/100] PRF&PUB:20170609 Python 3.6 - install latest version into Linux Mint.md @geekpi --- ... install latest version into Linux Mint.md | 81 +++++++++++++++++++ ... install latest version into Linux Mint.md | 66 --------------- 2 files changed, 81 insertions(+), 66 deletions(-) create mode 100644 published/20170609 Python 3.6 - install latest version into Linux Mint.md delete mode 100644 translated/tech/20170609 Python 3.6 - install latest version into Linux Mint.md diff --git a/published/20170609 Python 3.6 - install latest version into Linux Mint.md b/published/20170609 Python 3.6 - install latest version into Linux Mint.md new file mode 100644 index 0000000000..411aadccba --- /dev/null +++ b/published/20170609 Python 3.6 - install latest version into Linux Mint.md @@ -0,0 +1,81 @@ +Linux 上如何安装并切换最新版本的 Python 3.6 +============================================================ + +![Python 3.6 - install latest version into Linux Mint](https://mintguide.org/uploads/posts/2017-06/1496865727_python-logo.png) + +**Python** 是 [Linux][3] 中一种最流行的编程语言。它被写成了各种工具和库。除此之外,Python 在开发者之间很流行因为它非常简单,并且实际很容易掌握。如果你安装了 [Linux mint][4] 系统,正在学习 **Python** 并想要使用最新的版本的话,那么这篇文章就是为你而写的。现在我已经安装好了 [Linux Mint 18][5]。默认安装的版本是 2.7 和 3.5。你可以用这个命令检查: + +``` +$ python -V +$ python2 -V +$ python3 -V +``` + +**安装最新的 Python 3.6 到 Linux 中**: + +``` +$ sudo add-apt-repository ppa:jonathonf/python-3.6 +$ sudo apt update +$ sudo apt install python3.6 +``` + +检查已安装的 Python 3.6 版本 + +``` +$ python3.6 -V +``` + +**请注意**旧版本仍然还在,它仍然可以通过 `python3` 可用,新的版本可以通过命令 `python3.6`。如果你想要默认使用这个版本而不是 3.5 运行所有的程序,这有个工具叫 `update-alternatives`。但是如果你尝试获取可能的列表,我们会得到错误: + +[![Python 3.6 - install latest version into Linux Mint](https://mintguide.org/uploads/posts/2017-06/thumbs/1496871711_linux_mint_001.png)][6] + +这是正常的,你首先需要为那个问题设置文件,因为维护者没有设置这个: + +``` +$ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1 +$ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2 +``` + +现在再次查看: + +``` +$ update-alternatives --list python3 +``` + +[![Python 3.6 - install latest version into Linux Mint](https://mintguide.org/uploads/posts/2017-06/thumbs/1496871720_linux_mint_002.png)][7] + +现在我们选择需要的版本并按需切换。对于设置使用配置命令: + +``` +$ sudo update-alternatives --config python3 +``` + +[![Python 3.6 - install latest version into Linux Mint](https://mintguide.org/uploads/posts/2017-06/thumbs/1496871722_linux_mint_003.png)][8] + +在提示符中,你需要指定默认使用的编号。 + +> 选择版本时要小心,不要去动 python(python2),只使用我说的 python3,Python 2.7 编写了各种系统工具,如果你尝试用错误的解释器版本运行它们,可能就不会工作。 + +愿原力与你同在,好运!!! + +-------------------------------------------------------------------------------- + +via: https://mintguide.org/other/794-python-3-6-install-latest-version-into-linux-mint.html + +作者:[Shekin][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://mintguide.org/user/Shekin/ +[1]:http://www.codeweavers.com/?ad=708 +[2]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly93d3cucHl0aG9uLm9yZw%3D%3D +[3]:https://mintguide.org/ +[4]:https://mintguide.org/ +[5]:https://mintguide.org/ +[6]:https://mintguide.org/uploads/posts/2017-06/1496871711_linux_mint_001.png +[7]:https://mintguide.org/uploads/posts/2017-06/1496871720_linux_mint_002.png +[8]:https://mintguide.org/uploads/posts/2017-06/1496871722_linux_mint_003.png +[9]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly93d3cucHl0aG9uLm9yZw%3D%3D +[10]:https://mintguide.org/other/ diff --git a/translated/tech/20170609 Python 3.6 - install latest version into Linux Mint.md b/translated/tech/20170609 Python 3.6 - install latest version into Linux Mint.md deleted file mode 100644 index 45529479ba..0000000000 --- a/translated/tech/20170609 Python 3.6 - install latest version into Linux Mint.md +++ /dev/null @@ -1,66 +0,0 @@ -Python 3.6 - 安装最新的版本到 Linux Mint 中 -============================================================ - - -![Python 3.6 - install latest version into Linux Mint](https://mintguide.org/uploads/posts/2017-06/1496865727_python-logo.png) -**Python** 是 [Linux][3] 中一种最流行的编程语言。它被写成了不同的工具和库。除此之外,Python 在开发者之间很流行因为它非常简单,并且实际很容易掌握。[][1]如果你安装了[Linux mint][4] 系统,另外你正在学习 **Python** 并想要使用最新的版本,那么这篇文章就是为你而写的。现在我已经安装了 [Linux Mint 18][5]。默认安装的版本是 2.7 和 3.5。你可以用这个命令检查: - -``` -TerminalShekin@mylinuxmintpc~$python -V -python2 -V -python3 -V -``` -**安装最新的 Python 3.6 到 Linux 中**: - -``` -TerminalShekin@mylinuxmintpc~$sudo add-apt-repository ppa:jonathonf/python-3.6 -sudo apt update -sudo apt install python3.6 -``` -检查已安装的 Python 3.6 版本 - -``` -TerminalShekin@mylinuxmintpc~$python3.6 -V -``` -**请注意**旧版本仍然还在,它仍然可以通过 **python3** 可用,新的版本可以通过命令 **python3.6**。如果你想要使用这个版本而不是 3.5 运行所有的程序,这有个工具叫 **update-alternatives**。但是如果你尝试获取可能的列表,我们会得到错误: - [![Python 3.6 - install latest version into Linux Mint](https://mintguide.org/uploads/posts/2017-06/thumbs/1496871711_linux_mint_001.png)][6] 这是正常的,你首先需要为那个问题设置文件,因为维护者并不关心这个: - -``` -TerminalShekin@mylinuxmintpc~$sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1 -sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2 -``` -现在再次查看: - -``` -TerminalShekin@mylinuxmintpc~$update-alternatives --list python3 -``` - [![Python 3.6 - install latest version into Linux Mint](https://mintguide.org/uploads/posts/2017-06/thumbs/1496871720_linux_mint_002.png)][7] 现在我们选择需要的版本并按需切换。对于设置使用配置命令: - -``` -TerminalShekin@mylinuxmintpc~$sudo update-alternatives --config python3 -``` - [![Python 3.6 - install latest version into Linux Mint](https://mintguide.org/uploads/posts/2017-06/thumbs/1496871722_linux_mint_003.png)][8] 在提示符中,你需要指定默认使用的编号。小心选择一个版本,不要按到 python(python2),只使用 python3,如我所说,Python 2.7 写了不同的系统工具,如果你尝试用错误的解释器版本运行,那么什么都不会发生。愿原力与你同在,好运!!! - -[python.org][9] - --------------------------------------------------------------------------------- - -via: https://mintguide.org/other/794-python-3-6-install-latest-version-into-linux-mint.html - -作者:[ Shekin][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://mintguide.org/user/Shekin/ -[1]:http://www.codeweavers.com/?ad=708 -[2]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly93d3cucHl0aG9uLm9yZw%3D%3D -[3]:https://mintguide.org/ -[4]:https://mintguide.org/ -[5]:https://mintguide.org/ -[6]:https://mintguide.org/uploads/posts/2017-06/1496871711_linux_mint_001.png -[7]:https://mintguide.org/uploads/posts/2017-06/1496871720_linux_mint_002.png -[8]:https://mintguide.org/uploads/posts/2017-06/1496871722_linux_mint_003.png -[9]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly93d3cucHl0aG9uLm9yZw%3D%3D -[10]:https://mintguide.org/other/ From 85ed8d8c449f98fb294d5ca7f86aadd24d436390 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 5 Jul 2017 13:26:05 +0800 Subject: [PATCH 040/100] PRF&PUB:20170623 Chromebook Dual Boot How-to Ubuntu 17.04 GNOME and Chrome OS.md @geekpi --- ...How-to Ubuntu 17.04 GNOME and Chrome OS.md | 60 ++++++++++--------- 1 file changed, 32 insertions(+), 28 deletions(-) rename {translated/tech => published}/20170623 Chromebook Dual Boot How-to Ubuntu 17.04 GNOME and Chrome OS.md (58%) diff --git a/translated/tech/20170623 Chromebook Dual Boot How-to Ubuntu 17.04 GNOME and Chrome OS.md b/published/20170623 Chromebook Dual Boot How-to Ubuntu 17.04 GNOME and Chrome OS.md similarity index 58% rename from translated/tech/20170623 Chromebook Dual Boot How-to Ubuntu 17.04 GNOME and Chrome OS.md rename to published/20170623 Chromebook Dual Boot How-to Ubuntu 17.04 GNOME and Chrome OS.md index 3c1fe4c790..f3b5ba45af 100644 --- a/translated/tech/20170623 Chromebook Dual Boot How-to Ubuntu 17.04 GNOME and Chrome OS.md +++ b/published/20170623 Chromebook Dual Boot How-to Ubuntu 17.04 GNOME and Chrome OS.md @@ -2,65 +2,69 @@ Chromebook 如何双启动:Ubuntu 17.04 GNOME 和 Chrome OS ============================================================ -### 本教程使用著名的 Crouton 安装器 +> 本教程使用著名的 Crouton 安装器 +![Ubuntu 17.04 with GNOME 3.24 running on Acer Chromebook 11 (C740)](http://i1-news.softpedia-static.com/images/news2/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-2.jpg) -在去年我拿到我的 Acer Chromebook 11 (C740) 时,我写了一篇教程教你们如何[如何移除 Google Chrome OS 并根据你的选择安装一个 GNU/Linux 发行版][1],但是事情变得乏味了。 +在去年我拿到我的 Acer Chromebook 11 (C740) 时,我写了一篇教程教你们如何[如何移除 Google Chrome OS 并根据你的选择安装一个 GNU/Linux 发行版][1],但是很快我觉得没意思了。 -因此几个月之后,我使用了 Google 在网站上提供的恢复镜像重新安装了 Chrome OS,我写入了 USB 并从 Chromebook 启动。最近,我又感到发威了,因此我决定使用 Crouton 在我的 Acer Chromebook 11 (C740) 上安装 Ubuntu。 +因此几个月之后,我使用了 Google 在网站上提供的恢复镜像重新安装了 Chrome OS,我写入了 USB 并从 Chromebook 启动。最近,我又感到无聊了,因此我决定使用 Crouton 在我的 Acer Chromebook 11 (C740) 上安装 Ubuntu。 -为什么?因为在一次会议中来的一位朋友带了他的笔记本,一台 Dell Chromebook 13, 在上面他运行了 Ubuntu Linux 还有 Chrome OS。看他用快捷键在两个操作系统之间切换很酷,这让我也想这么做。 +为什么?因为在一次会议中来的一位朋友带了他的笔记本,一台 Dell Chromebook 13,在上面他运行了 Ubuntu Linux 还有 Chrome OS。看他用快捷键在两个操作系统之间切换很酷,这让我也想这么做。 -现在有很多教程解释如何安装不同的发行版 Ubuntu、Debian 或者 Kali Linux(这些是当前 Crouton 安装器支持的 GNU/Linux 发行版),但是我想要运行最新的 Ubuntu,此处是 Ubuntu 17.04 (Zesty Zapus),它有 GNOME 3.24 桌面环境。 +现在有很多教程解释如何安装不同的发行版 Ubuntu、Debian 或者 Kali Linux(这些是当前 Crouton 安装器支持的 GNU/Linux 发行版),但是我想要运行最新的 Ubuntu,当前是 Ubuntu 17.04 (Zesty Zapus),它有 GNOME 3.24 桌面环境。 -如何启用开发者模式并下载 Crouton +### 如何启用开发者模式并下载 Crouton 当我询问我的朋友他在他的 Chromebook 上运行的是什么 Ubuntu 时,回答是 Ubuntu 14.04 LTS (Trusty Tahr),我不得不承认这让我有点失望。我回家后立刻拿出我的 Chromebook 并尝试看看我是否能运行带有桌面环境的 Ubuntu 17.04。 -我做的第一件事情是将我的 Chromebook 变成开发者模式。为此,你需要关闭你的 Chromebook 并不关闭翻盖,接着同时按住 ESC、Refresh 和 Power 键几秒直到进入恢复模式,这会擦除 Chromebook 上的所有数据。 +我做的第一件事情是将我的 Chromebook 变成开发者模式。为此,你需要关闭你的 Chromebook 但不关闭翻盖,接着同时按住 `ESC`、`Refresh` 和 `Power` 键几秒直到进入恢复模式,这会擦除 Chromebook 上的所有数据。 -进入开发者模式会花费你分钟,所以耐心点。当准备完成后,你需要登录你的 Google 账户,并设置不同的东西,比如壁纸或者头像之类。现在你进入开发者模式了,在你的 Chromebook 中访问这篇教程并[下载 Crouton][2],它会保存在下载文件夹中。 +进入开发者模式会花费你几分钟,所以耐心点。当准备完成后,你需要登录你的 Google 账户,并设置各种东西,比如壁纸或者头像之类。现在你进入开发者模式了,在你的 Chromebook 中访问这篇教程并[下载 Crouton][2],它会保存在下载文件夹中。 -如何使用 Crouton 安装带有 GNOME 3.24 的 Ubuntu 17.04 +### 如何使用 Crouton 安装带有 GNOME 3.24 的 Ubuntu 17.04 -现在打开 Google Chrome 并按下 CTRL+ALT+T 打开 Chrome OS 的终端模拟器,它叫做 crosh。在命令提示符中,输入 “shell” 命令(没有引号),按下回车进入 Linux shell。让我们看看 Crouton 能为我们做什么。 +现在打开 Google Chrome 并按下 `CTRL+ALT+T` 打开 Chrome OS 的终端模拟器,它叫做 crosh。在命令提示符中,输入 `shell` 命令,按下回车进入 Linux shell。让我们看看 Crouton 能为我们做什么。 -这有两个命令(下面列出的),你可以运行它们查看 Crouton 支持的 GNU/Linux 发行版和桌面环境,并且我可以告诉你这有可能安装 Debian 7 “Wheezy”、Debian 8 “Jessie”、Debian 9 “Stretch” 和 Debian Sid、Kali Linux 滚动版还有 Ubuntu 12.04 LTS、Ubuntu 14.04 LTS 和 Ubuntu 16.04 LTS。 +这有两个命令(下面列出的),你可以运行它们查看 Crouton 支持的 GNU/Linux 发行版和桌面环境,并且我可以告诉你这可以安装 Debian 7 “Wheezy”、Debian 8 “Jessie”、Debian 9 “Stretch” 和 Debian Sid、Kali Linux 滚动版还有 Ubuntu 12.04 LTS、Ubuntu 14.04 LTS 和 Ubuntu 16.04 LTS 等等。 -`sh -e /Downloads/crouton -r list -  _会列出支持发行版_ -sh -e /Downloads/crouton -t list -  _会列出支持的桌面_` +``` +sh -e /Downloads/crouton -r list -  ### 会列出支持的发行版 +sh -e /Downloads/crouton -t list -  ### 会列出支持的桌面 +``` -Crouton 也会列出一系列 Debian、Kali 和 Ubuntu 旧的发行版,它们在上游中止支持了(这些的名字后面都被标记了感叹号),并且因为安全风险你不应该安装它们,还有两个不支持的 Ubuntu 版本,Ubuntu 16.10 和 Ubuntu 17.04。 +Crouton 也会列出一系列 Debian、Kali 和 Ubuntu 的旧发行版,但它们在上游被中止支持了(这些的名字后面都被标记了感叹号),并且因为安全风险你不应该安装它们,还有两个尚未支持的 Ubuntu 版本,Ubuntu 16.10 和 Ubuntu 17.04。 -Crouton 开发者说这些“不支持”的 Ubuntu 版本用一些方法可能也可以使用,但是我试了一下并使用下面的命令安装了带有 GNOME 3.24 桌面环境(没有额外的程序)的 Ubuntu 17.04 (Zesty Zapus)。我使用 “-e” 参数来加密安装。 +Crouton 开发者说这些“不支持”的 Ubuntu 版本用一些方法可能也可以使用,但是我试了一下并使用下面的命令安装了带有 GNOME 3.24 桌面环境(没有额外的应用)的 Ubuntu 17.04 (Zesty Zapus)。我使用 `-e` 参数来加密安装。 -`sh -e /Downloads/crouton -e -r zesty -t gnome` +``` +sh -e /Downloads/crouton -e -r zesty -t gnome +``` 将所有的都下载下来并安装在 Crouton 在你的 Chromebook 中创建的 chroot 环境中会花费一些时间,因此再说一次,请耐心。当一切完成后,你会知道,并且你能通过在 shell 中运行下面的命令启动 Ubuntu 17.04。 -`sudo startgnome` +``` +sudo startgnome +``` -瞧!我在我的旧 Acer Chromebook 11 (C740) 上运行着带有 GNOME 3.24 桌面环境的 Ubuntu 17.04 (Zesty Zapus),这笔记本 Google 还尚未支持 Android 程序。最棒的部分是我能够使用 CTRL+ALT+Shift+向后/向前键盘快捷键快速在 Chrome OS 和 Ubuntu 17.04 之间切换。 +瞧!我在我的旧 Acer Chromebook 11 (C740) 上运行着带有 GNOME 3.24 桌面环境的 Ubuntu 17.04 (Zesty Zapus),这笔记本 Google 还尚未支持 Android 程序。最棒的部分是我能够使用 `CTRL+ALT+Shift`+`Back`/`Forward` 键盘快捷键快速在 Chrome OS 和 Ubuntu 17.04 之间切换。 -作为结尾笔记,我想提醒你注意,由于 Chromebook 现在始终处于开发人员模式,所以当电池电量耗尽、打开或关闭设备时,你会一直看到一个警告,显示 “OS verification is OFF - Press SPACE to re-enable”,当你看到它时,请按 CTRL+D。玩得开心! +![GNOME 3.24 desktop - System menu](http://i1-news.softpedia-static.com/images/news2/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-3.jpg) -[Ubuntu 17.04][9] -[GNOME 3.24][10] -[Chromebook][11] -[Acer Chrombook 11][12] -[Linux][13] +作为这篇笔记的结尾,我想提醒你注意,由于 Chromebook 现在始终处于开发人员模式,所以当电池电量耗尽、打开或关闭设备时,你会一直看到一个警告,显示 “OS verification is OFF - Press SPACE to re-enable”,当你看到它时,请按 `CTRL+D`。玩得开心! -### Acer Chrombook 11 上的 Ubuntu 17.04 (4 张图片) +![GNOME 3.24 desktop - Calendar applet](http://i1-news.softpedia-static.com/images/news2/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-4.jpg) + +![GNOME 3.24 desktop - Overview mode](http://i1-news.softpedia-static.com/images/news2/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-5.jpg) - [![Ubuntu 17.04 with GNOME 3.24 running on Acer Chromebook 11 (C740)](http://i1-news.softpedia-static.com/images/fitted/620x/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-2.jpg)][18] [![GNOME 3.24 desktop - System menu](http://i1-news.softpedia-static.com/images/newsrsz/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-3.jpg)][14] [![GNOME 3.24 desktop - Calendar applet](http://i1-news.softpedia-static.com/images/newsrsz/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-4.jpg)][15] [![GNOME 3.24 desktop - Overview mode](http://i1-news.softpedia-static.com/images/newsrsz/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624-5.jpg)][16] -------------------------------------------------------------------------------- via: http://news.softpedia.com/news/how-to-install-ubuntu-17-04-with-gnome-on-your-chromebook-alongside-chrome-os-516624.shtml -作者:[ Marius Nestor ][a] +作者:[Marius Nestor][a] 译者:[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/) 荣誉推出 From 1ffbbb6f4ffc855167b5a65bf55a0848e47cb01f Mon Sep 17 00:00:00 2001 From: runningwater Date: Wed, 5 Jul 2017 14:37:41 +0800 Subject: [PATCH 041/100] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20170622 A users guide to links in the Linux filesystem.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20170622 A users guide to links in the Linux filesystem.md b/sources/tech/20170622 A users guide to links in the Linux filesystem.md index 488557c2e7..c2503313a2 100644 --- a/sources/tech/20170622 A users guide to links in the Linux filesystem.md +++ b/sources/tech/20170622 A users guide to links in the Linux filesystem.md @@ -1,3 +1,4 @@ +(翻译中 by runningwater) A user's guide to links in the Linux filesystem ============================================================ @@ -285,7 +286,7 @@ David Both - David Both is a Linux and Open Source advocate who resides in Ralei via: https://opensource.com/article/17/6/linking-linux-filesystem 作者:[David Both ][a] -译者:[译者ID](https://github.com/译者ID) +译者:[runningwater](https://github.com/runningwater) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From c06602c26c5593656d3ebe717187268cd25cd893 Mon Sep 17 00:00:00 2001 From: toutoudnf Date: Wed, 5 Jul 2017 19:33:10 +0800 Subject: [PATCH 042/100] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20170310 A public cloud migration in 22 days.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20170310 A public cloud migration in 22 days.md b/sources/tech/20170310 A public cloud migration in 22 days.md index 5029bba8b5..a69a75cc93 100644 --- a/sources/tech/20170310 A public cloud migration in 22 days.md +++ b/sources/tech/20170310 A public cloud migration in 22 days.md @@ -1,3 +1,4 @@ +【toutoudnf 翻译中】 A public cloud migration in 22 days ============================================================ From 87ff82dd6b26f16f4e6ed6e68a3c7b4234b63f43 Mon Sep 17 00:00:00 2001 From: sanfusu Date: Wed, 5 Jul 2017 19:37:25 +0800 Subject: [PATCH 043/100] Translating by sanfusu --- sources/tech/20160325 Network automation with Ansible.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20160325 Network automation with Ansible.md b/sources/tech/20160325 Network automation with Ansible.md index 0f543a3c18..40037679f5 100644 --- a/sources/tech/20160325 Network automation with Ansible.md +++ b/sources/tech/20160325 Network automation with Ansible.md @@ -1,3 +1,5 @@ +Translating by sanfusu + Network automation with Ansible ================ From 9a5eb81488ce82d65eba7297d5847c19af347aa0 Mon Sep 17 00:00:00 2001 From: Jinwen Zhang Date: Thu, 6 Jul 2017 00:31:48 +0800 Subject: [PATCH 044/100] wcnnbdk1 translated 20170621 How To kill An Inactive OR Idle SSH Sessions.md --- ...o kill An Inactive OR Idle SSH Sessions.md | 124 ------------------ ...o kill An Inactive OR Idle SSH Sessions.md | 123 +++++++++++++++++ 2 files changed, 123 insertions(+), 124 deletions(-) delete mode 100644 sources/tech/20170621 How To kill An Inactive OR Idle SSH Sessions.md create mode 100644 translated/tech/20170621 How To kill An Inactive OR Idle SSH Sessions.md diff --git a/sources/tech/20170621 How To kill An Inactive OR Idle SSH Sessions.md b/sources/tech/20170621 How To kill An Inactive OR Idle SSH Sessions.md deleted file mode 100644 index 8409b66ac0..0000000000 --- a/sources/tech/20170621 How To kill An Inactive OR Idle SSH Sessions.md +++ /dev/null @@ -1,124 +0,0 @@ -wcnnbdk1 translating -How To kill An Inactive OR Idle SSH Sessions -============================================================ - -BY [MAGESH MARUTHAMUTHU][1] · PUBLISHED : JUNE 21, 2017 || LAST UPDATED: JUNE 21, 2017 - -Let’s imagine that you are working in server through ssh, for some reason your session get disconnected like, internet issue or power failure or your Local PC get rebooted, etc,. - -You may or mayn’t login to the server again to work but you have left the previous ssh session with out closing. - -How to Kill an inactive ssh sessions ? Identify the Inactive or Idle ssh sessions with help of `w` command, then get the idle session PID by issuing `pstree` command, finally kill the sessions using `kill` command. - -Suggested Read : [SSH Related Articles][2] - -Suggested Read : [Mosh (Mobile Shell) – Best Alternative for SSH to Connect Remote System][3] - -#### How to Identify Inactive or Idle SSH Sessions - -Login to the system and check how many user’s are currently logged in by issuing `w` command. If you identified your own session then note the Inactive or Idle ssh sessions to kill. - -In my scenario, I can see two users are currently logged in, one is my new ssh session which am currently running `w` command and another one for my idle session. - -``` -# w - 10:36:39 up 26 days, 20:29, 2 users, load average: 0.00, 0.02, 0.00 -USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT -root pts/0 219.91.219.14 10:34 28.00s 0.00s 0.00s -bash -root pts/2 219.91.219.14 10:36 0.00s 0.00s 0.00s w -``` - -#### How to Get a SSH Session PID - -To kill idle ssh session, we need a parent `PID` of the idle session. To get a parent pid, run the `pstree` command to see a tree diagram of all the processes. - -You also get the similar kind of output like below. The pstree command output is much bigger so, i removed many things from the file for better understanding. - -``` -# pstree -p -init(1)-+-abrtd(2131) - |-acpid(1958) - |-httpd(32413)-+-httpd(32442) - | - |-mingetty(2198) - |-mysqld_safe(24298)---mysqld(24376)-+-{mysqld}(24378) - | - |-php(32456)-+-php(32457) - | - |-sshd(2023)-+-sshd(10132)---bash(10136) - | `-sshd(10199)---bash(10208)---pstree(10226) - |-udevd(774)-+-udevd(2191) - `-udevd(27282) -``` - -From the above output, you can see the tree of sshd processes and branch’s. The main sshd process is `sshd(2023)` and two branch’s, `sshd(10132)` and `sshd(10199)`. - -As i told in the beginning of the article, one is my new session `sshd(10199)` because it shows the `pstree` command which is currently running by me, so the idle session is another one `sshd(10132)`. - -Suggested Read : [How to Access Secure Shell (SSH) Servers Through Standard Web Browsers][4] - -Suggested Read : [PSSH – Execute Commands on Multiple Linux Servers in Parallel][5] - -#### How to kill Idle SSH Sessions - -We got all the information about idle session. Now, i’m going to kill the idle session, using the `kill` command. Make sure you have replace your PID instead of us. - -``` - -# kill -9 10132 -``` - -#### Recheck whether the idle session get killed or not - -Again use `w` command to recheck whether the idle session get killed or not. Yes, it’s not there because i can see only one session which is owned by me. - -``` -# w - 10:40:18 up 26 days, 20:33, 1 user, load average: 0.11, 0.04, 0.01 -USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT -root pts/2 219.91.219.14 10:36 0.00s 0.00s 0.00s w -``` - -Suggested Read : [rtop – A Nifty Tool to Monitor Remote Server Over SSH][6] - -Suggested Read : [DSH – Run/Execute Shell Commands On Multiple Linux Servers At Once][7] - -#### Recheck with pstree Command - -Recheck once again with `pstree` command to double confirm it. Yes, only one ssh session is live which is owned by me. - -``` -# pstree -p -init(1)-+-abrtd(2131) - |-acpid(1958) - | - |-httpd(32413)-+-httpd(32442) - | - |-mingetty(2198) - |-mysqld_safe(24298)---mysqld(24376)-+-{mysqld}(24378) - | - |-php(32456)-+-php(32457) - | - |-sshd(2023)---sshd(10199)---bash(10208)---pstree(10431) - |-udevd(774)-+-udevd(2191) - `-udevd(27282) -``` - --------------------------------------------------------------------------------- - -via: http://www.2daygeek.com/kill-inactive-idle-ssh-sessions/ - -作者:[ Magesh Maruthamuthu][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.2daygeek.com/author/magesh/ -[1]:http://www.2daygeek.com/author/magesh/ -[2]:http://www.2daygeek.com/category/ssh-tutorials/ -[3]:http://www.2daygeek.com/install-mosh-shell-ssh-client-in-linux-to-connect-remote-system/ -[4]:http://www.2daygeek.com/shellinabox-web-based-ssh-terminal-to-access-remote-linux-servers/ -[5]:http://www.2daygeek.com/pssh-parallel-ssh-run-execute-commands-on-multiple-linux-servers/ -[6]:http://www.2daygeek.com/rtop-monitor-remote-linux-server-over-ssh/ -[7]:http://www.2daygeek.com/dsh-run-execute-shell-commands-on-multiple-linux-servers-at-once/ diff --git a/translated/tech/20170621 How To kill An Inactive OR Idle SSH Sessions.md b/translated/tech/20170621 How To kill An Inactive OR Idle SSH Sessions.md new file mode 100644 index 0000000000..385ca06b25 --- /dev/null +++ b/translated/tech/20170621 How To kill An Inactive OR Idle SSH Sessions.md @@ -0,0 +1,123 @@ +如何关闭一个不活动的或者是空闲的 SSH 会话 +============================================================ + +作者 [MAGESH MARUTHAMUTHU][1] . 发布时间:2017年6月21日 || 最后更新:2017年6月21日 + +让我们来想像一下,当你通过 ssh 在服务器上工作时,由于网络、电源或者是本地 PC 重启等原因导致你断开你的连接会话。 + +你可能会再次登录服务器继续工作也可能不会但是你始终会留下之前没有关闭的 ssh 会话。 + +如何关闭一个不活动的 ssh 会话?首先使用 `w` 命令来识别出不活动或者是空闲的 ssh 会话,接着使用 `pstree` 命令来获取空闲会话的 PID,最后就是使用 `kill` 命令来关闭会话了。 + +建议阅读:[SSH 相关文章][2] + +建议阅读:[Mosh(Mobile Shell)- 最好的SSH 远程连接替代选项][3] + +#### 如何识别不活动的或者是空闲的 SSH 会话 + +登录系统通过 `w` 命令来查看当前有多少用户登录着。如果你识别出了自己的会话连接就可以记下其它不活动或者是空闲的 ssh 会话去关闭。 + +在我当前的例子中,能看见两个用户登录着,其中一个是我当前在执行 `w` 命令的 ssh 会话另一个就是之前的空闲会话了。 + +``` +# w + 10:36:39 up 26 days, 20:29, 2 users, load average: 0.00, 0.02, 0.00 +USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT +root pts/0 219.91.219.14 10:34 28.00s 0.00s 0.00s -bash +root pts/2 219.91.219.14 10:36 0.00s 0.00s 0.00s w +``` + +#### 如何获取 SSH 会话的 PID + +为了关闭空闲的 ssh 会话,我们需要空闲会话进程的父进程的 `PID`。(这里介绍另一个工具 pkill,使用 pkill -t pts/0 -kill 就可以关闭会话, debian8下可用,有些版本似乎需要更改-kill的位置)我们可以执行 `pstree` 命令来查看包括了所有进程的树状图,以便获取父进程的 pid。 + +你会获得与下方示例中相似的输出。pstree 命令的输出会比这个大得多,为了更好的理解我删去了许多不相关的内容。 + +``` +# pstree -p +init(1)-+-abrtd(2131) + |-acpid(1958) + |-httpd(32413)-+-httpd(32442) + | + |-mingetty(2198) + |-mysqld_safe(24298)---mysqld(24376)-+-{mysqld}(24378) + | + |-php(32456)-+-php(32457) + | + |-sshd(2023)-+-sshd(10132)---bash(10136) + | `-sshd(10199)---bash(10208)---pstree(10226) + |-udevd(774)-+-udevd(2191) + `-udevd(27282) +``` + +从上方的输出中,你可以看到 sshd 进程与分支的树形图。sshd 的主进程是 `sshd(2023)`,另两个分支分别为 `sshd(10132)` 和 `sshd(10199)`。 + +跟我在文章开始讲的相同,其中一个是我新的会话连接 `sshd(10199)` 它展示了我正在执行的 `pstree` 命令,因此空闲会话是另一个进程为 `sshd(10132)`。 + +建议阅读:[如何通过标准的网页浏览器来接入 Secure Shell (SSH) 服务器][4] + +建议阅读:[PSSH - 在多台 Linux 服务器上并行的执行命令][5] + +#### 如何关闭空闲 SSH 会话 + +我们已经获得了有关空闲会话的所有信息。那么,就让我们来使用 `kill` 命令来关闭空闲会话。请确认你将下方的 PID 替换成了你服务器上的空闲会话 PID。 + +``` + +# kill -9 10132 +``` + +#### 再次查看空闲会话是否已经被关闭 + +再次使用 `w` 命令来查看空闲会话是否已经被关闭。没错,只有那个我自己的当前会话还在,因此那个空闲会话已经被关闭了。 + +``` +# w + 10:40:18 up 26 days, 20:33, 1 user, load average: 0.11, 0.04, 0.01 +USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT +root pts/2 219.91.219.14 10:36 0.00s 0.00s 0.00s w +``` + +建议阅读:[rtop - 一个好用的通过 SSH 来监控远程服务器的工具][6] + +建议阅读:[DSH - 同时在多台 Linux 服务器上执行命令][7] + +#### 再次使用 pstree 命令检查 + +再次使用 `pstree` 命令确认。是的,只有那个我自己的 ssh 会话还在。 + +``` +# pstree -p +init(1)-+-abrtd(2131) + |-acpid(1958) + | + |-httpd(32413)-+-httpd(32442) + | + |-mingetty(2198) + |-mysqld_safe(24298)---mysqld(24376)-+-{mysqld}(24378) + | + |-php(32456)-+-php(32457) + | + |-sshd(2023)---sshd(10199)---bash(10208)---pstree(10431) + |-udevd(774)-+-udevd(2191) + `-udevd(27282) +``` + +-------------------------------------------------------------------------------- + +via: http://www.2daygeek.com/kill-inactive-idle-ssh-sessions/ + +作者:[ Magesh Maruthamuthu][a] +译者:[wcnnbdk1](https://github.com/wcnnbdk1) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.2daygeek.com/author/magesh/ +[1]:http://www.2daygeek.com/author/magesh/ +[2]:http://www.2daygeek.com/category/ssh-tutorials/ +[3]:http://www.2daygeek.com/install-mosh-shell-ssh-client-in-linux-to-connect-remote-system/ +[4]:http://www.2daygeek.com/shellinabox-web-based-ssh-terminal-to-access-remote-linux-servers/ +[5]:http://www.2daygeek.com/pssh-parallel-ssh-run-execute-commands-on-multiple-linux-servers/ +[6]:http://www.2daygeek.com/rtop-monitor-remote-linux-server-over-ssh/ +[7]:http://www.2daygeek.com/dsh-run-execute-shell-commands-on-multiple-linux-servers-at-once/ From 59162e6f6cf444f5fc4c6ffccfe69bac26bf3641 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 6 Jul 2017 08:56:57 +0800 Subject: [PATCH 045/100] translated --- ...ool facts you should know about FreeDOS.md | 72 ------------------- ...ool facts you should know about FreeDOS.md | 70 ++++++++++++++++++ 2 files changed, 70 insertions(+), 72 deletions(-) delete mode 100644 sources/tech/20170629 4 cool facts you should know about FreeDOS.md create mode 100644 translated/tech/20170629 4 cool facts you should know about FreeDOS.md diff --git a/sources/tech/20170629 4 cool facts you should know about FreeDOS.md b/sources/tech/20170629 4 cool facts you should know about FreeDOS.md deleted file mode 100644 index 4a630da33c..0000000000 --- a/sources/tech/20170629 4 cool facts you should know about FreeDOS.md +++ /dev/null @@ -1,72 +0,0 @@ -translating---geekpi - -4 cool facts you should know about FreeDOS -============================================================ - -### 23 years later, FreeDOS is in active development and edges out MS-DOS's lifespan by a few years. - - -![4 cool facts you should know about FreeDOS ](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/wings_freedos_game.jpg?itok=3O_GB-7o "4 cool facts you should know about FreeDOS ") ->Image credits : FreeDOS - -In the early 1990s, I was a DOS "power user." I used DOS for everything and even wrote my own tools to extend the DOS command line. Sure, we had Microsoft Windows, but if you remember what computing looked like at the time, Windows 3.1 was not that great. I preferred working in DOS. - -You might understand that I was a little confused and upset in 1994 when Microsoft announced (via interviews in tech magazines) that the next version of Windows would do away with MS-DOS. I thought, "If Windows 3.2 or 4.0 looks anything like Windows 3.1, I want nothing to do with that." I looked around for options and decided that if DOS was going to continue, someone would have to create a DOS that everyone could use when MS-DOS went away. - -So it was on June 29, 1994, that I wrote a message to a Usenet discussion group, announcing a new "free DOS" project: - -> A few months ago, I posted articles relating to starting a public domain version of DOS. The general support for this at the time was strong, and many people agreed with the statement, "start writing!" -> -> So, I have... -> -> Announcing the first effort to produce a PD-DOS. I have written up a "manifest" describing the goals of such a project and an outline of the work, as well as a "task list" that shows exactly what needs to be written. I'll post those here, and let discussion follow. - -Today, it's 23 years later, and [FreeDOS][3] is still going strong! - -We continue to make new releases with new functionality and features. Our FreeDOS 1.2 distribution, released on December 25, 2016, is a testament to how many people enjoy using and working on FreeDOS. As I look back over our history, there's a short list of cool facts about FreeDOS you should know: - -### Software development right out of the box - -With the original DOS, it was difficult to do any coding. DOS provided a simple BASIC interpreter, and some people could do neat things with DEBUG, but you couldn’t really do much programming in DOS. With FreeDOS, there are a bunch of different tools to do software development: compilers, assemblers, debuggers, interpreters, and scripting. After you install FreeDOS, you can immediately start writing code in C, Assembly, Pascal, Perl, and several other languages. - -### Browse the web - -DOS is an old system and the original didn't support networking out of the box. Typically, you had to install device drivers for your hardware to connect to a network, which was usually a simple network like IPX. Few systems supported TCP/IP. - -With FreeDOS, not only do we include a TCP/IP networking stack, we include tools and programs that let you browse the web. Use Dillo for a graphical web browser experience, or Lynx to view the web as formatted plain text. If you just want to grab the HTML code and manipulate it yourself, use Wget or Curl. - -### Play great DOS games - -We know that many people install FreeDOS today to play the classic DOS games, run legacy business applications, or do embedded development. A lot of those people use FreeDOS just to play games, and that’s cool with us. Just because a game is old doesn’t mean it's boring. DOS had a lot of great games! Install your favorite classic game and have fun. - -Because so many people use FreeDOS to play games, we now include a variety of DOS games. The FreeDOS 1.2 distribution includes first-person shooters like FreeDOOM, arcade shooters like Kiloblaster, flight simulators like Vertigo, and others. We aimed to include something for everyone. - -### FreeDOS has now been around longer than MS-DOS - -Microsoft released MS-DOS 1.0 in August 1981\. And thirteen years later, Microsoft effectively deprecated MS-DOS with the release of Windows 95 in August 1995, although MS-DOS was still around in some form until September 2000\. In total, MS-DOS was a thing for nineteen years. - -We announced FreeDOS in June 1994 and made our first Alpha release in September that same year. So FreeDOS has been around for 23 years, edging out Microsoft’s MS-DOS by a few years. Truly, we've been working on FreeDOS for longer than MS-DOS was a thing. FreeDOS has staying power. - -Another important way that FreeDOS is different from other versions of DOS is that  _it is still being developed_ . We have an active developer community and are always looking for new people to help out. Join the community and help build the next version of FreeDOS. - --------------------------------------------------------------------------------- - -作者简介: - -Jim Hall - I am the founder and coordinator of the FreeDOS Project. I also serve as a director on the GNOME Foundation Board of Directors. At work, I am the Chief Information Officer for Ramsey County, Minnesota. In my spare time, I contribute to usability in open source software, and mentor usability testing in GNOME via Outreachy (formerly the GNOME Outreach Program for Women). - --------- - -via: https://opensource.com/article/17/6/freedos-still-cool-today - -作者:[Jim Hall][a] -译者:[译者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/jim-hall -[1]:https://opensource.com/article/17/6/freedos-still-cool-today?rate=_5nJLfJhQp2bzfmjkORKyU-H0g8T3mzl7gPCymnb_y0 -[2]:https://opensource.com/user/126046/feed -[3]:https://opensource.com/article/17/6/www.freedos.org -[4]:https://opensource.com/users/jim-hall diff --git a/translated/tech/20170629 4 cool facts you should know about FreeDOS.md b/translated/tech/20170629 4 cool facts you should know about FreeDOS.md new file mode 100644 index 0000000000..134fb0075d --- /dev/null +++ b/translated/tech/20170629 4 cool facts you should know about FreeDOS.md @@ -0,0 +1,70 @@ +你应该知道的 4 个很酷的关于 FreeDOS 的事实 +============================================================ + +### 23 年后,FreeDOS 正在积极开发,并将 MS-DOS 的声明延长了几年 + + +![4 cool facts you should know about FreeDOS ](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/wings_freedos_game.jpg?itok=3O_GB-7o "4 cool facts you should know about FreeDOS ") +>图片版权: FreeDOS + +在 90 年代早期,我是一位 DOS 的 “资深用户”。我用 DOS 做任何事,甚至写我自己的工具来扩展 DOS 命令行。当然,我们有 Microsoft Windows,但是如果你还记得当时的计算机,Windows 3.1 并不是那么好。我更喜欢在 DOS 中工作。 + +你可能会明白,在 1994 年,当微软(通过科技杂志的采访)宣布下一个版本的 Windows 将会取消 MS-DOS 时,我感到有些困惑和不安。我想:“如果 Windows 3.2 或 4.0 看起来像 Windows 3.1,我不想用它了。” 我四处选择,并决定如果 DOS 会继续下去,那么会有人创建一个 DOS,在 MS-DOS 消失的时候,每个人都可以使用。 + +因此在 1994 年 6 月 29 日,我在 Usenet 讨论组谢了一个信息,宣布了新的 “free DOS” 项目: + +> 几个月前,我发表了一篇关于启动公共版本 DOS 的文章。当时对此的普遍支持是很强的,并且很多人同意这个声明,“开始写!” +> +> 所以,我已经。。。 +> +> 宣布首次尝试制作 PD-DOS。我写了一份描述这样一个项目的目标和工作纲要的“清单”,以及一份“任务清单”,展示了需要写些什么。我会在这里发贴,让我们进行讨论。 + +今天,已经 23 年之后了,[FreeDOS][3] 还变得更强大! + +我们继续发布有新功能和特性的版本。我们的 FreeDOS 1.2 发布于 2016 年 12 月 25 日,这证明很多人喜欢使用和并在 FreeDOS 上工作。当我回顾我们的历史,有一个你应该知道的关于 FreeDOS 的很酷的事实列表: + +### 可以立即开始的软件开发 + +在原始的 DOS 中,很难做任何编程。DOS 提供了一个简单的 BASIC 解释器,一些用户可以用 DEBUG 做漂亮的事,但是你不能在 DOS 中做真正编程的事情。在 FreeDOS 中,有许多不同的工具做软件开发:编译期、汇编器、调试器、解释器和编写脚本。在你安装 FreeDOS 之后,你可以立即用 C、汇编、Pascal、Perl 和几种其他语言编写代码。 + +### 浏览 web + +DOS 是一个老旧的系统,并且原始不支持网络开箱即用。通常,你必须安装硬件的设备驱动程序才能连接到网络,通常是像 IPX 这样的简单网络。很少的系统支持 TCP/IP。 + +在 FreeDOS 中,我们不仅包含了 TCP/IP 网络栈,我们还包含了让你浏览 web 的工具和程序。使用 Dillo 作为图形 web 浏览体验,或则使用 Lynx 以纯文本形式浏览 web。如果你只想要抓取 HTML 代码并自己操作,使用 Wget 或者 Curl。 + +### 玩很棒的 DOS 游戏 + +我们知道很多的人安装 FreeDOS 来玩经典的 DOS 游戏,运行古老的商业程序或者嵌入式开发。使用 FreeDOS 的许多人只是拿来玩游戏,这对我们很酷。只是因为一个游戏很老并不意味着它很无趣。DOS 与许多很棒的游戏!安装你最喜欢的经典游戏,玩得开心。 + +因为有如此多的人使用 FreeDOS 来玩游戏,我们现在包含了不同的 DOS 游戏。FreeDOS 1.2 包含了第一人称射击游戏像 FreeDOOM、街机射击像 Kiloblaster、飞行模拟器像 Vertigo 等等。我们目标是为每人包含一些东西。 + +### FreeDOS 现在已经比 MS-DOS 更长了 + +微软在 1981 年 8 月发布了 MS-DOS 1.0。13 年之后,微软在 1995 年 8 月发布 Windows 95 后抛弃了 MS-DOS,虽然 MS-DOS 直到 2000 年 8 月一直存在。MS-DOS 总体上是存在 19 年的东西。 + +我们在 1994 年 6 月宣布了 FreeDOS,并且在同年的 9 月发布了第一个 Alpha 版本。因此 FreeDOS 已经大约有 23 年了,比微软的 MS-DOS 多了几年。确实我们在 FreeDOS 工作的时间比 MS-DOS 更长了。FreeDOS 还会继续保持强大。 + +FreeDOS 与其他 DOS 另外一个重要的不同是_它仍在开发中_。我们有一个积极的开发者社区,并一直在寻找新人来帮助。加入社区并帮助构造新的 FreeDOS 版本。 + +-------------------------------------------------------------------------------- + +作者简介: + +Jim Hall - 我是 FreeDOS 项目的创始人和协调者。我还担任 GNOME 基金董事会董事。在工作中,我是明尼苏达州拉姆齐县的首席信息官。在业余时间,我致力于开源软件的可用性,并通过 Outreachy(之前针对妇女的 GNOME Outreach 项目)指导 GNOME 中的可用性测试。 + +-------- + +via: https://opensource.com/article/17/6/freedos-still-cool-today + +作者:[Jim Hall][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/jim-hall +[1]:https://opensource.com/article/17/6/freedos-still-cool-today?rate=_5nJLfJhQp2bzfmjkORKyU-H0g8T3mzl7gPCymnb_y0 +[2]:https://opensource.com/user/126046/feed +[3]:https://opensource.com/article/17/6/www.freedos.org +[4]:https://opensource.com/users/jim-hall From e7d92448289e17c44249b250d15b45740d252f4c Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 6 Jul 2017 09:01:08 +0800 Subject: [PATCH 046/100] translating --- ...2 Ring is a Privacy-Focused Open-Source Skype Alternative.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md b/sources/tech/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md index 117471b3e1..c8d73a3db4 100644 --- a/sources/tech/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md +++ b/sources/tech/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md @@ -1,3 +1,5 @@ +translating----geekpi + Ring is a Privacy-Focused, Open-Source Skype Alternative ============================================================ From 59106f0d30a97ef9ed141c898bda05d95e063b06 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 6 Jul 2017 09:06:10 +0800 Subject: [PATCH 047/100] PRF&PUB:20170621 How To kill An Inactive OR Idle SSH Sessions.md @wcnnbdk1 --- ...o kill An Inactive OR Idle SSH Sessions.md | 46 +++++++++---------- 1 file changed, 21 insertions(+), 25 deletions(-) rename {translated/tech => published}/20170621 How To kill An Inactive OR Idle SSH Sessions.md (65%) diff --git a/translated/tech/20170621 How To kill An Inactive OR Idle SSH Sessions.md b/published/20170621 How To kill An Inactive OR Idle SSH Sessions.md similarity index 65% rename from translated/tech/20170621 How To kill An Inactive OR Idle SSH Sessions.md rename to published/20170621 How To kill An Inactive OR Idle SSH Sessions.md index 385ca06b25..493bd7ad05 100644 --- a/translated/tech/20170621 How To kill An Inactive OR Idle SSH Sessions.md +++ b/published/20170621 How To kill An Inactive OR Idle SSH Sessions.md @@ -1,19 +1,15 @@ -如何关闭一个不活动的或者是空闲的 SSH 会话 +如何关闭一个不活动的或者空闲的 SSH 会话 ============================================================ -作者 [MAGESH MARUTHAMUTHU][1] . 发布时间:2017年6月21日 || 最后更新:2017年6月21日 +让我们来假设一下,当你通过 ssh 在服务器上工作时,由于网络、电源或者是本地 PC 重启等原因会导致你的会话连接断开。 -让我们来想像一下,当你通过 ssh 在服务器上工作时,由于网络、电源或者是本地 PC 重启等原因导致你断开你的连接会话。 - -你可能会再次登录服务器继续工作也可能不会但是你始终会留下之前没有关闭的 ssh 会话。 +你可能会再次登录服务器继续工作也可能不会,但是你始终会留下之前没有关闭的 ssh 会话。 如何关闭一个不活动的 ssh 会话?首先使用 `w` 命令来识别出不活动或者是空闲的 ssh 会话,接着使用 `pstree` 命令来获取空闲会话的 PID,最后就是使用 `kill` 命令来关闭会话了。 -建议阅读:[SSH 相关文章][2] - 建议阅读:[Mosh(Mobile Shell)- 最好的SSH 远程连接替代选项][3] -#### 如何识别不活动的或者是空闲的 SSH 会话 +### 如何识别不活动的或者是空闲的 SSH 会话 登录系统通过 `w` 命令来查看当前有多少用户登录着。如果你识别出了自己的会话连接就可以记下其它不活动或者是空闲的 ssh 会话去关闭。 @@ -27,11 +23,11 @@ root pts/0 219.91.219.14 10:34 28.00s 0.00s 0.00s -bash root pts/2 219.91.219.14 10:36 0.00s 0.00s 0.00s w ``` -#### 如何获取 SSH 会话的 PID +### 如何获取 SSH 会话的 PID -为了关闭空闲的 ssh 会话,我们需要空闲会话进程的父进程的 `PID`。(这里介绍另一个工具 pkill,使用 pkill -t pts/0 -kill 就可以关闭会话, debian8下可用,有些版本似乎需要更改-kill的位置)我们可以执行 `pstree` 命令来查看包括了所有进程的树状图,以便获取父进程的 pid。 +为了关闭空闲的 ssh 会话,我们需要空闲会话进程的父进程的 PID。我们可以执行 `pstree` 命令来查看包括了所有进程的树状图,以便获取父进程的 pid。 -你会获得与下方示例中相似的输出。pstree 命令的输出会比这个大得多,为了更好的理解我删去了许多不相关的内容。 +你会获得与下方示例中相似的输出。`pstree` 命令的输出会比这个多得多,为了更好的理解我删去了许多不相关的内容。 ``` # pstree -p @@ -50,15 +46,14 @@ init(1)-+-abrtd(2131) `-udevd(27282) ``` -从上方的输出中,你可以看到 sshd 进程与分支的树形图。sshd 的主进程是 `sshd(2023)`,另两个分支分别为 `sshd(10132)` 和 `sshd(10199)`。 +从上方的输出中,你可以看到 `sshd` 进程与分支的树形图。`sshd` 的主进程是 `sshd(2023)`,另两个分支分别为 `sshd(10132)` 和 `sshd(10199)`。 跟我在文章开始讲的相同,其中一个是我新的会话连接 `sshd(10199)` 它展示了我正在执行的 `pstree` 命令,因此空闲会话是另一个进程为 `sshd(10132)`。 -建议阅读:[如何通过标准的网页浏览器来接入 Secure Shell (SSH) 服务器][4] +- 建议阅读:[如何通过标准的网页浏览器来接入 Secure Shell (SSH) 服务器][4] +- 建议阅读:[PSSH - 在多台 Linux 服务器上并行的执行命令][5] -建议阅读:[PSSH - 在多台 Linux 服务器上并行的执行命令][5] - -#### 如何关闭空闲 SSH 会话 +### 如何关闭空闲 SSH 会话 我们已经获得了有关空闲会话的所有信息。那么,就让我们来使用 `kill` 命令来关闭空闲会话。请确认你将下方的 PID 替换成了你服务器上的空闲会话 PID。 @@ -67,7 +62,9 @@ init(1)-+-abrtd(2131) # kill -9 10132 ``` -#### 再次查看空闲会话是否已经被关闭 +(LCTT 译注:这里介绍另一个工具 `pkill`,使用 `pkill -t pts/0 -kill` 就可以关闭会话, debian 8 下可用,有些版本似乎需要更改 `-kill` 的位置) + +### 再次查看空闲会话是否已经被关闭 再次使用 `w` 命令来查看空闲会话是否已经被关闭。没错,只有那个我自己的当前会话还在,因此那个空闲会话已经被关闭了。 @@ -78,11 +75,10 @@ USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root pts/2 219.91.219.14 10:36 0.00s 0.00s 0.00s w ``` -建议阅读:[rtop - 一个好用的通过 SSH 来监控远程服务器的工具][6] +- 建议阅读:[rtop - 一个好用的通过 SSH 来监控远程服务器的工具][6] +- 建议阅读:[DSH - 同时在多台 Linux 服务器上执行命令][7] -建议阅读:[DSH - 同时在多台 Linux 服务器上执行命令][7] - -#### 再次使用 pstree 命令检查 +### 再次使用 pstree 命令检查 再次使用 `pstree` 命令确认。是的,只有那个我自己的 ssh 会话还在。 @@ -107,17 +103,17 @@ init(1)-+-abrtd(2131) via: http://www.2daygeek.com/kill-inactive-idle-ssh-sessions/ -作者:[ Magesh Maruthamuthu][a] +作者:[Magesh Maruthamuthu][a] 译者:[wcnnbdk1](https://github.com/wcnnbdk1) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.2daygeek.com/author/magesh/ [1]:http://www.2daygeek.com/author/magesh/ [2]:http://www.2daygeek.com/category/ssh-tutorials/ -[3]:http://www.2daygeek.com/install-mosh-shell-ssh-client-in-linux-to-connect-remote-system/ +[3]:https://linux.cn/article-6262-1.html [4]:http://www.2daygeek.com/shellinabox-web-based-ssh-terminal-to-access-remote-linux-servers/ [5]:http://www.2daygeek.com/pssh-parallel-ssh-run-execute-commands-on-multiple-linux-servers/ -[6]:http://www.2daygeek.com/rtop-monitor-remote-linux-server-over-ssh/ +[6]:https://linux.cn/article-8199-1.html [7]:http://www.2daygeek.com/dsh-run-execute-shell-commands-on-multiple-linux-servers-at-once/ From 69c48c8439b249a1e0c7bcaf0147faf64b904815 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 6 Jul 2017 09:37:40 +0800 Subject: [PATCH 048/100] PRF&PUB:20170629 4 cool facts you should know about FreeDOS.md @geekpi --- ...ool facts you should know about FreeDOS.md | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) rename {translated/tech => published}/20170629 4 cool facts you should know about FreeDOS.md (54%) diff --git a/translated/tech/20170629 4 cool facts you should know about FreeDOS.md b/published/20170629 4 cool facts you should know about FreeDOS.md similarity index 54% rename from translated/tech/20170629 4 cool facts you should know about FreeDOS.md rename to published/20170629 4 cool facts you should know about FreeDOS.md index 134fb0075d..8263f70bac 100644 --- a/translated/tech/20170629 4 cool facts you should know about FreeDOS.md +++ b/published/20170629 4 cool facts you should know about FreeDOS.md @@ -1,51 +1,51 @@ -你应该知道的 4 个很酷的关于 FreeDOS 的事实 +FreeDOS: 已经积极开发了 23 年的 DOS ============================================================ -### 23 年后,FreeDOS 正在积极开发,并将 MS-DOS 的声明延长了几年 - +> 23 年后,FreeDOS 仍在积极开发,并将 MS-DOS 的生命延长了几年 ![4 cool facts you should know about FreeDOS ](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/wings_freedos_game.jpg?itok=3O_GB-7o "4 cool facts you should know about FreeDOS ") ->图片版权: FreeDOS -在 90 年代早期,我是一位 DOS 的 “资深用户”。我用 DOS 做任何事,甚至写我自己的工具来扩展 DOS 命令行。当然,我们有 Microsoft Windows,但是如果你还记得当时的计算机,Windows 3.1 并不是那么好。我更喜欢在 DOS 中工作。 +在 90 年代早期,我是一位 DOS 的 “资深用户”。我用 DOS 做任何事,甚至写我自己的工具来扩展 DOS 命令行。当然,我们有 Microsoft Windows,但是如果你还记得当时的计算机,Windows 3.1 并不是那么好,我更喜欢在 DOS 中工作。 -你可能会明白,在 1994 年,当微软(通过科技杂志的采访)宣布下一个版本的 Windows 将会取消 MS-DOS 时,我感到有些困惑和不安。我想:“如果 Windows 3.2 或 4.0 看起来像 Windows 3.1,我不想用它了。” 我四处选择,并决定如果 DOS 会继续下去,那么会有人创建一个 DOS,在 MS-DOS 消失的时候,每个人都可以使用。 +你可能会理解,在 1994 年,当微软(在科技杂志的采访中)宣布下一个版本的 Windows 将会取消 MS-DOS 时,我感到有些困惑和不安。我想:“如果 Windows 3.2 或 4.0 看起来像 Windows 3.1 一样,我不想用它了。” 我四处选择,并决定如果 DOS 要继续下去的话,那么需要有人创建一个 DOS,在 MS-DOS 消失的时候,让每个人都可以使用它。 -因此在 1994 年 6 月 29 日,我在 Usenet 讨论组谢了一个信息,宣布了新的 “free DOS” 项目: +因此在 1994 年 6 月 29 日,我在 Usenet 讨论组写了一个信息,宣布了新的 “free DOS” 项目: -> 几个月前,我发表了一篇关于启动公共版本 DOS 的文章。当时对此的普遍支持是很强的,并且很多人同意这个声明,“开始写!” +> 几个月前,我发表了一篇关于启动公共领域版本的 DOS 的文章。当时对此的普遍支持是很强烈的,并且很多人同意这个声明,“开始编写!” > -> 所以,我已经。。。 +> 所以,我要…… > -> 宣布首次尝试制作 PD-DOS。我写了一份描述这样一个项目的目标和工作纲要的“清单”,以及一份“任务清单”,展示了需要写些什么。我会在这里发贴,让我们进行讨论。 +> 宣布首次尝试制作 PD-DOS。我写了一份描述这样一个项目的目标和工作纲要的“清单”,以及一份“任务清单”,展示了需要编写些什么。我会在这里发贴,让我们进行讨论。 -今天,已经 23 年之后了,[FreeDOS][3] 还变得更强大! +今天,已经是 23 年之后了,[FreeDOS][3] 仍在变得更强大! -我们继续发布有新功能和特性的版本。我们的 FreeDOS 1.2 发布于 2016 年 12 月 25 日,这证明很多人喜欢使用和并在 FreeDOS 上工作。当我回顾我们的历史,有一个你应该知道的关于 FreeDOS 的很酷的事实列表: +我们继续发布有新功能和特性的版本。我们的 FreeDOS 1.2 发布于 2016 年 12 月 25 日,这证明很多人喜欢使用和在 FreeDOS 上工作。当我回顾我们的历史,有一个你应该知道的关于 FreeDOS 的很酷的事实列表: ### 可以立即开始的软件开发 -在原始的 DOS 中,很难做任何编程。DOS 提供了一个简单的 BASIC 解释器,一些用户可以用 DEBUG 做漂亮的事,但是你不能在 DOS 中做真正编程的事情。在 FreeDOS 中,有许多不同的工具做软件开发:编译期、汇编器、调试器、解释器和编写脚本。在你安装 FreeDOS 之后,你可以立即用 C、汇编、Pascal、Perl 和几种其他语言编写代码。 +在原始的 DOS 中,很难做任何编程。DOS 提供了一个简单的 BASIC 解释器,一些用户可以用 DEBUG 做些精巧的事情,但是你不能在 DOS 中做真正编程的事情。在 FreeDOS 中,有许多不同的工具做软件开发:编译器、汇编器、调试器、解释器和编写脚本。在你安装 FreeDOS 之后,你可以立即用 C、汇编、Pascal、Perl 和几种其他语言编写代码。 ### 浏览 web -DOS 是一个老旧的系统,并且原始不支持网络开箱即用。通常,你必须安装硬件的设备驱动程序才能连接到网络,通常是像 IPX 这样的简单网络。很少的系统支持 TCP/IP。 +DOS 是一个老式系统,并且原本不支持开箱即用的网络。通常,你必须安装硬件的设备驱动程序才能连接到网络,一般是像 IPX 这样的简单网络。只有很少的系统会支持 TCP/IP。 在 FreeDOS 中,我们不仅包含了 TCP/IP 网络栈,我们还包含了让你浏览 web 的工具和程序。使用 Dillo 作为图形 web 浏览体验,或则使用 Lynx 以纯文本形式浏览 web。如果你只想要抓取 HTML 代码并自己操作,使用 Wget 或者 Curl。 ### 玩很棒的 DOS 游戏 -我们知道很多的人安装 FreeDOS 来玩经典的 DOS 游戏,运行古老的商业程序或者嵌入式开发。使用 FreeDOS 的许多人只是拿来玩游戏,这对我们很酷。只是因为一个游戏很老并不意味着它很无趣。DOS 与许多很棒的游戏!安装你最喜欢的经典游戏,玩得开心。 +我们知道很多的人安装 FreeDOS 来玩经典的 DOS 游戏,运行古老的商业程序或者做嵌入式开发。使用 FreeDOS 的许多人只是拿来玩游戏,那对我们来说是件很酷的事,因为一个游戏很老并不意味着它很无趣。DOS 有许多很棒的游戏!安装你最喜欢的经典游戏,你会玩得很开心。 -因为有如此多的人使用 FreeDOS 来玩游戏,我们现在包含了不同的 DOS 游戏。FreeDOS 1.2 包含了第一人称射击游戏像 FreeDOOM、街机射击像 Kiloblaster、飞行模拟器像 Vertigo 等等。我们目标是为每人包含一些东西。 +因为有如此多的人使用 FreeDOS 来玩游戏,我们现在包含了不同的 DOS 游戏。FreeDOS 1.2 包含了第一人称射击游戏像 FreeDOOM、街机射击像 Kiloblaster、飞行模拟器像 Vertigo 等等。我们目标是为每人提供一些东西。 -### FreeDOS 现在已经比 MS-DOS 更长了 +### FreeDOS 现在已经比 MS-DOS 活的更久了 -微软在 1981 年 8 月发布了 MS-DOS 1.0。13 年之后,微软在 1995 年 8 月发布 Windows 95 后抛弃了 MS-DOS,虽然 MS-DOS 直到 2000 年 8 月一直存在。MS-DOS 总体上是存在 19 年的东西。 +微软在 1981 年 8 月发布了 MS-DOS 1.0。13 年之后,微软在 1995 年 8 月发布 Windows 95 后抛弃了 MS-DOS,虽然 MS-DOS 直到 2000 年 9 月之前一直存在。总的来说,MS-DOS 是一件已经存在了 19 年的东西。 -我们在 1994 年 6 月宣布了 FreeDOS,并且在同年的 9 月发布了第一个 Alpha 版本。因此 FreeDOS 已经大约有 23 年了,比微软的 MS-DOS 多了几年。确实我们在 FreeDOS 工作的时间比 MS-DOS 更长了。FreeDOS 还会继续保持强大。 +我们在 1994 年 6 月宣布了 FreeDOS,并且在同年的 9 月发布了第一个 Alpha 版本。因此 FreeDOS 已经大约有 23 年了,比微软的 MS-DOS 还多了几年。确实我们在 FreeDOS 上努力的时间已经比 MS-DOS 更长了。而 FreeDOS 还将继续保持强大。 -FreeDOS 与其他 DOS 另外一个重要的不同是_它仍在开发中_。我们有一个积极的开发者社区,并一直在寻找新人来帮助。加入社区并帮助构造新的 FreeDOS 版本。 +FreeDOS 与其他 DOS 另外一个重要的不同是_它仍在开发中_。我们有一个积极的开发者社区,并一直在寻找新人来帮助。请加入社区并帮助构造新的 FreeDOS 版本吧。 + +(题图: FreeDOS) -------------------------------------------------------------------------------- @@ -59,7 +59,7 @@ via: https://opensource.com/article/17/6/freedos-still-cool-today 作者:[Jim Hall][a] 译者:[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/) 荣誉推出 From a37350a431e766bfa6a16e90116487b543894dbe Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 6 Jul 2017 11:35:23 +0800 Subject: [PATCH 049/100] =?UTF-8?q?PRF&PUB:20170510=20How=20to=20Configure?= =?UTF-8?q?=20and=20Integrate=20iRedMail=20Services=20to=20Samba4=20AD=20D?= =?UTF-8?q?C=20=E2=80=93=20Part=2011.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @geekpi --- ...Mail Services to Samba4 AD DC – Part 11.md | 144 +++++++++--------- 1 file changed, 72 insertions(+), 72 deletions(-) rename {translated/tech => published}/20170510 How to Configure and Integrate iRedMail Services to Samba4 AD DC – Part 11.md (62%) diff --git a/translated/tech/20170510 How to Configure and Integrate iRedMail Services to Samba4 AD DC – Part 11.md b/published/20170510 How to Configure and Integrate iRedMail Services to Samba4 AD DC – Part 11.md similarity index 62% rename from translated/tech/20170510 How to Configure and Integrate iRedMail Services to Samba4 AD DC – Part 11.md rename to published/20170510 How to Configure and Integrate iRedMail Services to Samba4 AD DC – Part 11.md index 049e87ae53..ccb78fc077 100644 --- a/translated/tech/20170510 How to Configure and Integrate iRedMail Services to Samba4 AD DC – Part 11.md +++ b/published/20170510 How to Configure and Integrate iRedMail Services to Samba4 AD DC – Part 11.md @@ -1,39 +1,39 @@ -如何配置并集成 iRedMail 服务到 Samba4 AD DC 中 - 第 11 部分 -============================================================ +Samba 系列(十一):如何配置并集成 iRedMail 服务到 Samba4 AD DC 中 +========================================================= +在本教程中,将学习如何修改提供邮件服务的 iRedMail 主要守护进程,相应地,[Postfix 用于邮件传输,Dovecot 将邮件传送到帐户邮箱][4],以便将它们集成到 [Samba4 AD 域控制器][5]中。 -在本教程中,将学习如何修改 iRedMail 的主要守护进程,相应地,[Postfix 用于邮件传输,Dovecot][4] 将邮件传送到帐户邮箱,以便将它们集成到[ Samba4 AD 域控制器][5]中。 +将 iRedMail 集成到 Samba4 AD DC 中,你将得到以下好处:通过 Samba AD DC 得到用户身份验证、管理和状态,在 AD 组和 Roundcube 中的全局 LDAP 地址簿的帮助下创建邮件列表。 -将 iRedMail 集成到 Samba4 AD DC 中,你将得到以下好处:用户身份验证、管理和通过 Samba AD DC 的状态、在 Roundcube 中的 AD 组和全局 LDAP 地址簿的帮助下创建邮件列表。 - -#### 要求 +### 要求 1. [在 CentOS 7 中为 Samba4 AD 集成安装 iRedMail][1] ### 第一步:准备 iRedMail 系统用于 Samba4 AD 集成 -1. 在第一步中,你需要[为你的机器分配一个静态的 IP 地址][6]以防你使用的是由 DHCP 服务器提供的动态 IP 地址。 +1、 在第一步中,你需要[为你的机器分配一个静态的 IP 地址][6]以防你使用的是由 DHCP 服务器提供的动态 IP 地址。 -运行[ ifconfig 命令][7]列出你的机器网络接口名,并对正确的网卡发出 [nmtui-edit][8] 命令,使用自定义 IP 设置编辑正确的网络接口。 +运行 [ifconfig 命令][7]列出你的机器网络接口名,并对正确的网卡发出 [nmtui-edit][8] 命令,使用自定义 IP 设置编辑正确的网络接口。 - root 权限运行 nmtui-edit 命令。 +root 权限运行 nmtui-edit 命令。 ``` # ifconfig # nmtui-edit eno16777736 ``` - [![Find Network Interface Name](https://www.tecmint.com/wp-content/uploads/2017/05/Find-Network-Interface-Name.png)][9] -找出网络接口名 +[![Find Network Interface Name](https://www.tecmint.com/wp-content/uploads/2017/05/Find-Network-Interface-Name.png)][9] -2. 在打开要编辑的网络接口后,添加正确的静态 IP 设置,确保添加了 Samba4 AD DC 的 DNS 服务器 IP 地址以及你的域的名字,以便从机器查询 realm。使用以下截图作为指导。 +*找出网络接口名* + +2、 在打开要编辑的网络接口后,添加正确的静态 IP 设置,确保添加了 Samba4 AD DC 的 DNS 服务器 IP 地址以及你的域的名字,以便从机器查询 realm。使用以下截图作为指导。 [![Configure Network Settings](https://www.tecmint.com/wp-content/uploads/2017/05/Configure-Network-Settings.png)][10] -配置网络设置 +*配置网络设置* -3. 在你完成配置网络接口后,重启网络进程使更改生效,并对域名以及 samba 4 域控制器的 FQDN 使用 ping 命令测试。 +3、 在你完成配置网络接口后,重启网络进程使更改生效,并对域名以及 samba 4 域控制器的 FQDN 使用 ping 命令测试。 ``` # systemctl restart network.service @@ -44,31 +44,33 @@ ``` [![Verify Network DNS Configuration](https://www.tecmint.com/wp-content/uploads/2017/05/Verify-Network-DNS-Configuration.png)][11] -验证网络 DNS 配置 +*验证网络 DNS 配置* -4. 接下来,用下面的命令安装 ntpdate 包,与域控制器同步时间,并请求 samba4 机器的 NTP 服务器: +4、 接下来,用下面的命令安装 `ntpdate` 包,与域控制器同步时间,并请求 samba4 机器的 NTP 服务器: ``` # yum install ntpdate # ntpdate -qu tecmint.lan # querry domain NTP servers # ntpdate tecmint.lan # Sync time with the domain ``` - [![Sync Time with Samba NTP Server](https://www.tecmint.com/wp-content/uploads/2017/05/Sync-Time-with-Samba-NTP-Server.png)][12] -与 Samba NTP 服务器同步时间 +[![Sync Time with Samba NTP Server](https://www.tecmint.com/wp-content/uploads/2017/05/Sync-Time-with-Samba-NTP-Server.png)][12] -5. 你或许想要本地时间自动与 samba AD 时间服务器同步。为了实现这个设置,通过运行 [crontab -e 命令][13]并追加下面的行添加一条计划任务。 +*与 Samba NTP 服务器同步时间* + +5、 你或许想要本地时间自动与 samba AD 时间服务器同步。为了实现这个设置,通过运行 [crontab -e 命令][13]并追加下面的行添加一条计划任务。 ``` 0 */1 * * * /usr/sbin/ntpdate tecmint.lan > /var/log/ntpdate.lan 2>&1 ``` - [![Auto Sync Time with Samba NTP](https://www.tecmint.com/wp-content/uploads/2017/05/Auto-Sync-Time-with-Samba-NTP.png)][14] -自动与 Samba NTP 同步时间 +[![Auto Sync Time with Samba NTP](https://www.tecmint.com/wp-content/uploads/2017/05/Auto-Sync-Time-with-Samba-NTP.png)][14] + +*自动与 Samba NTP 同步时间* ### 第二步:为 iRedMail 集成准备 Samba4 AD DC -6. 现在,如[这篇][16]教程所述进入一台[安装了 RSAT 工具的 Windows 机器][15]管理 Samba4 AD。 +6、 现在,如[这篇][16]教程所述进入一台[安装了 RSAT 工具的 Windows 机器][15]管理 Samba4 AD。 打开 DNS 管理器,转到你的域转发查找区并添加新的 A 记录、MX记录还有 PTR 记录指向你的 iRedMail 系统的 IP 地址。使用以下截图作为指导。 @@ -76,23 +78,21 @@ [![Create DNS A Record for iRedMail](https://www.tecmint.com/wp-content/uploads/2017/05/Create-DNS-A-Record-for-iRedMail.png)][17] -为 iRedMail 创建 DNS A 记录 +*为 iRedMail 创建 DNS A 记录* 添加 MX 记录(将子域留空,优先级为 10)。 [![Create DNS MX Record for iRedMail](https://www.tecmint.com/wp-content/uploads/2017/05/Create-DNS-MX-Record-for-iRedMail.png)][18] -为 iRedMail 创建 DNS MX 记录 +*为 iRedMail 创建 DNS MX 记录* -在反向查找区域(相应地替换 iRedMail 服务器的 IP 地址)添加 PTR 记录。如果你尚未为域控制器配置反向区域,请阅读以下教程: - -1. [从 Windows 管理 Samba4 DNS 组策略][2] +在反向查找区域(相应地替换 iRedMail 服务器的 IP 地址)添加 PTR 记录。如果你尚未为域控制器配置反向区域,请阅读以下教程:[从 Windows 管理 Samba4 DNS 组策略][2] [![Create DNS PTR Record for iRedMail](https://www.tecmint.com/wp-content/uploads/2017/05/Create-DNS-PTR-Record-for-iRedMail.png)][19] -为 iRedMail 创建 DNS PTR 记录 +*为 iRedMail 创建 DNS PTR 记录* -7.添加了使邮件服务器正常运行的基本 DNS 记录后,请进入 iRedMail 机器,安装 bind-utils 软件包,并按如下建议查询新添加的邮件记录。 +7、添加了使邮件服务器正常运行的基本 DNS 记录后,请进入 iRedMail 机器,安装 bind-utils 软件包,并按如下建议查询新添加的邮件记录。 Samba4 AD DC DNS 应该会响应之前添加的 DNS 记录。 @@ -102,49 +102,48 @@ Samba4 AD DC DNS 应该会响应之前添加的 DNS 记录。 # host mail.tecmint.lan # host 192.168.1.245 ``` - [![Install Bind and Query Mail Records](https://www.tecmint.com/wp-content/uploads/2017/05/Install-Bind-and-Query-Mail-Records.png)][20] -安装 Bind 并查询邮件记录 +[![Install Bind and Query Mail Records](https://www.tecmint.com/wp-content/uploads/2017/05/Install-Bind-and-Query-Mail-Records.png)][20] -在一台 Windows 机器上,打开命令行窗口并使用[ nslookup 命令][21]查询上面的邮件服务器记录。 +*安装 Bind 并查询邮件记录* -8. 作为最后一个先决要求,在 Samba4 AD DC 中创建一个具有最小权限的新用户帐户,并使用名称 vmail, 为此用户选择一个强密码, 并确保该用户的密码永不过期。 +在一台 Windows 机器上,打开命令行窗口并使用 [nslookup 命令][21]查询上面的邮件服务器记录。 + +8、 作为最后一个先决要求,在 Samba4 AD DC 中创建一个具有最小权限的新用户帐户,并使用名称 vmail, 为此用户选择一个强密码, 并确保该用户的密码永不过期。 vmail 帐户将被 iRedMail 服务用来查询 Samba4 AD DC LDAP 数据库并拉取电子邮件帐户。 -要创建 vmail 账户,如截图所示,使用加入了已安装 RSAT 工具域的 Windows 机器上的 ADUC 图形化工具,或者按照先前主题中那样用 samba-tool 命令行直接在域控制器中运行。 - -1. [在 Linux 命令行中管理 Samba4 AD][3] +要创建 vmail 账户,如截图所示,使用加入了已安装 RSAT 工具域的 Windows 机器上的 ADUC 图形化工具,或者按照先前主题中那样用 [samba-tool 命令行][3]直接在域控制器中运行。 在本指导中,我们会使用上面提到的第一种方法。 [![Active Directory Users and Computers](https://www.tecmint.com/wp-content/uploads/2017/05/Active-Directory-Users-and-Computers.png)][22] -AD 用户和计算机 +*AD 用户和计算机* [![Create New User for iRedMail](https://www.tecmint.com/wp-content/uploads/2017/05/Create-New-User-for-iRedMail.png)][23] -为 iRedMail 创建新的用户 +*为 iRedMail 创建新的用户* [![Set Strong Password for User](https://www.tecmint.com/wp-content/uploads/2017/05/Set-Strong-Password-for-User.png)][24] -为用户设置强密码 +*为用户设置强密码* -9. 在 iRedMail 系统中,用下面的命令测试 vmail 用户能够查询 Samba4 AD DC LDAP 数据库。返回的结果应该是你的域的对象总数, 如下截图所示。 +9、 在 iRedMail 系统中,用下面的命令测试 vmail 用户能够查询 Samba4 AD DC LDAP 数据库。返回的结果应该是你的域的对象总数, 如下截图所示。 ``` # ldapsearch -x -h tecmint.lan -D 'vmail@tecmint.lan' -W -b 'cn=users,dc=tecmint,dc=lan' ``` -注意:相应地替换域名以及 Samba4 AD 的 LDAP dn (‘cn=users,dc=tecmint,dc=lan‘)。 +注意:相应地替换域名以及 Samba4 AD 的 LDAP dn (`cn=users,dc=tecmint,dc=lan`)。 [![Query Samba4 AD DC LDAP](https://www.tecmint.com/wp-content/uploads/2017/05/Query-Samba4-AD-DC-LDAP.png)][25] -查询 Samba4 AD DC LDAP +*查询 Samba4 AD DC LDAP* ### 第三步:将 iRedMail 服务集成到 Samba4 AD DC 中 -10. 现在是时候修改 iRedMail 服务(Postfix、Dovecot 和 Roundcube)以便为邮箱帐户查询 Samba4 域控制器。 +10、 现在是时候修改 iRedMail 服务(Postfix、Dovecot 和 Roundcube)以便为邮箱帐户查询 Samba4 域控制器。 第一个要修改的服务是 MTA 代理,Postfix。执行以下命令禁用一系列的 MTA 设置,添加你的域名到 Postfix 本地域以及邮箱域中,并使用 Dovecot 代理发送已接收的邮件到用户邮箱中。 @@ -167,7 +166,7 @@ AD 用户和计算机 # postmap hash:/etc/postfix/transport ``` -11. 接下来,用你最喜欢的文本编辑器创建 Postfix `/etc/postfix/ad_sender_login_maps.cf` 配置文件,并添加下面的配置。 +11、 接下来,用你最喜欢的文本编辑器创建 Postfix 的 `/etc/postfix/ad_sender_login_maps.cf` 配置文件,并添加下面的配置。 ``` server_host = tecmint.lan @@ -184,7 +183,7 @@ result_attribute= userPrincipalName debuglevel = 0 ``` -12. 使用下面的配置创建 `/etc/postfix/ad_virtual_mailbox_maps.cf`。 +12、 使用下面的配置创建 `/etc/postfix/ad_virtual_mailbox_maps.cf`。 ``` server_host = tecmint.lan @@ -202,7 +201,7 @@ result_format = %d/%u/Maildir/ debuglevel = 0 ``` -13. 使用下面的配置创建 `/etc/postfix/ad_virtual_group_maps.cf`。 +13、 使用下面的配置创建 `/etc/postfix/ad_virtual_group_maps.cf`。 ``` server_host = tecmint.lan @@ -221,9 +220,9 @@ result_attribute= userPrincipalName debuglevel = 0 ``` -替换上面三个配置文件中的 server_host、bind_dn、bind_pw 和 search_base 以反应你自己域的设置。 +替换上面三个配置文件中的 `server_host`、`bind_dn`、`bind_pw` 和 `search_base` 以反应你自己域的设置。 -14. 接下来,打开 Postfix 主配置文件,通过在下面的行前添加 `#`,搜索并禁用 iRedAPD 的 check_policy_service 和 smtpd_end_of_data_restrictions。 +14、 接下来,打开 Postfix 主配置文件,通过在下面的行前添加 `#` 注释,搜索并禁用 iRedAPD 的 `check_policy_service` 和 `smtpd_end_of_data_restrictions`。 ``` # nano /etc/postfix/main.cf @@ -236,7 +235,7 @@ debuglevel = 0 #smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:7777 ``` -15. 现在,通过执行一系列查询,验证 Postfix 是否使用现有的域用户和域组绑定到 Samba AD,如以下示例所示。 +15、 现在,通过执行一系列查询,验证 Postfix 是否使用现有的域用户和域组绑定到 Samba AD,如以下示例所示。 结果应与下面的截图类似。 @@ -245,13 +244,14 @@ debuglevel = 0 # postmap -q tecmint_user@tecmint.lan ldap:/etc/postfix/ad_sender_login_maps.cf # postmap -q linux_users@tecmint.lan ldap:/etc/postfix/ad_virtual_group_maps.cf ``` - [![Verify Postfix Binding to Samba AD](https://www.tecmint.com/wp-content/uploads/2017/05/Verify-Postfix-Binding-to-Samba-AD.png)][26] -验证 Postfix 绑定到了 Samba AD +[![Verify Postfix Binding to Samba AD](https://www.tecmint.com/wp-content/uploads/2017/05/Verify-Postfix-Binding-to-Samba-AD.png)][26] + +*验证 Postfix 绑定到了 Samba AD* 相应替换 AD 用户及组帐户。同样,确保你使用的 AD 组已被分配了一些成员。 -16. 在下一步中修改 Dovecot 配置文件以查询 Samba4 AD DC。打开 `/etc/dovecot/dovecot-ldap.conf` 文件并添加下面的行。 +16、 在下一步中修改 Dovecot 配置文件以查询 Samba4 AD DC。打开 `/etc/dovecot/dovecot-ldap.conf` 文件并添加下面的行。 ``` hosts = tecmint.lan:389 @@ -269,28 +269,28 @@ default_pass_scheme = CRYPT user_attrs = =home=/var/vmail/vmail1/%Ld/%Ln/Maildir/,=mail=maildir:/var/vmail/vmail1/%Ld/%Ln/Maildir/ ``` -Samba4 AD 帐户的邮箱将会存储在 /var/vmail/vmail1/your_domain.tld/your_domain_user/Maildir/ 中。 +Samba4 AD 帐户的邮箱将会存储在 `/var/vmail/vmail1/your_domain.tld/your_domain_user/Maildir/` 中。 -17. 确保 dovecot 的主配置文件中启用了 pop3 和 imap 协议。打开 `/etc/dovecot/dovecot.conf` 验证是否启用了 quota 和 acl 邮件插件,并检查这些值是否存在。 +17、 确保 dovecot 的主配置文件中启用了 pop3 和 imap 协议。打开 `/etc/dovecot/dovecot.conf` 验证是否启用了 `quota` 和 `acl` 邮件插件,并检查这些值是否存在。 [![Enable Pop3 and Imap in Dovecot](https://www.tecmint.com/wp-content/uploads/2017/05/Enable-Pop3-Imap-in-Dovecot.png)][27] -在 Dovecot 中启用 POP3 和 IMAP +*在 Dovecot 中启用 POP3 和 IMAP* -18. 可选地,如果要将全局硬配额设置为每个域用户的最大不超过 500 MB 存储,请在 /etc/dovecot/dovecot.conf 文件中添加以下行。 +18、 可选地,如果要将全局硬配额设置为每个域用户的最大不超过 500 MB 存储,请在 `/etc/dovecot/dovecot.conf` 文件中添加以下行。 ``` quota_rule = *:storage=500M ``` -19. 最后,为了使目前这些更改生效,用 root 权限执行下面的命令重启并验证 Postfix 和 Dovecot 守护进程的状态。 +19、 最后,为了使目前这些更改生效,用 root 权限执行下面的命令重启并验证 Postfix 和 Dovecot 守护进程的状态。 ``` # systemctl restart postfix dovecot # systemctl status postfix dovecot ``` -20. 为了使用 IMAP 协议从命令行测试邮件服务器配置,请使用 telnet 或[ netcat 命令][28],如下所示。 +20、 为了使用 IMAP 协议从命令行测试邮件服务器配置,请使用 telnet 或 [netcat 命令][28],如下所示。 ``` # nc localhost 143 @@ -298,9 +298,10 @@ a1 LOGIN ad_user@your_domain.tld ad_user_password a2 LIST “” “*” a3 LOGOUT ``` - [![Test iRedMail Configuration](https://www.tecmint.com/wp-content/uploads/2017/05/Test-iRedMail-Configuration.png)][29] -测试 iRedMail 配置 +[![Test iRedMail Configuration](https://www.tecmint.com/wp-content/uploads/2017/05/Test-iRedMail-Configuration.png)][29] + +*测试 iRedMail 配置* 如果你可以使用 Samba4 用户帐户从命令行执行 IMAP 登录,那么 iRedMail 服务器似乎已经准备好发送和接收 AD 帐户的邮件。 @@ -312,34 +313,33 @@ a3 LOGOUT 我是一个电脑上瘾的家伙,开源和基于 linux 的系统软件的粉丝,在 Linux 发行版桌面、服务器和 bash 脚本方面拥有大约4年的经验。 - ----- via: https://www.tecmint.com/integrate-iredmail-to-samba4-ad-dc-on-centos-7/ -作者:[ Matei Cezar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +作者:[Matei Cezar][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:https://www.tecmint.com/author/cezarmatei/ -[1]:https://www.tecmint.com/install-iredmail-on-centos-7-for-samba4-ad-integration/ -[2]:https://www.tecmint.com/manage-samba4-dns-group-policy-from-windows/ -[3]:https://www.tecmint.com/manage-samba4-active-directory-linux-command-line/ +[1]:https://linux.cn/article-8567-1.html +[2]:https://linux.cn/article-8258-1.html +[3]:https://linux.cn/article-8070-1.html [4]:https://www.tecmint.com/setup-postfix-mail-server-and-dovecot-with-mariadb-in-centos/ -[5]:https://www.tecmint.com/install-samba4-active-directory-ubuntu/ -[6]:https://www.tecmint.com/set-add-static-ip-address-in-linux/ +[5]:https://linux.cn/article-8065-1.html +[6]:https://linux.cn/article-3977-1.html [7]:https://www.tecmint.com/ifconfig-command-examples/ -[8]:https://www.tecmint.com/configure-network-connections-using-nmcli-tool-in-linux/ +[8]:https://linux.cn/article-5410-1.html [9]:https://www.tecmint.com/wp-content/uploads/2017/05/Find-Network-Interface-Name.png [10]:https://www.tecmint.com/wp-content/uploads/2017/05/Configure-Network-Settings.png [11]:https://www.tecmint.com/wp-content/uploads/2017/05/Verify-Network-DNS-Configuration.png [12]:https://www.tecmint.com/wp-content/uploads/2017/05/Sync-Time-with-Samba-NTP-Server.png [13]:https://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ [14]:https://www.tecmint.com/wp-content/uploads/2017/05/Auto-Sync-Time-with-Samba-NTP.png -[15]:https://www.tecmint.com/manage-samba4-ad-from-windows-via-rsat/ -[16]:https://www.tecmint.com/manage-samba4-ad-from-windows-via-rsat/ +[15]:https://linux.cn/article-8097-1.html +[16]:https://linux.cn/article-8097-1.html [17]:https://www.tecmint.com/wp-content/uploads/2017/05/Create-DNS-A-Record-for-iRedMail.png [18]:https://www.tecmint.com/wp-content/uploads/2017/05/Create-DNS-MX-Record-for-iRedMail.png [19]:https://www.tecmint.com/wp-content/uploads/2017/05/Create-DNS-PTR-Record-for-iRedMail.png From 6bf3e4dcbf824bd920a8d570c136505f80e76ada Mon Sep 17 00:00:00 2001 From: WangYue <815420852@qq.com> Date: Thu, 6 Jul 2017 14:17:54 +0800 Subject: [PATCH 050/100] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8E=9F=E6=96=87201?= =?UTF-8?q?70426=20How=20to=20get=20started=20learning=20to=20program.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除原文20170426 How to get started learning to program.md --- ... How to get started learning to program.md | 133 ------------------ 1 file changed, 133 deletions(-) delete mode 100644 sources/talk/20170426 How to get started learning to program.md diff --git a/sources/talk/20170426 How to get started learning to program.md b/sources/talk/20170426 How to get started learning to program.md deleted file mode 100644 index 942f18f1dd..0000000000 --- a/sources/talk/20170426 How to get started learning to program.md +++ /dev/null @@ -1,133 +0,0 @@ -===================================== -翻译中 WangYueScream -====================================== - - -How to get started learning to program -============================================================ - -### Ever wondered, "How can I learn to program?" We provide guidance to help you find the approach that best suits your needs and situation. - - -![Know thyself](https://opensource.com/sites/default/files/styles/image-full-size/public/u23316/roman-know-thyself-osdc-lead.png?itok=oWuH8hRr "Know thyself") ->Image by : Artist unknown. Public domain, [via Wikimedia Commons][20]. Modified by Opensource.com. - -There's a lot of buzz lately about learning to program. Not only is there a [shortage of people][21] compared with the open and pending positions in software development, programming is also a career with one of the [highest salaries][22] and [highest job satisfaction rates][23]. No wonder so many people are looking to break into the industry! - -But how, exactly, do you do that? "**How can I learn to program?**" is a common question. Although I don't have all the answers, hopefully this article will provide guidance to help you find the approach that best suits your needs and situation. - - - -### What's your learning style? - -Before you start your learning process, consider not only your options, but also yourself. The ancient Greeks had a saying, [γνῶθι σεαυτόν][24] (gnothi seauton), meaning "know thyself". Undertaking a large learning program is difficult. Self awareness is necessary to make sure you are making the choices that will lead to the highest chance of success. Be honest with yourself when you answer the following questions: - -* **What is your preferred learning style?** How do you learn best? Is it by reading? Hearing a lecture? Mostly hands-on experimentation? Choose the style that is most effective for you. Don't choose a style because it's popular or because someone else said it worked for them. - -* **What are your needs and requirements?** Why are you looking into learning how to program? Is it because you wish to change jobs? If so, how quickly do you need to do that? Keep in mind, these are  _needs_ , not  _wants_ . You may  _want_  a new job next week, but  _need_  one within a year to help support your growing family. This sort of timing will matter when selecting a path. - -* **What are your available resources?** Sure, going back to college and earning a computer science degree might be nice, but you must be realistic with yourself. Your life must accommodate your learning. Can you afford—both in time and money—to set aside several months to participate in a bootcamp? Do you even live in an area that provides learning opportunities, such as meetups or college courses? The resources available to you will have a large impact on how you proceed in your learning. Research these before diving in. - -### Picking a language - -As you start your path and consider your options, remember that despite what many will say, the choice of which programming language you use to start learning simply does  _not_  matter. Yes, some languages are more popular than others. For instance, right now JavaScript, Java, PHP, and Python are among the [most popular languages][25] according to one study. But what is popular today may be passé next year, so don't get too hung up on choice of language. The underlying principles of methods, classes, functions, conditionals, control flow, and other programming concepts will remain more or less the same regardless of the language you use. Only the grammar and community best practices will change. Therefore you can learn to program just as well in [Perl][26] as you can in [Swift][27] or [Rust][28]. As a programmer, you will work with and in many different languages over the course of your career. Don't feel you're "stuck" with the first one you learn. - -### Test the waters - -Unless you already have dabbled a bit and know for sure that programming is something you'd like to spend the rest of your life doing, I advise you to dip a toe into the waters before diving in headfirst. This work is not for everyone. Before going all-in on a learning program, take a little time to try out one of the smaller, cheaper options to get a sense of whether you'll enjoy the work enough to spend 40 hours a week doing it. If you don't enjoy this work, it's unlikely you'll even finish the program. If you do finish your learning program despite that, you may be miserable in your subsequent job. Life is too short to spend a third of it doing something you don't enjoy. - -Thankfully, there is a lot more to software development than simply programming. It's incredibly helpful to be familiar with programming concepts and to understand how software comes together, but you don't need to be a programmer to get a well-paying job in software development. Additional vital roles in the process are technical writer, project manager, product manager, quality assurance, designer, user experience, ops/sysadmin, and data scientist, among others. Many different roles and people are required to launch software successfully. Don't feel that learning to program requires you to become a programmer. Explore your options and choose what's best for you. - -### Learning resources - -What are your options for learning resources? As you've probably already discovered, those options are many and varied, although not all of them may be available in your area. - -* **Bootcamps**: Bootcamps such as [App Academy][5] and [Bloc][6] have become popular in recent years. Often charging a fee of $10K USD or more, bootcamps advertise that they can train a student to become an employable programmer in a matter of weeks. Before enrolling in a coding bootcamp, research the program to make sure it delivers on its promises and is able to place its students in well-paying, long-term positions after graduation. The money is one cost, whereas the time is another—these typically are full-time programs that require the student to set aside any other obligations for several weeks in a row. These two costs often put bootcamps outside the budget of many prospective programmers. - -* **Community college/vocational training center**: Community colleges often are overlooked by people investigating their options for learning to program, and that's a shame. The education you can receive at a community college or vocational training center can be as effective as other options, at a fraction of the cost. - -* **State/local training programs**: Many regions recognize the economic benefits of boosting technology investments in their area and have developed training programs to create well-educated and -prepared workforces. Training program examples include [Code Oregon][7] and [Minneapolis TechHire][8]. Check to see whether your state, province, or municipality offers such a program. - -* **Online training**: Many companies and organizations offer online technology training programs. Some, such as [Linux Foundation][9], are dedicated to training people to be successful with open source technologies. Others, like [O'Reilly Media][10], [Lynda.com][11], and [Coursera][12] provide training in many aspects of software development. [Codecademy][13] provides an online introduction to programming concepts. The costs of each program will vary, but most of them will allow you to learn on your schedule. - -* **MOOCs**: MOOCs—Massive Open Online Courses—have really picked up steam in the past few years. World-class universities, such as [Harvard][14], [Stanford][15], [MIT][16], and others have been recording their courses and making them available online for free. The self-directed nature of the courses may not be a good fit for everyone, but the material available makes this a valuable learning option. - -* **Books**: Many people love self-directed learning using books. It's quite economical and provides ready reference material after the initial learning phase. Although you can order and access books through online services like [Safari][17] and [Amazon][18], don't forget to check your local public library as well. - -### Support network - -Whichever learning resources you choose, the process will be more successful with a support network. Sharing your experiences and challenges with others can help keep you motivated, while providing a safe place to ask questions that you might not feel confident enough to ask elsewhere yet. Many towns have local user groups that gather to discuss and learn about software technologies. Often you can find these listed at [Meetup.com][29]. Special interest groups, such as [Women Who Code][30] and [Code2040][31], frequently hold meetings and hackathons in most urban areas and are a great way to meet and build a support network while you're learning. Some software conferences host "hack days" where you can meet experienced software developers and get help with concepts on which you're stuck. For instance, every year [PyCon][32] features several days of the conference for people to gather and work together. Some projects, such as [BeeWare][33], use these sprint days to assist new programmers to learn and contribute to the project. - -Your support network doesn't have to come from a formal meetup. A small study group can be as effective at keeping you motivated to stay with your learning program and can be as easy to form as posting an invitation on your favorite social network. This is particularly useful if you live in an area that doesn't currently have a large community of software developers to support several meetups and user groups. - -### Steps for getting started - -In summary, to give yourself the best chance of success should you decide to learn to program, follow these steps: - -1. Gather your list of requirements/needs and resources - -2. Research the options available to you in your area - -3. Discard the options that do not meet your requirements and resources - -4. Select the option(s) that best suit your requirements, resources, and learning style - -5. Find a support network - -Remember, though: Your learning process will never be complete. The software industry moves quickly, with new technologies and advances popping up nearly every day. Once you learn to program, you must commit to spending time to learn about these new advances. You cannot rely on your job to provide you this training. Only you are responsible for your own career development, so if you wish to stay up-to-date and employable, you must stay abreast of the latest technologies in the industry. - -Good luck! - --------------------------------------------------------------------------------- - -作者简介: - -VM (Vicky) Brasseur - VM (aka Vicky) is a manager of technical people, projects, processes, products and p^Hbusinesses. In her more than 18 years in the tech industry she has been an analyst, programmer, product manager, software engineering manager, and director of software engineering. Currently she is a Senior Engineering Manager in service of an upstream open source development team at Hewlett Packard Enterprise. VM blogs at anonymoushash.vmbrasseur.com and tweets at @vmbrasseur. - --------- - -via: https://opensource.com/article/17/4/how-get-started-learning-program - -作者:[VM (Vicky) Brasseur ][a] -译者:[译者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/vmbrasseur -[1]:https://opensource.com/tags/python?src=programming_resource_menu -[2]:https://opensource.com/tags/javascript?src=programming_resource_menu -[3]:https://opensource.com/tags/perl?src=programming_resource_menu -[4]:https://developers.redhat.com/?intcmp=7016000000127cYAAQ&src=programming_resource_menu -[5]:https://www.appacademy.io/ -[6]:https://www.bloc.io/ -[7]:http://codeoregon.org/ -[8]:http://www.minneapolismn.gov/cped/metp/TechHire#start -[9]:https://training.linuxfoundation.org/ -[10]:http://shop.oreilly.com/category/learning-path.do -[11]:https://www.lynda.com/ -[12]:https://www.coursera.org/ -[13]:https://www.codecademy.com/ -[14]:https://www.edx.org/school/harvardx -[15]:http://online.stanford.edu/courses -[16]:https://ocw.mit.edu/index.htm -[17]:https://www.safaribooksonline.com/ -[18]:https://amazon.com/ -[19]:https://opensource.com/article/17/4/how-get-started-learning-program?rate=txl_aE6F2oOUSgQDveWFtrPWIbA1ULFwfOp017zV35M -[20]:https://commons.wikimedia.org/wiki/File:Roman-mosaic-know-thyself.jpg -[21]:http://www.techrepublic.com/article/report-40-of-employers-worldwide-face-talent-shortages-driven-by-it/ -[22]:http://web.archive.org/web/20170328065655/http://www.businessinsider.com/highest-paying-jobs-in-america-2017-3/#-25 -[23]:https://stackoverflow.com/insights/survey/2017/#career-satisfaction -[24]:https://en.wikipedia.org/wiki/Know_thyself -[25]:https://stackoverflow.com/insights/survey/2017/#most-popular-technologies -[26]:https://learn.perl.org/tutorials/ -[27]:http://shop.oreilly.com/product/0636920045946.do -[28]:https://doc.rust-lang.org/book/ -[29]:https://www.meetup.com/ -[30]:https://www.womenwhocode.com/ -[31]:http://www.code2040.org/ -[32]:https://us.pycon.org/ -[33]:http://pybee.org/ -[34]:https://opensource.com/user/10683/feed -[35]:https://opensource.com/article/17/4/how-get-started-learning-program#comments -[36]:https://opensource.com/users/vmbrasseur From 715a7e860388e8679489457746fa0fdf44127cd3 Mon Sep 17 00:00:00 2001 From: WangYue <815420852@qq.com> Date: Thu, 6 Jul 2017 14:21:40 +0800 Subject: [PATCH 051/100] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AF=91=E6=96=87201?= =?UTF-8?q?70426=20How=20to=20get=20started=20learning=20to=20program.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加译文20170426 How to get started learning to program.md --- ... How to get started learning to program.md | 177 ++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 translated/talk/20170426 How to get started learning to program.md diff --git a/translated/talk/20170426 How to get started learning to program.md b/translated/talk/20170426 How to get started learning to program.md new file mode 100644 index 0000000000..45fc37e662 --- /dev/null +++ b/translated/talk/20170426 How to get started learning to program.md @@ -0,0 +1,177 @@ + +如何开始学习编程? +====================================================== + +### 编程初学者可能都思考过这个问题,“我该怎么学编程?”这里我们提供些相关的参考指导来帮助你找到最适合自己学习情况和学习需要的方法。 + + +![Know thyself](https://opensource.com/sites/default/files/styles/image-full-size/public/u23316/roman-know-thyself-osdc-lead.png?itok=oWuH8hRr "Know thyself") + + +>图片来源 : Opensource.com 修改自 [维基共享][20]里的某不知名艺术家的作品 + + +最近有很多关于学习编程的争论。不仅仅是因为与软件开发公司公开的待应聘的职位数量相比较[符合招聘要求的人远远无法满足缺口][21],编程也是[工资最高][22]和[工作满足感最强][23]的众多职业之一。也难怪越来越多的人都想进入这个行业。 + + +但是你要怎么做才能正确地入行呢?“**我应该怎么学习编程?**”是初学者常见的一个问题。尽管我没有这些问题的全部答案,但是我希望这篇文章能够给你提供相关指导来帮助你找到最适合你的需求和自身情况发展的解决办法。 + + +### 你的学习方式是什么? + +Before you start your learning process, consider not only your options, but also yourself. The ancient Greeks had a saying, [γνῶθι σεαυτόν][24] (gnothi seauton), meaning "know thyself". Undertaking a large learning program is difficult. Self awareness is necessary to make sure you are making the choices that will lead to the highest chance of success. Be honest with yourself when you answer the following questions: + + +在你开始学习编程之前,你需要考虑的不仅仅是你的方向选择,还要更多的考虑下你自己。古罗马人有句谚语,[γνῶθι σεαυτόν][24](gnothi seauton),意思是“认识你自己”。进行一个大型的编程学习难度不小。足够的自我认识是非常有必要的,这能够确保你做出的选择通向成功的机会非常大。你需要思考并诚实地回答接下来的这些问题: + + +* **你最喜欢什么样的学习方式?**怎么做你才能学到最好?是通过阅读的方式吗?还是听讲座?还是主要通过动手实践?你需要选择对你最有效的方法。不要仅仅因为这种学习方法流行或者有其他人说过这种方法对他们很有用就选择了这种方法。 + + +* **你的需要和要求是什么?**你为什么想学习如何编程?是因为你只是想换一份工作吗?如果是这样的话,你需要多次时间才能完成呢?你要牢记,这些是_需要的_ ,不是_想要的_ 。你可能_想要_下周就换份新工作,但是_需要_ 有人在接下来的一年里帮忙供养你的正在成长的家庭。当你在人生的道路上面临方向的抉择时,时间的安排特别重要。 + + +* **你能获取的参考资料有哪些?**当然,重返大学并获得一份计算机科学专业的学位证书可能也不错,但是你必须对你自己实事求是面对现实。你的生活必须和你学习相适应。你能承受花费几个月的时间和不菲的费用去参加集训吗?你是否生活在一个提供学习机会的地方,比如提供技术性的聚会或者大学课程?你能获取到的参考资料会对你的学习过程产生巨大的影响。在打算学编程换工作前先调查好这些。 + + +### 选择一门编程语言 + + +当你打算开始你的编程学习之路和考虑你的选择的时候,请记住不管其他人说什么,选择哪门编程语言来开始你的编程学习 _关系不大_。是的,是有些编程语言比其他的更流行。比如,根据一份调查研究,目前 JavaScript,Java,PHP, 和 Python 处于 [最受欢迎最流行的编程][25] 中的前排。但是现在正流行的编程语言有可能过几年就过时了,所以不用太纠结编程语言的选择。像那些方法,类,函数,条件,控制流程和其他的编程的概念思想等等,不管你选的哪门编程语言,他们的底层原理基本保持一致。只有语法和社区的实例会变。因此你能够用 [Perl][26] 学习编程,也可以用 [Swift][27] 或者 [Rust][28]。作为一个程序员,你会在你的职业生涯里用很多不同的编程语言来工作。不要认为你被困在了编程语言的选择上。 + + + +### Test the waters + +### 市场测试 + + +除非你已经涉足过这个行业或者确信你愿意花费你生命的剩余时光来编程,我建议你最好还是潜水之前先用脚趾头来试试水温之类的来判断这水适不适合潜水。这种工作不是每个人都能做的。在把全部希望都压在学习编程之前,你可以先尝试花费少量时间金钱来学习一小部分知识点来了解自己是否会享受这种每周起码花费 40 个小时来编码工作的生活。如果你不喜欢这种工作,你不太可能完成编程项目的学习。即便你完成结束了编程的学习阶段,你也会在你以后的编程工作中感到无比痛苦。人生苦短就不要花费你人生三分之一的时间来做你不喜欢的事了。  + + +谢天谢地,软件开发不仅仅需要编程。熟悉编程概念和理解软件是怎么和他们结合在一起的是非常有用的,但是你不需要成为一个程序员也能在软件开发行业中找到一份报酬不菲的工作。在软件开发过程中,额外的重要角色有技术文档撰写人、项目经理、产品经理、测试人员、设计人员、用户体验设计者、运维/系统管理员和数据科学家等。软件成功的启动需要很多角色的人之间相互配合。不要觉得学习了编程就要求你成为一个程序员。你需要探索你的选择并确定哪个选择才是最适合你的。 + + +### 参考的学习资料 + + +你对学习参考资料的选择是什么?可能正如你已经发现的那样,可供选择的参考资料非常多,尽管在你的那片区域不是所有的资料都能够获得。 + + +* **训练营**:最近这几年像 [App Academy][5] 和 [Bloc][6] 这样的训练营越来越流行。训练营通常收费 $10K或者更多,他们宣称在几周内就能够把一个学生培训成一个称职的程序员。在参加编程集训营前,你需要研究下你将要学习的项目能确保正如它所承诺的那样,学生学完毕业后能够找到一个高薪的长期供职的职位。一方面花费了数目不小的钱财,而且时间也花费了不少—通常这些都是典型的全日制课程并且要求学生在接下来的连续几周里把其他的事先放在一边专心课程学习。然而时间金钱这两项不菲的消耗通常会使很多未来的程序员无法参加训练营。 + + +* **社区学院/职业培训中心**:社区学院常常被那些研究自己对学习编程的选择的人所忽视,不得不说这些人该为自己对社区学院的忽视感到羞愧。你在社区学院或者职业培训中心能够接受到的教育是和你选择其他方式学习编程的学习效果一样有效,而且费用也不高。 + + +* **国家/地方的培训项目**:许多地区都认识到在他们的地区增加技术投资的经济效益,并且已经制定了培训计划来培养受过良好教育和准备好的劳动力。培训项目的案例包括了[Code Oregon][7] 和 [Minneapolis TechHire][8]。检查下你的州、省或自治区是否提供这样的项目。 + + +* **在线训练**:许多公司和组织都提供在线技术培训项目。比如,[Linux Foundation][9]致力于通过开源技术使人们获得成功。其他的像[O'Reilly Media][10], [Lynda.com][11], 和 [Coursera][12]在软件开发涉及的许多方面提供培训。[Codecademy][13]提供对编程概念的在线介绍。每个项目的成本会有所不同,但大多数项目会允许你在你的日程安排中学习。 + + +* **MOOCs**:在过去的几年里,moocs-大规模开放在线课程的发展势头已经很好了。像 [Harvard][14], [Stanford][15], [MIT][16] 和其他的一些世界一流大学他们一直在记录他们的课程,并免费提供在线课程。课程的自我指导性质可能并不适合所有人,但可利用的材料使这成为一个有价值的学习选择。 + + +* **专业书籍**:许多人喜欢用书自学。这是相当经济的,在初步学习阶段后提供了现成的参考资料。尽管你可以通过在线服务订购和访问图书像[Safari][17] 和 [Amazon][18],但是也不要忘了检查你本地的公共图书馆。 + + +### 网络支持 + + +无论你选择哪一种学习资源,有网络支持都将获得更大的成功。与他人分享你的经历和挑战可以帮助你保持动力,同时为你提供一个安全的地方去问那些你可能还没有足够自信到其他地方去问的问题。许多城镇都有当地的用户群聚在一起讨论和学习软件技术。通常你可以在 [Meetup.com][29] 这里找到。专门的兴趣小组,比如 [Women Who Code][30] 和 [Code2040][31],在大多数城市地区,经常举行会议和黑客马拉松活动,这是在你学习的时候,一个很好的方式来结识并建立一个支持网络。一些软件会议举办“黑客日”,在那里你可以遇到有经验的软件开发人员,他们能够帮助你解决你所困扰的一些问题。例如,每年的[PyCon][32]会议都会提供几天的时间来让人们聚集在一起工作、研讨。一些项目,比如[BeeWare][33],使用这些短暂的时间来帮助新程序员学习和对这些项目做贡献。 + + +你的网络支持不需要来自正式的聚会。一个小的学习小组可以有效地保持你的学习积极性,并且可以像在你最喜欢的社交网络上发布邀请一样容易形成。如果你生活在一个没有大量软件开发人员的社区来支持几个meetups和用户组,那么这一点特别有用。 + + +### 开始学习编程的几个步骤 + +In summary, to give yourself the best chance of success should you decide to learn to program, follow these steps: + +1. Gather your list of requirements/needs and resources + +2. Research the options available to you in your area + +3. Discard the options that do not meet your requirements and resources + +4. Select the option(s) that best suit your requirements, resources, and learning style + +5. Find a support network + +简单的来说,既然你决定学习编程,可以参考这几个方法给自己一个尽可能成功的机会: + +1. 将你的需要/需求和参考学习资料列出清单并进行收集 + +2. 搜寻在你的当地那里能够可用的选择 + +3. 放弃不能符合你的需求和参考学习资料的选择 + +4. 选择最符合你需求的和最适合你的学习参考资源 + +5. 找到一个能够得到支持的网络 + + +务必牢记:你的学习过程永远不会结束。高速发展的软件产业,会导致新技术和新进展几乎每天都会出现。一旦你学会了编程,你就必须花时间去学习适应这些新的进步。你不能依靠你的工作来为你提供这种培训。只有你自己负责自己的职业发展,所以如果你想保持最新的技术和工作能力,你必须紧跟行业最新的技术。 + + +祝你好运! + +-------------------------------------------------------------------------------- + +作者简介: + + +VM (Vicky) Brasseur - VM (aka Vicky) 是一个技术人员,也是项目、工作进程、产品和企业的经理。在她的长达 18 年的科技行业里,她曾是一名分析师、程序员、产品经理、软件工程经理和软件工程总监。目前,她是惠普企业上游开源开发团队的高级工程经理。她的博客是 anonymoushash.vmbrasseur.com,推特是 @vmbrasseur。  + + + + + +-------- + +via: https://opensource.com/article/17/4/how-get-started-learning-program + +作者:[VM (Vicky) Brasseur ][a] +译者:[WangYueScream](https://github.com/WangYueScream) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/vmbrasseur +[1]:https://opensource.com/tags/python?src=programming_resource_menu +[2]:https://opensource.com/tags/javascript?src=programming_resource_menu +[3]:https://opensource.com/tags/perl?src=programming_resource_menu +[4]:https://developers.redhat.com/?intcmp=7016000000127cYAAQ&src=programming_resource_menu +[5]:https://www.appacademy.io/ +[6]:https://www.bloc.io/ +[7]:http://codeoregon.org/ +[8]:http://www.minneapolismn.gov/cped/metp/TechHire#start +[9]:https://training.linuxfoundation.org/ +[10]:http://shop.oreilly.com/category/learning-path.do +[11]:https://www.lynda.com/ +[12]:https://www.coursera.org/ +[13]:https://www.codecademy.com/ +[14]:https://www.edx.org/school/harvardx +[15]:http://online.stanford.edu/courses +[16]:https://ocw.mit.edu/index.htm +[17]:https://www.safaribooksonline.com/ +[18]:https://amazon.com/ +[19]:https://opensource.com/article/17/4/how-get-started-learning-program?rate=txl_aE6F2oOUSgQDveWFtrPWIbA1ULFwfOp017zV35M +[20]:https://commons.wikimedia.org/wiki/File:Roman-mosaic-know-thyself.jpg +[21]:http://www.techrepublic.com/article/report-40-of-employers-worldwide-face-talent-shortages-driven-by-it/ +[22]:http://web.archive.org/web/20170328065655/http://www.businessinsider.com/highest-paying-jobs-in-america-2017-3/#-25 +[23]:https://stackoverflow.com/insights/survey/2017/#career-satisfaction +[24]:https://en.wikipedia.org/wiki/Know_thyself +[25]:https://stackoverflow.com/insights/survey/2017/#most-popular-technologies +[26]:https://learn.perl.org/tutorials/ +[27]:http://shop.oreilly.com/product/0636920045946.do +[28]:https://doc.rust-lang.org/book/ +[29]:https://www.meetup.com/ +[30]:https://www.womenwhocode.com/ +[31]:http://www.code2040.org/ +[32]:https://us.pycon.org/ +[33]:http://pybee.org/ +[34]:https://opensource.com/user/10683/feed +[35]:https://opensource.com/article/17/4/how-get-started-learning-program#comments +[36]:https://opensource.com/users/vmbrasseur From 0f6dd46c01b9d11a378833f8d3f808ca43bb7b48 Mon Sep 17 00:00:00 2001 From: xiaow6 Date: Thu, 6 Jul 2017 17:03:54 +0800 Subject: [PATCH 052/100] translated by xiaow6 --- ...rverless with Apex and Composes MongoDB.md | 203 ------------------ ...rverless with Apex and Composes MongoDB.md | 201 +++++++++++++++++ 2 files changed, 201 insertions(+), 203 deletions(-) delete mode 100644 sources/tech/20161006 Go Serverless with Apex and Composes MongoDB.md create mode 100644 translated/tech/20161006 Go Serverless with Apex and Composes MongoDB.md diff --git a/sources/tech/20161006 Go Serverless with Apex and Composes MongoDB.md b/sources/tech/20161006 Go Serverless with Apex and Composes MongoDB.md deleted file mode 100644 index 7df4c4523c..0000000000 --- a/sources/tech/20161006 Go Serverless with Apex and Composes MongoDB.md +++ /dev/null @@ -1,203 +0,0 @@ -translating by xiaow6 - -# Go Serverless with Apex and Compose's MongoDB - -_Apex is tooling that wraps the development and deployment experience for AWS Lambda functions. It provides a local command line tool which can create security contexts, deploy functions, and even tail cloud logs. While AWS's Lambda service treats each function as an independent unit, Apex provides a framework which treats a set of functions as a project. Plus, it even extends the service to languages beyond just Java, Javascript, and Python such as Go._ - -Two years ago the creator of Express, the almost de facto web framework for NodeJS, said [goodbye][12] to the Node community and turned his attention to Go, the backend services language from Google, and Lambdas, the Functions as a Service offering from AWS. While one developer's actions don't make a trend, it is interesting to look at the project he has been working on named [Apex][13] because it may portend some changes in how a good portion of the web will be delivered in the future. - -##### What is a Lambda? - -Currently, if one doesn't run their own hardware they pay to run some kind of virtual server in the cloud. On it they deploy a complete stack such as Node, Express, and a custom application. Or if they have gone further with something like a Heroku or Bluemix, then they deploy their full application to some preconfigured container that already has Node setup and they just deploy the application's code. - -The next step up the abstraction ladder is to deploy just the functions themselves to the cloud without even a full application. These functions can then be triggered by a variety of external events. For example, AWS's API Gateway service can proxy HTTP requests as events to these functions and the Function as a Service provider will execute the mapped function on demand. - -###### Getting Started with Apex - -Apex is a command line tool which wraps the AWS CLI (Command Line Interface). So, the first step to getting started with Apex is to ensure that you have the command line tools from AWS installed and configured (see [AWS CLI Getting Started][14] or [Apex documentation][15]). - -Next install Apex: - -`curl https://raw.githubusercontent.com/apex/apex/master/install.sh | sh` - -Then create a directory for your new project and run: - -`apex init` - - ![apexInit](https://res.cloudinary.com/dyyck73ly/image/upload/v1475620758/nzjk1pi1rce1yarbp6xl.png) - -This sets up some of the necessary security policies and even appends the project name to the functions since the Lambda namespace is flat. It also creates some config and the functions directory with a default "Hello World" style function in Javascript. - - ![tree](https://res.cloudinary.com/dyyck73ly/image/upload/v1475620765/bbsb8h6nkc9nx2qs0foa.png) - -One of the nice things about Apex/Lambdas is that creating a function is really straightforward. Create a new directory with the name of your function and then in that create the program. To use Go, you could create a directory named `simpleGo` then in that create a small `main` program: - - ![tree2](https://res.cloudinary.com/dyyck73ly/image/upload/v1475620769/lthziblpv8iod2muyqwn.png) - -``` -// serverless/functions/simpleGo/main.go -package main - -import ( - "encoding/json" - "github.com/apex/go-apex" - "log" -) - -type helloEvent struct { - Hello string `json:"hello"` -} - -func main() { - apex.HandleFunc(func(event json.RawMessage, ctx *apex.Context) (interface{}, error) { - var h helloEvent - if err := json.Unmarshal(event, &h); err != nil { - return nil, err - } - log.Print("event.hello:", h.Hello) - return h, nil - }) -} -``` - -Apex uses a NodeJS shim, since Node is a supported runtime of Lambda, to call the binary which is created from the above program. It passes the `event` into the binary's STDIN and takes the `value` returned from the binary's STDOUT. It logs via STDERR. The `apex.HandleFunc` manages all of the piping for you. Really it is a very simple solution in the Unix tradition. You can even test it from the command line locally with a `go run main.go`: - - ![goRun](https://res.cloudinary.com/dyyck73ly/image/upload/v1475620784/ddb0vkcef50pnjgfdqn7.png) - -Deploying to the cloud is trivial with Apex: - - ![apexDeploy](https://res.cloudinary.com/dyyck73ly/image/upload/v1475620790/x6l8qg2vticpxhzi7kl3.png) - -Notice that it namespaced your function, managed versioning, and even had a place for some `env` things which we could have used for multiple development environments like `staging` and `production`. - -Executing on the cloud is trivial too with `apex invoke`: - - ![apexInvoke](https://res.cloudinary.com/dyyck73ly/image/upload/v1475620796/jccxskukvy5utgegy2hr.png) - -And we can even tail some logs: - - ![apexLog](https://res.cloudinary.com/dyyck73ly/image/upload/v1475620802/ym3z6w8ojmrq7pucr5bp.png) - -Those are results from AWS CloudWatch. They are available in the AWS UI but when developing it is much faster to follow them like this in another terminal. - -##### What's Inside? - -It is instructive to see inside the artifact that is actually deployed. Apex packages up the shim and everything needed for the function to run. Plus, it goes ahead and configures things like the entry point and security roles: - - ![lambdaConfig](https://res.cloudinary.com/dyyck73ly/image/upload/v1475620812/zz6qwocvuhhl4lq6bf4p.png) - -The Lambda service actually accepts a zip archive with all of the dependencies which it deploys to the servers that execute the function. We can use `apex build ` to create an archive locally which we can then unzip to explore: - - ![apexBuild](https://res.cloudinary.com/dyyck73ly/image/upload/v1475620818/ybidaj2i2ijurjbcqrx2.png) - -The `_apex_index.js handle` function is the original entry point. It sets up some environment variables and then calls into `index.js`.  -The `index.js` spawns a child process of the `main` Go binary and wires everything together. - -##### Go Further with `mgo` - -The Golang driver for MongoDB is called `mgo`. Using Apex to create a function that connects to Compose's MongoDB is almost as straightforward as the `simpleGo`function which we have been reviewing. Here we'll create a new function by adding a directory called `mgoGo` and creating another `main.go`: - -``` -// serverless/functions/mgoGo/main.go - -package main - -import ( - "crypto/tls" - "encoding/json" - "github.com/apex/go-apex" - "gopkg.in/mgo.v2" - "log" - "net" -) - -type person struct { - Name string `json:"name"` - Email string `json:"email"` -} - -func main() { - apex.HandleFunc(func(event json.RawMessage, ctx *apex.Context) (interface{}, error) { - tlsConfig := &tls.Config{} - tlsConfig.InsecureSkipVerify = true - - //connect URL: - // "mongodb://:@:,:/ - dialInfo, err := mgo.ParseURL("mongodb://apex:mountain@aws-us-west-2-portal.0.dblayer.com:15188, aws-us-west-2-portal.1.dblayer.com:15188/signups") - dialInfo.DialServer = func(addr *mgo.ServerAddr) (net.Conn, error) { - conn, err := tls.Dial("tcp", addr.String(), tlsConfig) - return conn, err - } - session, err := mgo.DialWithInfo(dialInfo) - if err != nil { - log.Fatal("uh oh. bad Dial.") - panic(err) - } - defer session.Close() - log.Print("Connected!") - - var p person - if err := json.Unmarshal(event, &p); err != nil { - log.Fatal(err) - } - - c := session.DB("signups").C("people") - err = c.Insert(&p) - if err != nil { - log.Fatal(err) - } - - log.Print("Created: ", p.Name," - ", p.Email) - return p, nil - }) -} -``` - -Post deploy. We can invoke with the correct kind of event to mimic calling an API: - - ![apexMgo](https://res.cloudinary.com/dyyck73ly/image/upload/v1475620829/jeprb3r6qrgjkzblkhho.png) - -The net result is to `insert` into [MongoDB on Compose][16]: - - ![composeDeploy](https://res.cloudinary.com/dyyck73ly/image/upload/v1475620833/vdy8hjiwxpe02evgqwcm.png) - -##### So Much More... - -While we have covered a lot of ground so far with Apex there are many more things to explore. There is integration with [Terraform][17]. You could deliver a polyglot language project with Javascript, Java, Python and Go if you so desired. You could configure multiple environments for things like development, staging, and production. You could tweak the runtime resources by sizing memory and timeouts which effects pricing. And you could hook functions up to the API Gateway to deliver an HTTP API or use something like SNS (Simple Notification Service) to build pipelines of functions in the cloud. - -Like most things, Apex and Lambdas aren't perfect for every scenario. Functions with high IO waits defeat the purpose of paying for compute time. But, adding a tool to your toolbox that requires no infrastructure management on your part at all makes good sense. - --------------------------------------------------------------------------------- - -作者简介: - -Hays Hutton writes code and then writes about it. Love this article? Head over to [Hays Hutton’s author page][a] and keep reading. - --------------------------------------------------------------------------------- - -via: https://www.compose.com/articles/go-serverless-with-apex-and-composes-mongodb/ - -作者:[Hays Hutton][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.compose.com/articles/author/hays-hutton/ -[1]:https://twitter.com/share?text=Go%20Serverless%20with%20Apex%20and%20Compose%27s%20MongoDB&url=https://www.compose.com/articles/go-serverless-with-apex-and-composes-mongodb/&via=composeio -[2]:https://www.facebook.com/sharer/sharer.php?u=https://www.compose.com/articles/go-serverless-with-apex-and-composes-mongodb/ -[3]:https://plus.google.com/share?url=https://www.compose.com/articles/go-serverless-with-apex-and-composes-mongodb/ -[4]:http://news.ycombinator.com/submitlink?u=https://www.compose.com/articles/go-serverless-with-apex-and-composes-mongodb/&t=Go%20Serverless%20with%20Apex%20and%20Compose%27s%20MongoDB -[5]:https://www.compose.com/articles/rss/ -[6]:https://unsplash.com/@esaiastann -[7]:https://www.compose.com/articles -[8]:https://www.compose.com/articles/tag/go/ -[9]:https://www.compose.com/articles/tag/mgo/ -[10]:https://www.compose.com/articles/tag/mongodb/ -[11]:https://www.compose.com/articles/go-serverless-with-apex-and-composes-mongodb/#search -[12]:https://medium.com/@tjholowaychuk/farewell-node-js-4ba9e7f3e52b#.dc9vkeybx -[13]:http://apex.run/ -[14]:http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html -[15]:http://apex.run/ -[16]:https://www.compose.com/articles/composes-new-primetime-mongodb/ -[17]:https://www.terraform.io/ diff --git a/translated/tech/20161006 Go Serverless with Apex and Composes MongoDB.md b/translated/tech/20161006 Go Serverless with Apex and Composes MongoDB.md new file mode 100644 index 0000000000..35e3341ff7 --- /dev/null +++ b/translated/tech/20161006 Go Serverless with Apex and Composes MongoDB.md @@ -0,0 +1,201 @@ + +# 使用 Apex 和 Compose's MongoDB 开发 serverless + +_Apex 是一个将开发和部署 AWS Lambda 函数的过程打包了的工具。它提供了一个本地命令行工具来创建安全上下文,部署函数,甚至追踪云端日志。由于 AWS Lambda 服务将函数看成独立的单元,Apex 提供了一个框架层将一系列函数作为一个项目。另外,它将服务拓展到不仅仅是 Java,Javascript 和 Ptyhon,更例如Go语言。_ + +两年前 Express (基本上是 NodeJS 实际的网络框架层)的作者,离开了 Node 社区,而将其注意力转向 Go,谷歌创造的后端服务语言,以及 Lambda, 由 AWS 提供的函数即服务。尽管一个开发者的行为无法引领一股潮流,但是来看看他正在做的名叫 [Apex][13] 项目会很有趣,因为它可能预示着未来很大一部分网络开发的改变。 +##### 什么是 Lambda? + +如今,人们如果不能运行自己的硬件,他们会选择付费使用一些云端的虚拟服务器。在云上,他们 +部署一个完整的协议栈如 Node,Express, 和一个自定义应用。或者如果他们探索了更远,使用了诸如 Heroku 或者 Bluemix 之类的新玩意,也可能在某些已经预配置好 Node 的容器中仅仅通过部署应用代码来部署他们完整的应用。 + +在这个抽象阶梯上的下一步是来单独部署函数到云端而不是一个完整的应用。这些函数之后可以被一大堆外部事件触发。例如,AWS 的 API 网关服务可以将代理 HTTP 请求作为触发函数的事件,而函数即服务供应方根据要求执行匹配的函数。 + +###### 从 Apex 开始 + +Apex 是一个将 AWS 命令行接口封装起来的命令行工具。因此,开始使用 Apex 的第一步就是确保你已经安装和配置了的从 AWS 获取的命令行工具(详情请查看 [AWS CLI Getting Started][14]或者 [Apex documentation][15])。 + +接下来,安装 Apex: + +`curl https://raw.githubusercontent.com/apex/apex/master/install.sh | sh` + +然后为你的新项目创建一个目录并运行: + +`apex init` + + ![apexInit](https://res.cloudinary.com/dyyck73ly/image/upload/v1475620758/nzjk1pi1rce1yarbp6xl.png) + +这步会配置好一些必须的安全策略,并且将项目名字赋在函数名后,因为 Lambda 使用扁平化的命名空间。同时它也会创建一些配置文件 拥有一个 “Hello World" 风格的 Javascript 函数的functions 目录。 + + ![tree](https://res.cloudinary.com/dyyck73ly/image/upload/v1475620765/bbsb8h6nkc9nx2qs0foa.png) + +Apex/Lambda 一个非常友好的特性是创建函数非常直观。创建一个以你函数名为名的新目录,然后在其中创建项目。如果想要使用 Go 语言,你可以创建一个叫 `simpleGo` 的目录然后在其中创建一个小型的 `main` 函数: +``` +// serverless/functions/simpleGo/main.go +package main + +import ( + "encoding/json" + "github.com/apex/go-apex" + "log" +) + +type helloEvent struct { + Hello string `json:"hello"` +} + +func main() { + apex.HandleFunc(func(event json.RawMessage, ctx *apex.Context) (interface{}, error) { + var h helloEvent + if err := json.Unmarshal(event, &h); err != nil { + return nil, err + } + log.Print("event.hello:", h.Hello) + return h, nil + }) +} +``` + +Node 是 Lambda 支持的运行环境,Apex 使用 NodeJS shim 来调用由上述程序产生的二进制文件。它将 `event` 传入二进制文件的 STDIN,将从二进制返回的 STDOUT 作为`value`。通过 STDERR 来显示 log。`apex.HandleFunc` 用来为你管理所有的管道。事实上在 Unix 惯例里这是一个非常简单的解决方案。你甚至可以通过在本地命令行执行 `go run main.go` 来测试它。 + + ![goRun](https://res.cloudinary.com/dyyck73ly/image/upload/v1475620784/ddb0vkcef50pnjgfdqn7.png) + + +通过 Apex 向云端部署稍显琐碎:![apexDeploy](https://res.cloudinary.com/dyyck73ly/image/upload/v1475620790/x6l8qg2vticpxhzi7kl3.png) + + + 注意,这将会对你的函数指定命名空间,控制版本,甚至为其他多开发环境如 `staging` 和 `production`配置`env`。 + +通过 `apex invoke` 在云端执行也比较琐碎: + +![apexInvoke](https://res.cloudinary.com/dyyck73ly/image/upload/v1475620796/jccxskukvy5utgegy2hr.png) + + +当然我们也可以追踪一些日志: ![apexLog](https://res.cloudinary.com/dyyck73ly/image/upload/v1475620802/ym3z6w8ojmrq7pucr5bp.png) + +这些是从 AWS CloudWatch 返回的结果。它们都在 AWS 的 UI 中可见,但是当在另一个终端参照此结果来署它会更快。 + +##### 窥探内部的秘密 + + +来看看它内部到底部署了什么很具有指导性。Apex 将 shim 和所有需要用来运行函数的东西打包起来。另外,它会提前做好配置如入口与安全条例: + + ![lambdaConfig](https://res.cloudinary.com/dyyck73ly/image/upload/v1475620812/zz6qwocvuhhl4lq6bf4p.png) + +Lambda 服务实际上接受一个包含所有依赖的 zip 压缩包,它会被部署到服务器来执行指定的函数。我们可以使用 `apex build ` 在本地创建一个压缩包用来在以后解压以探索。 + + ![apexBuild](https://res.cloudinary.com/dyyck73ly/image/upload/v1475620818/ybidaj2i2ijurjbcqrx2.png) + + +这里的 `_apex_index.js handle` 函数是原始的入口。它会配置好一些环境变量然后进入 `index.js`。 + +而 `index.js` 孕育一个 `main` Go 的二进制文件的子进程并且将所有关联联结在一起。 + + + +##### 使用 `mgo` 继续深入 + + +`mgo` 是 Go 语言的 MongoDB 驱动。使用 Apex 来创建一个函数来连接到 Compose 的 MongoDB 就如同我们已经学习过的 `simpleGo` 函数一样直观。这里我们会通过增加一个 `mgoGo` 目录和另一个 `main.go` 来创建一个新函数。 + +``` +// serverless/functions/mgoGo/main.go + +package main + +import ( + "crypto/tls" + "encoding/json" + "github.com/apex/go-apex" + "gopkg.in/mgo.v2" + "log" + "net" +) + +type person struct { + Name string `json:"name"` + Email string `json:"email"` +} + +func main() { + apex.HandleFunc(func(event json.RawMessage, ctx *apex.Context) (interface{}, error) { + tlsConfig := &tls.Config{} + tlsConfig.InsecureSkipVerify = true + + //connect URL: + // "mongodb://:@:,:/ + dialInfo, err := mgo.ParseURL("mongodb://apex:mountain@aws-us-west-2-portal.0.dblayer.com:15188, aws-us-west-2-portal.1.dblayer.com:15188/signups") + dialInfo.DialServer = func(addr *mgo.ServerAddr) (net.Conn, error) { + conn, err := tls.Dial("tcp", addr.String(), tlsConfig) + return conn, err + } + session, err := mgo.DialWithInfo(dialInfo) + if err != nil { + log.Fatal("uh oh. bad Dial.") + panic(err) + } + defer session.Close() + log.Print("Connected!") + + var p person + if err := json.Unmarshal(event, &p); err != nil { + log.Fatal(err) + } + + c := session.DB("signups").C("people") + err = c.Insert(&p) + if err != nil { + log.Fatal(err) + } + + log.Print("Created: ", p.Name," - ", p.Email) + return p, nil + }) +} +``` + + + 发布部署,我们可以通过使用正确类型的事件来模拟调用了一个 API:![apexMgo](https://res.cloudinary.com/dyyck73ly/image/upload/v1475620829/jeprb3r6qrgjkzblkhho.png) + + 最终结果是 `insert` 到在 [Compose 之上 的MongoDB][16] 中。![composeDeploy](https://res.cloudinary.com/dyyck73ly/image/upload/v1475620833/vdy8hjiwxpe02evgqwcm.png) + +##### 还有更多…… + +尽管目前我们已经涉及了 Apex 的方方面面,但是仍然有很多值得我们去探索的东西。它还和 [Terraform][17] 进行了整合。如果你真的希望,你可以发布一个多语言项目包括 Javascript,Java, Python 以及 Go。你也可以为开发、策划以及量产配置多种环境。你可以调整运行资源如调整存储大小和运行时间来调整成本。而且你可以把函数勾连到 API 网关上来传输一个 HTTP API 或者使用一些类似 SNS (简单通知服务)来为云端的函数创建管道。 + +和大多数事物一样,Apex 和 Lambda 并不是在所有场景下都完美。 但是,在你的工具箱中增加一个完全不需要你来管理底层建设的工具完全没有坏处。 + +-------------------------------------------------------------------------------- + +作者简介: + +Hays Hutton 喜欢写代码并写一些与其相关的东西。喜欢这篇文章?请前往[Hays Hutton’s author page][a] 继续阅读其他文章。 + +-------------------------------------------------------------------------------- + +via: https://www.compose.com/articles/go-serverless-with-apex-and-composes-mongodb/ + +作者:[Hays Hutton][a] +译者:[xiaow6](https://github.com/xiaow6) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.compose.com/articles/author/hays-hutton/ +[1]:https://twitter.com/share?text=Go%20Serverless%20with%20Apex%20and%20Compose%27s%20MongoDB&url=https://www.compose.com/articles/go-serverless-with-apex-and-composes-mongodb/&via=composeio +[2]:https://www.facebook.com/sharer/sharer.php?u=https://www.compose.com/articles/go-serverless-with-apex-and-composes-mongodb/ +[3]:https://plus.google.com/share?url=https://www.compose.com/articles/go-serverless-with-apex-and-composes-mongodb/ +[4]:http://news.ycombinator.com/submitlink?u=https://www.compose.com/articles/go-serverless-with-apex-and-composes-mongodb/&t=Go%20Serverless%20with%20Apex%20and%20Compose%27s%20MongoDB +[5]:https://www.compose.com/articles/rss/ +[6]:https://unsplash.com/@esaiastann +[7]:https://www.compose.com/articles +[8]:https://www.compose.com/articles/tag/go/ +[9]:https://www.compose.com/articles/tag/mgo/ +[10]:https://www.compose.com/articles/tag/mongodb/ +[11]:https://www.compose.com/articles/go-serverless-with-apex-and-composes-mongodb/#search +[12]:https://medium.com/@tjholowaychuk/farewell-node-js-4ba9e7f3e52b#.dc9vkeybx +[13]:http://apex.run/ +[14]:http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html +[15]:http://apex.run/ +[16]:https://www.compose.com/articles/composes-new-primetime-mongodb/ +[17]:https://www.terraform.io/ From c3a8e6d40cf89a1fffa82e54b327056ef0775232 Mon Sep 17 00:00:00 2001 From: Zhipeng Li Date: Thu, 6 Jul 2017 19:54:55 +0800 Subject: [PATCH 053/100] Update 20170629 Kubernetes Why does it matter.md --- sources/tech/20170629 Kubernetes Why does it matter.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20170629 Kubernetes Why does it matter.md b/sources/tech/20170629 Kubernetes Why does it matter.md index 9407576aa5..1c4ba9105a 100644 --- a/sources/tech/20170629 Kubernetes Why does it matter.md +++ b/sources/tech/20170629 Kubernetes Why does it matter.md @@ -1,3 +1,4 @@ +Translating by Zhipeng-li Kubernetes: Why does it matter? ============================================================ From 96bd08c946a4705cea56642108966317d7531f43 Mon Sep 17 00:00:00 2001 From: XYenChi <466530436@qq.com> Date: Thu, 6 Jul 2017 20:02:00 +0800 Subject: [PATCH 054/100] Update 20170126 A 5-step plan to encourage your team to make changes on your project.md A 5-step plan to encourage your team to make changes on your project --- ...lan to encourage your team to make changes on your project.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/20170126 A 5-step plan to encourage your team to make changes on your project.md b/sources/talk/20170126 A 5-step plan to encourage your team to make changes on your project.md index 746c36edc7..013680a401 100644 --- a/sources/talk/20170126 A 5-step plan to encourage your team to make changes on your project.md +++ b/sources/talk/20170126 A 5-step plan to encourage your team to make changes on your project.md @@ -1,3 +1,4 @@ +translating by XYenChi A 5-step plan to encourage your team to make changes on your project ============================================================ From 3686950b220ee56d19719162871720d7beb77ee7 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 7 Jul 2017 08:59:09 +0800 Subject: [PATCH 055/100] translated --- ...y-Focused Open-Source Skype Alternative.md | 90 ------------------- ...y-Focused Open-Source Skype Alternative.md | 83 +++++++++++++++++ 2 files changed, 83 insertions(+), 90 deletions(-) delete mode 100644 sources/tech/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md create mode 100644 translated/tech/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md diff --git a/sources/tech/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md b/sources/tech/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md deleted file mode 100644 index c8d73a3db4..0000000000 --- a/sources/tech/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md +++ /dev/null @@ -1,90 +0,0 @@ -translating----geekpi - -Ring is a Privacy-Focused, Open-Source Skype Alternative -============================================================ - - -[![](https://mintguide.org/uploads/posts/2017-06/thumbs/1498158697_screenshot-at-2017-06-22-12-08-39.png)][13] - -**If you’re sick of Skype for [Linux][2]’s lack of progress, or rankled by the imminent[][1][ retirement of the older (but superior) Qt Skype client,][3] there’s a GNU alternative in town called Ring.** - -Hi, User. It seems that you are using **AdBlock** or similar. MintGuide develops and exists through advertising revenue. - -
**Add us to the exceptions**. -We do not use Intrusive advertising!
- -GNU Ring is a cross-platform, privacy-minded communication app that is fast gaining a following in FOSS and security-conscious circles. - -Like an **open-source alternative to Skype **sans the baggage that [Microsoft][7]’s VoIP client comes saddled with, Ring is not only able to do most of what Skype can do, but does it in a secure, reassuringly private way: - -* Voice calls - -* Conference calls - -* Video calls - -* Instant messaging - -All of these features work across devices, too. It doesn’t matter if your mates are using Ring for [Windows][8], or Ring for Android. So long as they’re on Ring you can, well, ring ’em! - -Ring works over a distributed peer network. This means it doesn’t rely on one big centralized server that stores all your details, call history and account info. Instead, the service uses distributed hash tables to establish communication. - -The [][4][Ring website][9] touts end-to-end encryption with authentification (sic), manages identity with X.509 certificates, and is based on RSA/AES/DTLS/SRTP technologies - -### Download Ring for [Linux][10] - -You can [][5][download Ring for Linux][11] from the project website or follow along with the installation instructions listed to add the official Ring repo on Ubuntu. There are two versions of the client available: a KDE version and a GNOME version. - -If you’re running Ubuntu with Unity, or GNOME Shell, then opt for the GNOME version. - -If you’re at all confused about installing it there’s a [][6][step-by-step tutorial][12] on the project website. - -The official website also has handy links to apps for Windows, macOS, and Android. - -#### Getting Set Up with Ring on Ubuntu - -Once you have installed the Ring Linux client you’re almost good to go: you just to get set up with a Ring ID before you can make or take calls. - -Getting set up with Ring is different to Skype, Telegram and WhatsApp do it. You’re **not**tied to a specific mobile number or an email address. - -Instead, Ring will ask you to enter a username (you can enter anything) and then assigned you a lengthy identification number. It’s this identification number you will need to send to other Ring users so they can call you. - -To **make your first call with Ring** you need to enter a contact’s Ring ID in the search bar of the main app, then click on the phone icon button to trigger the call. - -Everything else should be relatively straightforward. You can install Ring on other devices and authenticate them with your account so that you never miss a call (if you install it on Android you can scan a Qr code for faster set-up). - -Details and configurations for Ring are stored in the ‘dring.yml’ file stashed in your home folder’s config directory. - -### How Well Does Ring Work? - -The “sucky” part of this post is telling you how well Ring works: I don’t know because I don’t know anyone else who uses Ring. As such I haven’t had a chance to actually use it. - -I did try to Google for Ring reviews but this was a nightmare because the app name is so ubiquitous (I am now very well informed about the Ring video doorbell, though). - - _**If you already use Ring, or you’re able to persuade at least one person you know to try it out, do come back to share a word or two about the connection quality and performance. **_ - --------------------------------------------------------------------------------- - -via: https://mintguide.org/internet/795-ring-is-a-privacy-focused-open-source-skype-alternative.html - -作者:[fabiomorales9999][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://mintguide.org/user/fabiomorales9999/ -[1]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cDovL3d3dy5vbWd1YnVudHUuY28udWsvMjAxNy8wNi9za3lwZS00LTMtbGludXgtc3RvcC13b3JraW5nLWp1bHktMjAxNw%3D%3D -[2]:https://mintguide.org/ -[3]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cDovL3d3dy5vbWd1YnVudHUuY28udWsvMjAxNy8wNi9za3lwZS00LTMtbGludXgtc3RvcC13b3JraW5nLWp1bHktMjAxNw%3D%3D -[4]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4 -[5]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4L2VuL2Rvd25sb2FkL2dudS1saW51eA%3D%3D -[6]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4L2VuL3R1dG9yaWFscy9nbnUtbGludXgjUmluZ0lE -[7]:https://mintguide.org/tools/537-crossover-run-any-windows-programs-on-linux-mint.html -[8]:https://mintguide.org/tools/537-crossover-run-any-windows-programs-on-linux-mint.html -[9]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4 -[10]:https://mintguide.org/ -[11]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4L2VuL2Rvd25sb2FkL2dudS1saW51eA%3D%3D -[12]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4L2VuL3R1dG9yaWFscy9nbnUtbGludXgjUmluZ0lE -[13]:https://mintguide.org/uploads/posts/2017-06/1498158697_screenshot-at-2017-06-22-12-08-39.png -[14]:https://mintguide.org/internet/ diff --git a/translated/tech/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md b/translated/tech/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md new file mode 100644 index 0000000000..01ada9ad61 --- /dev/null +++ b/translated/tech/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md @@ -0,0 +1,83 @@ +Ring 是一个专注隐私,开源的 Skype 替代品 +============================================================ + + +[![](https://mintguide.org/uploads/posts/2017-06/thumbs/1498158697_screenshot-at-2017-06-22-12-08-39.png)][13] + +**如果你对 Linux 上的 Skype 进度不满意,或者对即将[][1][退出的旧的(但是优秀的)Qt Skype 客户端][3]感到不快,这有一个 GNU 替代品叫 Ring。** + +GNU Ring 是一个跨平台、注意隐私的交流程序,它很快得到了 FOSS 以及安全圈子的注意。 + +就像一个** Skype 的开源替代品**,没有[微软][7] VoIP 带来的那些东西,Ring 不仅能够做大多数 Skype 能够做的,还能以安全、让人放心的私人方式做到: + +* 语音电话 + +* 电话会议 + +* 视频电话 + +* 即时通信 + +所有这些功能也可以跨设备运行。你同伴使用的是使用[Windows][8] 版 Ring 或者 Android 版 Ring 都不重要。只要他们在 Ring 上,你就能联系他们! + +Ring 通过分布式对等网络工作。这意味着它不依赖于一个大型集中式服务器来存储你所有详细信息、通话记录和帐户信息。相反,该服务使用分布式哈希表建立通信。 + +[][4][Ring 网站][9]使用端到端加密的认证(sic)、使用 X.509 证书管理身份、并且基于 RSA/AES/DTLS/SRTP 技术。 + +### 下载 [Linux][10] 版 Ring + +你可以从项目网站或者按照下面的安装指导在 Ubuntu 上添加 Ring 的官方仓库来[下载 Linux 版 Ring][11]。这里有两个版本的客户端:KDE 版本和 GNOME 版本。 + +如果你运行的 Ubuntu 带有 Unity 或者 GNOME Shell,就选择 GNOME 版本。 + +如果你对安装感到疑惑,项目网站上有一个一个[][6][手把手的教程][12]。 + +官方网站上还有直接的 Windows、macOS 和 Android 版链接。 + +#### 在 Ubuntu 上设置 Ring + +当你安装完 Linux 版客户端后,你就能够使用了:在开始打电话前,你只需注册一个 Ring ID。 + +Ring 的注册不同于 Skype、Telegram 和 WhatsApp 那样。你**不必**绑定一个手机号或者邮箱。 + +取而代之的是 Ring 会要求你输入一个用户名(你可以任意输入),接着会分配你一个冗长的身份号码。你需要给其他 Ring 用户发送这个身份号码,那么他们可以给你打电话。 + +要**在 Ring 中打第一通电话**,你需要主程序的搜索栏输入联系人的 Ring ID,接着点击电话按钮拨打电话。 + +其他事情应该相对直接。你可以在其他设备上安装 Ring 并用你的帐户验证,这样你就不会错过任何一个电话(如果你在 Android 设备上安装,你可以扫描二维码来快速设置)。 + +Ring 的细节以及配置存储你家目录下的配置文件夹内的 ‘dring.yml’ 中。 + +### Ring 怎么样? + +这篇文章“垃圾”的部分是告诉你 Ring 怎么样:我不知道因为我不认识任何使用 Ring 的人。因此我没有机会真正使用它。 + +我尝试 Google 来查找 Ring 的评测,但是这是一个噩梦,因为程序的名字太普遍了(虽然我现在非常了解 Ring 视频门铃)。 + +_**如果你已经使用 Ring 或者你能够劝说至少一个你认识的人使用,那么记得回来分享一下关于连接质量和性能。**_ + +-------------------------------------------------------------------------------- + +via: https://mintguide.org/internet/795-ring-is-a-privacy-focused-open-source-skype-alternative.html + +作者:[fabiomorales9999][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://mintguide.org/user/fabiomorales9999/ +[1]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cDovL3d3dy5vbWd1YnVudHUuY28udWsvMjAxNy8wNi9za3lwZS00LTMtbGludXgtc3RvcC13b3JraW5nLWp1bHktMjAxNw%3D%3D +[2]:https://mintguide.org/ +[3]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cDovL3d3dy5vbWd1YnVudHUuY28udWsvMjAxNy8wNi9za3lwZS00LTMtbGludXgtc3RvcC13b3JraW5nLWp1bHktMjAxNw%3D%3D +[4]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4 +[5]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4L2VuL2Rvd25sb2FkL2dudS1saW51eA%3D%3D +[6]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4L2VuL3R1dG9yaWFscy9nbnUtbGludXgjUmluZ0lE +[7]:https://mintguide.org/tools/537-crossover-run-any-windows-programs-on-linux-mint.html +[8]:https://mintguide.org/tools/537-crossover-run-any-windows-programs-on-linux-mint.html +[9]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4 +[10]:https://mintguide.org/ +[11]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4L2VuL2Rvd25sb2FkL2dudS1saW51eA%3D%3D +[12]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4L2VuL3R1dG9yaWFscy9nbnUtbGludXgjUmluZ0lE +[13]:https://mintguide.org/uploads/posts/2017-06/1498158697_screenshot-at-2017-06-22-12-08-39.png +[14]:https://mintguide.org/internet/ From ec3183ff833928e107543cec68ff20a0ae2a9013 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 7 Jul 2017 09:01:00 +0800 Subject: [PATCH 056/100] translating --- .../20170627 How to turn a Raspberry Pi into an eBook server.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170627 How to turn a Raspberry Pi into an eBook server.md b/sources/tech/20170627 How to turn a Raspberry Pi into an eBook server.md index bab2a2e536..7f0355226a 100644 --- a/sources/tech/20170627 How to turn a Raspberry Pi into an eBook server.md +++ b/sources/tech/20170627 How to turn a Raspberry Pi into an eBook server.md @@ -1,3 +1,5 @@ +translating---geekpi + How to turn a Raspberry Pi into an eBook server ============================================================ From 90d3d5bff88ca50ed7fb1af5d870d97546819674 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 7 Jul 2017 11:32:19 +0800 Subject: [PATCH 057/100] PRF&PUB:20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @geekpi @oska874 这个网站的外链是需要解析成原地址的,此外源档中也有一些无用代码。 --- ...y-Focused Open-Source Skype Alternative.md | 36 +++++++++---------- 1 file changed, 16 insertions(+), 20 deletions(-) rename {translated/tech => published}/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md (64%) diff --git a/translated/tech/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md b/published/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md similarity index 64% rename from translated/tech/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md rename to published/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md index 01ada9ad61..a7e4e7c381 100644 --- a/translated/tech/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md +++ b/published/20170622 Ring is a Privacy-Focused Open-Source Skype Alternative.md @@ -1,36 +1,32 @@ -Ring 是一个专注隐私,开源的 Skype 替代品 +Ring :一个专注隐私,开源的 Skype 替代品 ============================================================ +![](https://mintguide.org/uploads/posts/2017-06/thumbs/1498158697_screenshot-at-2017-06-22-12-08-39.png) -[![](https://mintguide.org/uploads/posts/2017-06/thumbs/1498158697_screenshot-at-2017-06-22-12-08-39.png)][13] +**如果你对 Linux 上的 Skype 进度不满意,或者对即将[换代的、旧的(但是优秀的)Qt Skype 客户端][3]感到不快,这有一个 GNU 替代品叫 Ring。** -**如果你对 Linux 上的 Skype 进度不满意,或者对即将[][1][退出的旧的(但是优秀的)Qt Skype 客户端][3]感到不快,这有一个 GNU 替代品叫 Ring。** +GNU Ring 是一个跨平台、关注隐私的交流程序,它很快得到了 FOSS 以及安全圈的注意。 -GNU Ring 是一个跨平台、注意隐私的交流程序,它很快得到了 FOSS 以及安全圈子的注意。 - -就像一个** Skype 的开源替代品**,没有[微软][7] VoIP 带来的那些东西,Ring 不仅能够做大多数 Skype 能够做的,还能以安全、让人放心的私人方式做到: +就像一个 **Skype 的开源替代品**,不用背负微软 VoIP 客户端的那些东西,Ring 不仅能够做大多数 Skype 能够做的,还能以安全、让人放心的私密方式做到: * 语音电话 - * 电话会议 - * 视频电话 - * 即时通信 -所有这些功能也可以跨设备运行。你同伴使用的是使用[Windows][8] 版 Ring 或者 Android 版 Ring 都不重要。只要他们在 Ring 上,你就能联系他们! +所有这些功能也可以跨设备运行。你同伴使用的是使用 Windows 版 Ring 或者 Android 版 Ring 都不重要。只要他们在 Ring 上,你就能联系他们! -Ring 通过分布式对等网络工作。这意味着它不依赖于一个大型集中式服务器来存储你所有详细信息、通话记录和帐户信息。相反,该服务使用分布式哈希表建立通信。 +Ring 通过分布式对等网络工作。这意味着它不用依赖于一个大型集中式服务器以存储你所有详细信息、通话记录和帐户信息。相反,该服务使用分布式哈希表建立通信。 -[][4][Ring 网站][9]使用端到端加密的认证(sic)、使用 X.509 证书管理身份、并且基于 RSA/AES/DTLS/SRTP 技术。 +[Ring 网站][9]使用端到端加密的认证(sic)、使用 X.509 证书管理身份、并且基于 RSA/AES/DTLS/SRTP 技术。 -### 下载 [Linux][10] 版 Ring +### 下载 Linux 版 Ring 你可以从项目网站或者按照下面的安装指导在 Ubuntu 上添加 Ring 的官方仓库来[下载 Linux 版 Ring][11]。这里有两个版本的客户端:KDE 版本和 GNOME 版本。 如果你运行的 Ubuntu 带有 Unity 或者 GNOME Shell,就选择 GNOME 版本。 -如果你对安装感到疑惑,项目网站上有一个一个[][6][手把手的教程][12]。 +如果你对安装感到疑惑,项目网站上有一个一个[手把手的教程][12]。 官方网站上还有直接的 Windows、macOS 和 Android 版链接。 @@ -46,7 +42,7 @@ Ring 的注册不同于 Skype、Telegram 和 WhatsApp 那样。你**不必**绑 其他事情应该相对直接。你可以在其他设备上安装 Ring 并用你的帐户验证,这样你就不会错过任何一个电话(如果你在 Android 设备上安装,你可以扫描二维码来快速设置)。 -Ring 的细节以及配置存储你家目录下的配置文件夹内的 ‘dring.yml’ 中。 +Ring 的细节以及配置存储你家目录下的配置文件夹内的 `dring.yml` 中。 ### Ring 怎么样? @@ -62,22 +58,22 @@ via: https://mintguide.org/internet/795-ring-is-a-privacy-focused-open-source-sk 作者:[fabiomorales9999][a] 译者:[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/) 荣誉推出 [a]:https://mintguide.org/user/fabiomorales9999/ [1]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cDovL3d3dy5vbWd1YnVudHUuY28udWsvMjAxNy8wNi9za3lwZS00LTMtbGludXgtc3RvcC13b3JraW5nLWp1bHktMjAxNw%3D%3D [2]:https://mintguide.org/ -[3]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cDovL3d3dy5vbWd1YnVudHUuY28udWsvMjAxNy8wNi9za3lwZS00LTMtbGludXgtc3RvcC13b3JraW5nLWp1bHktMjAxNw%3D%3D +[3]:https://linux.cn/article-7606-1.html [4]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4 [5]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4L2VuL2Rvd25sb2FkL2dudS1saW51eA%3D%3D [6]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4L2VuL3R1dG9yaWFscy9nbnUtbGludXgjUmluZ0lE [7]:https://mintguide.org/tools/537-crossover-run-any-windows-programs-on-linux-mint.html [8]:https://mintguide.org/tools/537-crossover-run-any-windows-programs-on-linux-mint.html -[9]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4 +[9]:https://ring.cx/ [10]:https://mintguide.org/ -[11]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4L2VuL2Rvd25sb2FkL2dudS1saW51eA%3D%3D -[12]:https://mintguide.org/engine/dude/index/leech_out.php?a%3AaHR0cHM6Ly9yaW5nLmN4L2VuL3R1dG9yaWFscy9nbnUtbGludXgjUmluZ0lE +[11]:https://ring.cx/en/download/gnu-linux +[12]:https://ring.cx/en/tutorials/gnu-linux#RingID [13]:https://mintguide.org/uploads/posts/2017-06/1498158697_screenshot-at-2017-06-22-12-08-39.png [14]:https://mintguide.org/internet/ From 5b9b4bca82028c4fd5f7f1da6f55c00c5eba8e66 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 7 Jul 2017 15:31:32 +0800 Subject: [PATCH 058/100] PRF&PUB:20170402 Why do developers who could work anywhere flock to the worlds most expensive cities.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @xiaow6 翻译的很好 --- ...ock to the worlds most expensive cities.md | 57 +++++++++++++++++ ...ock to the worlds most expensive cities.md | 63 ------------------- 2 files changed, 57 insertions(+), 63 deletions(-) create mode 100644 published/20170402 Why do developers who could work anywhere flock to the worlds most expensive cities.md delete mode 100644 translated/talk/20170402 Why do developers who could work anywhere flock to the worlds most expensive cities.md diff --git a/published/20170402 Why do developers who could work anywhere flock to the worlds most expensive cities.md b/published/20170402 Why do developers who could work anywhere flock to the worlds most expensive cities.md new file mode 100644 index 0000000000..66bdb5161f --- /dev/null +++ b/published/20170402 Why do developers who could work anywhere flock to the worlds most expensive cities.md @@ -0,0 +1,57 @@ +为什么可以在任何地方工作的开发者们要聚集到世界上最昂贵的城市? +============================================================ + +![](https://tctechcrunch2011.files.wordpress.com/2017/04/img_20170401_1835042.jpg?w=977) + +政治家和经济学家都在[哀嚎][10]某几个阿尔法地区——旧金山、洛杉矶、纽约、波士顿、多伦多、伦敦、巴黎——在吸引了所有最好的工作的同时变得令人却步的昂贵,降低了经济流动性而增大了贫富差异。为什么那些最好的工作不能搬到其它地区呢? + +当然,很多工作都不能搬走。工作在纽约或者伦敦(当然,在英国脱欧毁灭伦敦的银行体系之前)普通的金融从业人员如果告诉他们的老板他们想要以后在清迈工作,将会在办公室里受到嘲笑而且不再受欢迎。 + +但是这对(大部分)软件领域不适用。大部分 web/app 开发者如果这样要求的话可能会被拒绝;但是它们至少不会被嘲笑或者被炒。优秀开发者往往供不应求,而且我们处在 Skype 和 Slack 的时代,软件开发完全可以不依赖物质世界的交互。 + +(这一切对作家来说更加正确,真的;事实上我是在波纳佩发表的这篇文章。但是作家并不像软件开发者一样具有足够的影响力。) + +有些人会告诉你远程协助的团队天生比本地团队效率和生产力低下一些,或者那些“不经意的灵感碰撞”是如此重要以致于每一位员工每天都必须强制到一个地方来人为的制造这样的碰撞。这些人错了,有这种问题的团队只是讨论次数不够多——数量级不过几次、十几次或者几十次,而不是成百上千——也不够专注。 + +我知道:在 [HappyFunCorp][11] 时,我们广泛的与远程团队工作,而且长期雇佣远程开发者,而结果难以置信的好。我在我旧金山的家中与斯德哥尔摩、圣保罗、上海、布鲁克林、新德里的开发者交流和合作的一天,完全没有任何不寻常。 + +在这一点上,不管它是不是个好主意,但我有点跑题了。供求关系指出那些拥有足够技能的开发者可以成为被称为“数字流浪者”的人,如果他们愿意的话。但是许多可以做到的人却不愿意。最近,我在雷克雅维克的一栋通过 Airbnb 共享的房子和一伙不断变化的临时远程工作团队度过了一段时间,我按照东海岸的时间来跟上他们的工作,也把早上和周末的时光都花费在探索冰岛了——但是最后几乎所有人都回到了湾区生活。 + +从经济层面来说,当然,这太疯狂了。搬到东南亚工作光在房租一项上每月就会为我们省下几千美金。 为什么那些可以在哥斯达黎加挣着旧金山的工资,或者在柏林赚着纽约水平薪资的人们,选择不这样做?为什么那些据说冷静固执的工程师在财政方面如此荒谬? + +当然这里有社交和文化原因。清迈很不错,但没有大都会博物馆或者蒸汽朋克化装舞会,也没有 15 分钟脚程可以到的 50 家美食餐厅。柏林也很可爱,但没法提供风筝冲浪或者山脉远足和加州气候。当然也无法保证拥有无数和你一样分享同样价值观和母语的人们。 + +但是我觉得原因除了这些还有很多。我相信相比贫富之间的差异,还有一个更基础的经济分水岭存在。我认为我们在目睹世界上可以实现超凡成就的“极端斯坦(Extremistan)”城市和无法成就伟大但可以工作和赚钱的“平均斯坦(Mediocristan)”城市之间正在生成巨大的裂缝。(这些名词是从伟大的纳西姆·塔勒布那里偷来的) + +(LCTT 译者注:[平均斯坦与极端斯坦的概念是美国学者纳西姆·塔勒布首先提出来的。他发现在我们所处的世界上,有些事物表现出相当的平均性,大部分个体都靠近均值,离均值越远则个体数量越稀少,与均值的偏离达到一定程度的个体数量将趋近于零。有些事物则表现出相当的极端性,均值这个概念在这个领域没有太多的意义,剧烈偏离均值的个体大量存在,而且偏离程度大得惊人。他把前者称为平均斯坦,把后者称为极端斯坦。][15]) + +艺术行业有着悠久历史的“极端斯坦”城市。这也解释了为什么有抱负的作家纷纷搬到纽约城,而那些已经在国际上大获成功的导演和演员仍然在不断被吸引到洛杉矶,如同飞蛾扑火。现在,这对技术行业同样适用。即使你不曾想试着(帮助)构造一些非凡的事物 —— 如今创业神话如此恢弘,很难想象有工程师完全没有梦想过它 —— _伟大事物发生的地方_正在以美好的前景如梦如幻的吸引着人们。 + +但是关于这一切有趣的是,理论上讲,它会改变;因为 —— 直到最近 —— 分布式的、分散管理的团队实际上可以获得超凡的成就。 情况对这些团队很不利,因为风投的目光趋于短浅。但是没有任何法律指出独角兽公司只能诞生在加州和某些屈指可数的次级地域上;而且似乎,不管结果好坏,极端斯坦正在扩散。如果这样的扩散最终可以矛盾地导致米申地区的房租变_便宜_那就太棒了! + +-------------------------------------------------------------------------------- + +via: https://techcrunch.com/2017/04/02/why-do-developers-who-could-work-anywhere-flock-to-the-worlds-most-expensive-cities/ + +作者:[Jon Evans][a] +译者:[xiaow6](https://github.com/xiaow6) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://techcrunch.com/author/jon-evans/ +[1]:https://techcrunch.com/2017/04/02/why-do-developers-who-could-work-anywhere-flock-to-the-worlds-most-expensive-cities/#comments +[2]:https://techcrunch.com/2017/04/02/why-do-developers-who-could-work-anywhere-flock-to-the-worlds-most-expensive-cities/# +[3]:http://twitter.com/share?via=techcrunch&url=http://tcrn.ch/2owXJ0C&text=Why%20do%20developers%20who%20could%20work%20anywhere%20flock%20to%20the%20world%E2%80%99s%20most%20expensive%C2%A0cities%3F&hashtags= +[4]:https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Ftechcrunch.com%2F2017%2F04%2F02%2Fwhy-do-developers-who-could-work-anywhere-flock-to-the-worlds-most-expensive-cities%2F&title=Why%20do%20developers%20who%20could%20work%20anywhere%20flock%20to%20the%20world%E2%80%99s%20most%20expensive%C2%A0cities%3F +[5]:https://plus.google.com/share?url=https://techcrunch.com/2017/04/02/why-do-developers-who-could-work-anywhere-flock-to-the-worlds-most-expensive-cities/ +[6]:http://www.reddit.com/submit?url=https://techcrunch.com/2017/04/02/why-do-developers-who-could-work-anywhere-flock-to-the-worlds-most-expensive-cities/&title=Why%20do%20developers%20who%20could%20work%20anywhere%20flock%20to%20the%20world%E2%80%99s%20most%20expensive%C2%A0cities%3F +[7]:http://www.stumbleupon.com/badge/?url=https://techcrunch.com/2017/04/02/why-do-developers-who-could-work-anywhere-flock-to-the-worlds-most-expensive-cities/ +[8]:mailto:?subject=Why%20do%20developers%20who%20could%20work%20anywhere%20flock%20to%20the%20world%E2%80%99s%20most%20expensive%C2%A0cities?&body=Article:%20https://techcrunch.com/2017/04/02/why-do-developers-who-could-work-anywhere-flock-to-the-worlds-most-expensive-cities/ +[9]:https://share.flipboard.com/bookmarklet/popout?v=2&title=Why%20do%20developers%20who%20could%20work%20anywhere%20flock%20to%20the%20world%E2%80%99s%20most%20expensive%C2%A0cities%3F&url=https://techcrunch.com/2017/04/02/why-do-developers-who-could-work-anywhere-flock-to-the-worlds-most-expensive-cities/ +[10]:https://mobile.twitter.com/Noahpinion/status/846054187288866 +[11]:http://happyfuncorp.com/ +[12]:https://twitter.com/rezendi +[13]:https://techcrunch.com/author/jon-evans/ +[14]:https://techcrunch.com/2017/04/01/discussing-the-limits-of-artificial-intelligence/ +[15]:http://blog.sina.com.cn/s/blog_5ba3d8610100q3b1.html diff --git a/translated/talk/20170402 Why do developers who could work anywhere flock to the worlds most expensive cities.md b/translated/talk/20170402 Why do developers who could work anywhere flock to the worlds most expensive cities.md deleted file mode 100644 index 7ee343da04..0000000000 --- a/translated/talk/20170402 Why do developers who could work anywhere flock to the worlds most expensive cities.md +++ /dev/null @@ -1,63 +0,0 @@ - - - -为什么可以在任何地方工作的开发者要聚集到世界上最昂贵的城市? -============================================================ - - - - - - ![](https://tctechcrunch2011.files.wordpress.com/2017/04/img_20170401_1835042.jpg?w=977) - -政治家和经济学家都在[哀嚎][10]某几个阿尔法地区——三番,洛杉矶,纽约,波士顿,多伦多,伦敦,巴黎——在吸引了所有最好的工作的同时变得令人退却的昂贵,减少了经济变动性而增大了贫富差异。但是为什么那些最好的工作不能搬到其他地区呢? - -当然,很多都不能。工作在纽约或者伦敦(当然,在英国脱欧毁灭伦敦的银行体系之前)普通的金融从业人员如果告诉他们的老板他们想要以后都在清迈工作,将会在办公室里受到嘲笑而且不再受欢迎。 - -但是这对(大部分)软件领域不适用。大部分 web/app 开发者如果这样要求的话可能会被拒绝;但是它们至少不会被嘲笑或者被炒。优秀开发者往往供不应求,而且处在 Skype 和 Slack 的时代,软件开发完全可以不依赖物质世界的交互。 - -(这一切对作家来说更加正确,真的;事实上我是在波纳配发表的这篇文章。但是作家并不像软件开发者一样具有足够的影响力。) - -有些人会告诉你远程协助的团队天生比本地团队效率和生产力低下一些,或者那些“不经意的灵感碰撞”是如此重要以致于每一位员工每天都必须强制到一个地方来人为的制造这样的碰撞。这些人错了,只要团队的讨论次数不够多——数量级不过一把、一打或者许多,而不是成百上千——也不够专注。 - -我应该知道:在 [HappyFunCorp][11] 时,我们广泛的与远程团队工作,而且长期雇佣远程开发者,而结果难以置信的好。我在我三番的家中与斯德哥尔摩,圣保罗,上海,布鲁克林,新德里的开发者交流和合作的一天,完全没有任何不寻常。 - -目前为止,不管是不是个好主意,但我有点跑题了。供求关系指出那些拥有足够技能的开发者可以成为被称为“数字流浪者”的人,如果他们愿意的话。但是许多可以做到的却不愿意。最近,我在雷克雅维克的一栋通过 Airbnb 共享的房子和一伙不断变化的临时远程工作团队度过了一段时间,我保持着东海岸时间来跟上他们的工作,也把早上和周末的时光都花费在探索冰岛了——但是最后几乎所有人都回到了湾区生活。 - -从经济层面来说,当然,这太疯狂了。搬到东南亚工作光在房租一项上每月就会为我们省下几千美金。 为什么那些可以在哥斯达黎加挣着三番工资,或者在柏林赚着纽约水平薪资的人们,选择不这样做?为什么那些据说冷静固执的工程师在财政方面如此荒谬? - -当然这里有社交和文化原因。清迈很不错,但没有大都会博物馆或者蒸汽朋克化装舞会,也没有 15 分钟脚程可以到的 50 家美食餐厅。柏林也很可爱,但没法提供风筝冲浪或者山脉远足和加州气候。当然也无法保证拥有无数和你一样分享同样价值观和母语的人们。 - -但是我觉得原因除了这些还有很多。我相信相比贫富之间的差异,还有一个更基础的经济分水岭存在。我认为我们在目睹世界上可以实现超凡成就的极端斯坦城市和无法成就伟大但可以工作和赚钱的平均斯坦城市之间正在生成巨大的裂缝。(名词是从伟大的纳西姆·塔勒布那里偷来的) -(译者注:[平均斯坦与极端斯坦的概念是美国学者纳西姆·塔勒布首先提出来的。他发现在我们所处的世界上,有些事物表现出相当的平均性,大部分个体都靠近均值,离均值越远则个体数量越稀少,与均值的偏离达到一定程度的个体数量将趋近于零。有些事物则表现出相当的极端性,均值这个概念在这个领域没有太多的意义,剧烈偏离均值的个体大量存在,而且偏离程度大得惊人。他把前者称为平均斯坦,把后者称为极端斯坦。][15]) - -艺术行业有着悠久历史的极端斯坦城市。这也解释了为什么有抱负的作家纷纷搬到纽约城,而那些已经在国际上大获成功的导演和演员仍然在不断被吸引到洛杉矶,如同飞蛾扑火。现在,这对技术行业同样适用。即使你不曾想试着(帮助)构造一些非凡的事物—— 如今创业神话如此恢弘,很难想象有工程师完全没有梦想过它—— _伟大事物发生的地方_正在以美好的前景如梦如幻的吸引着人们。 - -但是关于这一切有趣的是,理论上讲,它会改变;因为——直到最近——分布式的,分散管理的团队实际上可以获得超凡的成就。 情况对这些团队很不利,因为风投的目光趋于短浅。但是没有任何法律指出独角兽公司只能诞生在加州和某些屈指可数的次级领土;而且似乎,不管结果好坏,极端斯坦正在扩散。如果这样的扩散最终可以矛盾的导致米申地区的房租变 _便宜_那就太棒了! - --------------------------------------------------------------------------------- - -via: https://techcrunch.com/2017/04/02/why-do-developers-who-could-work-anywhere-flock-to-the-worlds-most-expensive-cities/ - -作者:[ Jon Evans ][a] -译者:[xiaow6](https://github.com/xiaow6) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://techcrunch.com/author/jon-evans/ -[1]:https://techcrunch.com/2017/04/02/why-do-developers-who-could-work-anywhere-flock-to-the-worlds-most-expensive-cities/#comments -[2]:https://techcrunch.com/2017/04/02/why-do-developers-who-could-work-anywhere-flock-to-the-worlds-most-expensive-cities/# -[3]:http://twitter.com/share?via=techcrunch&url=http://tcrn.ch/2owXJ0C&text=Why%20do%20developers%20who%20could%20work%20anywhere%20flock%20to%20the%20world%E2%80%99s%20most%20expensive%C2%A0cities%3F&hashtags= -[4]:https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Ftechcrunch.com%2F2017%2F04%2F02%2Fwhy-do-developers-who-could-work-anywhere-flock-to-the-worlds-most-expensive-cities%2F&title=Why%20do%20developers%20who%20could%20work%20anywhere%20flock%20to%20the%20world%E2%80%99s%20most%20expensive%C2%A0cities%3F -[5]:https://plus.google.com/share?url=https://techcrunch.com/2017/04/02/why-do-developers-who-could-work-anywhere-flock-to-the-worlds-most-expensive-cities/ -[6]:http://www.reddit.com/submit?url=https://techcrunch.com/2017/04/02/why-do-developers-who-could-work-anywhere-flock-to-the-worlds-most-expensive-cities/&title=Why%20do%20developers%20who%20could%20work%20anywhere%20flock%20to%20the%20world%E2%80%99s%20most%20expensive%C2%A0cities%3F -[7]:http://www.stumbleupon.com/badge/?url=https://techcrunch.com/2017/04/02/why-do-developers-who-could-work-anywhere-flock-to-the-worlds-most-expensive-cities/ -[8]:mailto:?subject=Why%20do%20developers%20who%20could%20work%20anywhere%20flock%20to%20the%20world%E2%80%99s%20most%20expensive%C2%A0cities?&body=Article:%20https://techcrunch.com/2017/04/02/why-do-developers-who-could-work-anywhere-flock-to-the-worlds-most-expensive-cities/ -[9]:https://share.flipboard.com/bookmarklet/popout?v=2&title=Why%20do%20developers%20who%20could%20work%20anywhere%20flock%20to%20the%20world%E2%80%99s%20most%20expensive%C2%A0cities%3F&url=https://techcrunch.com/2017/04/02/why-do-developers-who-could-work-anywhere-flock-to-the-worlds-most-expensive-cities/ -[10]:https://mobile.twitter.com/Noahpinion/status/846054187288866 -[11]:http://happyfuncorp.com/ -[12]:https://twitter.com/rezendi -[13]:https://techcrunch.com/author/jon-evans/ -[14]:https://techcrunch.com/2017/04/01/discussing-the-limits-of-artificial-intelligence/ -[15]:http://blog.sina.com.cn/s/blog_5ba3d8610100q3b1.html From 7e14e505c793c0601dc227d8e4fa4edc1228b08e Mon Sep 17 00:00:00 2001 From: WangYue <815420852@qq.com> Date: Sat, 8 Jul 2017 12:17:01 +0800 Subject: [PATCH 059/100] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E7=BF=BB=E8=AF=91=20?= =?UTF-8?q?20170113=203=20open=20source=20music=20players.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 申请翻译 20170113 3 open source music players.md --- sources/tech/20170113 3 open source music players.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170113 3 open source music players.md b/sources/tech/20170113 3 open source music players.md index 336c6b1e71..6b96ed1ec0 100644 --- a/sources/tech/20170113 3 open source music players.md +++ b/sources/tech/20170113 3 open source music players.md @@ -1,3 +1,5 @@ +翻译中 by  WangYueScream +=========================================================== 3 open source music players: Aqualung, Lollypop, and GogglesMM ============================================================ ![3 open source music players: Aqualung, Lollypop, and GogglesMM](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/music-birds-recording-520.png?itok=wvh1g4Lw "3 open source music players: Aqualung, Lollypop, and GogglesMM") From f3f074e19dafc52635ddd196836bc3d8944585c5 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 8 Jul 2017 12:58:07 +0800 Subject: [PATCH 060/100] PRF&PUB:20170309 The impact GitHub is having on your software career.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @SysTick 翻译的不错! --- ...itHub is having on your software career.md | 80 +++++++++++++++++++ ...itHub is having on your software career.md | 74 ----------------- 2 files changed, 80 insertions(+), 74 deletions(-) create mode 100644 published/20170309 The impact GitHub is having on your software career.md delete mode 100644 translated/talk/20170309 The impact GitHub is having on your software career.md diff --git a/published/20170309 The impact GitHub is having on your software career.md b/published/20170309 The impact GitHub is having on your software career.md new file mode 100644 index 0000000000..6f6f9b80a6 --- /dev/null +++ b/published/20170309 The impact GitHub is having on your software career.md @@ -0,0 +1,80 @@ +GitHub 对软件开发业造成的冲击 +============================================================ + +![The impact GitHub is having on your software career](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/github-universe.jpg?itok=HCU81VX8 "The impact GitHub is having on your software career") + +在未来的 12 到 24 个月内(也就是说,在 2018 年,或者是 2019 年),人们雇佣软件开发者的方式将会发生彻底的改变。 + +2004 至 2014 期间,我曾经就职于红帽,这是世界上最大的开源软件公司。还记得 2004 年七月的一天,我第一次来到这家公司,我的老板 Marty Messer 就跟我说,“所有你在这里所做的工作都会被开源,在未来,你将不需要任何的简历,因为所有的人都可以 Google 到你。” + +供职于红帽的一个独特的好处是,在这种开源的工作期间,我们有机会建立自己的个人品牌和树立自己的声誉。我们可以通过邮件列表和 bug 追踪器与其它的软件工程师进行沟通,而且提交到 mercurial、subversion 和 CVS 仓库的源代码都会被开源,并且可以通过 google 找到。 + +(写本文时)马上就到 2017 年了,我们将生活在一个处处充满开源的世界。 + +以下两点会让你对这个新时代有一个真正意义上的了解: + +1. 微软在过去的一段很长的时间里都在坚持闭源,甚至是排斥开源。但是现在也从心底里开始拥抱开源了。它们成立了 .NET 基金会(红帽也是其中的一个成员),并且也加入了 Linux 基金会。 .NET 项目现在是以一个开源项目的形式在开发着。 +2. Github 已经成为了一个独特的社交网络,并将问题追踪器和分布式源码版本控制融入其中。 + +对于那些从闭源走过来的软件开发者来说,他们可能还不知道发生了什么。对于他们来说 ,开源就意味着“将业余时间的所有工作成果都免费开放”。 + +对于我们这些在过去十年创造了一家十亿美元的开源软件公司的人来说,参与开源以后就没有什么空闲的时间可言了。当然,为开源事业献身的好处也是很明显的,所得到的名誉是你自己的,并不隶属于某个公司。GitHub 是一个社交网络,在这个地方,你可以创建你的提交、你可以在你所专长的领域为一些全球性的组织做出贡献,你临时做的一些工作并不附属于所任职的公司。 + +聪明的人会利用这种工作环境。他们会贡献他们的补丁、工单(issue)、评论给他们平时在工作中使用的语言和框架,比如 TypeScript、 .NET 和 Redux 。 + +他们也拥抱开源,并会尽可能多的开源他们的创新成果。甚至会提交他们的贡献给私有仓库。 + +GitHub 对平等居功至伟。比如说,你也许很难在澳大利亚得到一份来自印度的工作,但是,在 GitHub 上,却没有什么可以阻止你在印度跟澳大利亚的工作伙伴一起工作。 + +在过去十年里,想从红帽获得一个工作机会的方式很简单。你只需要在一些某些小的方面,与红帽的软件工程师在开源的项目上协作,然后当他们觉得你在某些方面做出了很多有价值的贡献,而且成为一个很好的工作伙伴时,那么你就可以申请一个红帽的工作机会了,或许他们会邀请你。 + +现在,在不同的技术领域,开源给了我们所有人同样的机会,随着开源在世界的各处都流行开来,这样的事情将会在不同的地方盛行开来。 + +在[最近一个访谈][3]中,Linux 和 git 的发明者 Linux Torvalds(在 GitHub 上有 49K 粉丝,0 关注),这么说, + +> “你提交了很多小补丁,而在某个时候项目的维护者开始信任你,在那一刻,你跟一般人不同的是,你不仅仅是提交了一些补丁,而是真正成为了这个组织里被信任的一部分。” + +实际上你的名声存在于那个你被信任的网络。我们都知道,当你离开一家公司以后,你的人脉和名声可能会削弱,有的甚至会丢失。就好像,你在一个小村庄里生活了很长的一段时间,这里所有的人都会知道你。然而,当你离开这个村庄,来到一个新的地方,这个地方可能没人听说过你,更糟糕的是,没有人认识任何知道你的人。 + +你已经失去了一度和二度连接关系,甚至有可能会失去这三度连接关系(LCTT 译注:指六度连接理论)。除非你通过在会议或其他大型活动中演讲来建立自己的品牌,否则你通过在公司内部提交代码建立起来的信任早晚都会过去的,但是,如果你在 GitHub 上完成你的工作,这些东西依然全部都在,对这个信任网络的连接仍然可见。 + +首先会发生的事情就是,一些弱势群体可能会利用这个。包括像学生、新毕业生、移民者--他们可能会利用这个“去往”澳大利亚。 + +这将会改变目前的现状。以前的一些开发人员可能会有过人际网络突然中断的情况,开源的一个原则是精英——最好的创意、最多的提交、最多的测试,和最快的落实执行,等等。 + +它并不完美,当然也没有什么事情是完美的,不能和伙伴一起工作,在人们对你的印象方面也会大打折扣。红帽公司会开除那些不能和团队和谐相处的人,而在 GitHub 工作的这些员工,他们主要是和其它的贡献者之间的交流。 + +GitHub 不仅仅是一个代码仓库或是一个原始提交成员的列表,因为有些人总是用稻草人论点描述它。它是一个社交网络。我会这样说: + +> GitHub 有多少代码并不重要,重要的是有多少关于你代码的讨论。 + +GitHub 可以说是伴你而走的名声,并且在以后的 12 到 24 个月中,很多开发者使用它,而另外的一些依然并不使用,这将会形成一个很明显的差异。就像有电子邮件和没有电子邮件的区别(现在每个人都有电子邮件了),或者是有移动电话和没有移动电话的区别(现在每个人都有移动电话了),最终,绝大多数的人都会为开源工作,这将会是与别人的竞争中的一个差异化的优势。 + +但是现在,开发者的职业生涯已经被 GitHub 打乱了。 + +(题图: GitHub) + + +-------------------------------------------------------------------------------- + +作者简介: + +Josh Wulf - 我是 Just Digital People 的传奇招聘者,前红帽员工,CoderDojo 导师, Magikcraft.io 创始人之一,The JDP Internship 出品人——这是世界第一的软件开发真人秀,世界上最好的科技播客主持人,也是一位父亲。一直致力于昆士兰州的“硅经济”。 + +----------------------- + +via: https://medium.com/@sitapati/the-impact-github-is-having-on-your-software-career-right-now-6ce536ec0b50 + +作者:[Josh Wulf][a] +译者:[SysTick](https://github.com/SysTick) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/sitapati +[1]:https://medium.com/@sitapati/the-impact-github-is-having-on-your-software-career-right-now-6ce536ec0b50#.dl79wpyww +[2]:https://opensource.com/article/17/3/impact-github-software-career?rate=2gi7BrUHIADt4TWXO2noerSjzw18mLVZx56jwnExHqk +[3]:http://www.theregister.co.uk/2017/02/15/think_different_shut_up_and_work_harder_says_linus_torvalds/ +[4]:https://opensource.com/user/118851/feed +[5]:https://opensource.com/article/17/3/impact-github-software-career#comments +[6]:https://opensource.com/users/sitapati diff --git a/translated/talk/20170309 The impact GitHub is having on your software career.md b/translated/talk/20170309 The impact GitHub is having on your software career.md deleted file mode 100644 index 08106d7077..0000000000 --- a/translated/talk/20170309 The impact GitHub is having on your software career.md +++ /dev/null @@ -1,74 +0,0 @@ -GitHub对软件开发行业造成的冲击 -============================================================ - - ![The impact GitHub is having on your software career](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/github-universe.jpg?itok=HCU81VX8 "The impact GitHub is having on your software career") ->Image credits : From GitHub - -在未来的12到24个月内(也就是说,在2018年,或者是2019年),人们雇佣软件开发者的方式将会发生彻底的改变。 - -2004 至 2014期间,我曾经就职于红帽,这是世界上最大的开源软件公司。还记得2004年七月的一天,我第一次来到这家公司,我的老板 Marty Messer 就跟我说,“所有你在这里所做的工作都会被开源,在未来,你将不需要任何的履历,因为所有的人都可以 Google 到你。” - -供职于红帽的一个独特的好处是,在这种开源的工作期间,我们有机会建立自己的个人品牌和树立自己的声誉。我们可以通过邮件列表(mailling lists)和bug跟踪器(bug tracker)与其它的软件经理进行沟通,而且提交到 mercurial, subversion, 和CVS (并行版本控制系统)仓库的源代码都会被开源,并且通过google索引。 - -马上就到2017年了,我们将生活在一个处处充满开源的世界。 - -以下两点会让你对这个新时代有一个真正意义上的了解: - -1. Microsoft(微软)在过去的一段很长的时间里都在坚持闭源,甚至是排斥开源。但是现在也从心底里开始拥抱开源了。它们成立了 .NET 基金会(红帽也是其中的一个成员),并且也加入了 Linux基金会。 .NET项目现在是以一个开源的形式在维护。 -2. Github 已经成为了一个独特的社交网络,解决了包括各种问题跟踪和源码的版本控制。 - -大多数的软件开发都是从闭源走过来的,他们可能还不知道发生了什么。对于他们来说 ,开源就意味着“将业余时间的所有努力成果都免费。” - -对于我们这些在过去十年创造了一家十亿美元的开源软件公司的人来说,参与开源的以后就没有什么空闲的时间可言了。当然,为开源事业献身的好处也是很明显的,所得到的名誉是你自己的,并且会在各家公司之间传播。GitHub 是一个社交网络,在这个地方,你可以创建你的提交(commits)、你可以在你所专长的领域为一些全球性的组织做出贡献。临时做一些与工作无关的事情。 - -聪明的人会利用这种工作环境。他们会贡献他们的补丁(patches)、事件(issues)、评论(comments)给他们平时在工作中使用的语言和框架。包括TypeScript, .NET, 和Redux。他们也拥抱开源,并会尽可能多的开源他们的创新成果。甚至会提交他们的贡献给私人资料库。 - -GitHub 是一个很好的平衡器。比如说,你也许很难在澳大利亚得到一份来至印度的工作,但是,在GitHub上,却也没有什么可以阻止你在印度跟澳大利亚的工作伙伴一起工作。 - -在过去十年里,想从红帽获得一个工作机会的方式很简单。你只需要在一些小的方面,在红帽的软件经理开源的项目上做出一点你自己的贡献,直到他们觉得你在某些方面做出了很多有价值的贡献,而且也是一个很好的工作伙伴,那么你就可以得到一个红帽的工作机会了。(也许他们会邀请你) - -现在,在不同的技术领域,开源给了我们所有人同样的机会,随着开源在世界的各处都流行开来,这样的事情将会在不同的地方盛行开来。 - -在[a recent interview][3]中,Linux 和 git的发明者Linux Torvalds(49K 粉丝,0 关注),这么说,“当你提交了很多小补丁,直到项目的维护者接受了你的补丁,从这一点说,你跟一般人不同的是,你不仅仅是提交了一些补丁,而是真正成为了这个组织里被信任的一部分。” - -实际上你的名誉存在于那个你被信任的网络。我们都知道,当你离开一家公司以后,你的人脉和名誉可能会削弱,有的甚至 会丢失。就好像,你在一个小村庄里生活了很长的一段时间,这里所有的人都会知道你。然而,当你离开这个村庄,来到一个新的地方,这个地方可能没人听说过你,更糟糕的是,没有人知道任何知道你的人。 - -你曾经失去了第一次和第二次与世界连接的机会,甚至有可能会失去这第三个与世界交流的机会。除非你通过在会议或其他大型活动中演讲来建立自己的品牌,否则你通过在公司内部提交代码建立起来的信任早晚都会过去的,但是,如果你在GitHub上完成你的工作,这些东西依然全部都在,仍然可见,因为他连接到可信任的网络。 - -首先会发生的事情就是,一些弱势群体可能会利用这个。包括像学生,新毕业生、移民者--他们可能会利用这个“去往”澳大利亚。 - -这将会改变目前的现状。以前的一些开发人员可能会有过网络突然中断的情况,开源的一个原则是精英-最好的创意,最多的提交,最多的测试,和最快的落实执行,等等。 - -它并不完美,当然也没有什么事情是完美的,不能和伙伴一起工作,在人们对你的印象方面也会大打折扣。很多公司都会开除那些不能和团队和谐相处的人,而在GitHub工作的这些员工,他们主要是和其它的贡献者之间的交流。 - -GitHub不仅仅是一个代码仓库或是一个原始提交成员的列表,因为有些人总是用稻草人论点描述它。它是一个社交网络。我会这样说:GitHub有多少代码并不重要,重要的是有多少关于你代码的讨论。 - -GitHub 可以说是你的一个便捷的荣誉,并且在以后的12到24个月中,很多开发者使用它,而另外的一些依然并不使用,这将会形成一个很明显的差异。就像有电子邮件和没有电子邮件的区别(现在每个人都有电子邮件了),或者是有移动电话和没有移动电话的区别(现在每个人都有移动电话了),最终,绝大多数的人都会为开源工作,这将会是与别人的竞争中的一个差异化的优势。 - -但是现在,开发者的源码仓库已经被GitHub打乱了。 - -_[This article][1]首发于 Medium.com .转载请标明出处_ - --------------------------------------------------------------------------------- - -作者简介: - -Josh Wulf - About me: I'm a Legendary Recruiter at Just Digital People; a Red Hat alumnus; a CoderDojo mentor; a founder of Magikcraft.io; the producer of The JDP Internship — The World's #1 Software Development Reality Show; - ------------------------ - -via: https://opensource.com/article/17/3/impact-github-software-career - -作者:[Josh Wulf ][a] -译者:[SysTick](https://github.com/SysTick) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/sitapati -[1]:https://medium.com/@sitapati/the-impact-github-is-having-on-your-software-career-right-now-6ce536ec0b50#.dl79wpyww -[2]:https://opensource.com/article/17/3/impact-github-software-career?rate=2gi7BrUHIADt4TWXO2noerSjzw18mLVZx56jwnExHqk -[3]:http://www.theregister.co.uk/2017/02/15/think_different_shut_up_and_work_harder_says_linus_torvalds/ -[4]:https://opensource.com/user/118851/feed -[5]:https://opensource.com/article/17/3/impact-github-software-career#comments -[6]:https://opensource.com/users/sitapati From 5e6863b787c6fee704eff4f610934a25be9eddab Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 9 Jul 2017 05:14:01 +0800 Subject: [PATCH 061/100] =?UTF-8?q?PRF&PUB:20170513=20How=20to=20Integrate?= =?UTF-8?q?=20iRedMail=20Roundcube=20with=20Samba4=20AD=20DC=20=E2=80=93?= =?UTF-8?q?=20Part=2012.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @geekpi --- ...l Roundcube with Samba4 AD DC – Part 12.md | 82 +++++++++---------- 1 file changed, 37 insertions(+), 45 deletions(-) rename {translated/tech => published}/20170513 How to Integrate iRedMail Roundcube with Samba4 AD DC – Part 12.md (63%) diff --git a/translated/tech/20170513 How to Integrate iRedMail Roundcube with Samba4 AD DC – Part 12.md b/published/20170513 How to Integrate iRedMail Roundcube with Samba4 AD DC – Part 12.md similarity index 63% rename from translated/tech/20170513 How to Integrate iRedMail Roundcube with Samba4 AD DC – Part 12.md rename to published/20170513 How to Integrate iRedMail Roundcube with Samba4 AD DC – Part 12.md index f53025621d..b7d343fbd1 100644 --- a/translated/tech/20170513 How to Integrate iRedMail Roundcube with Samba4 AD DC – Part 12.md +++ b/published/20170513 How to Integrate iRedMail Roundcube with Samba4 AD DC – Part 12.md @@ -1,30 +1,24 @@ -如何在 Samba4 AD 中集成 iRedMail Roundcube - 第 12 部分 +Samba 系列(十二):如何在 Samba4 AD 中集成 iRedMail Roundcube ============================================================ -by [Matei Cezar][15] | 发布日期: 2017-05-13 | 更新日期: 2017-05-14 - - Download Your Free eBooks NOW - [10 Free Linux eBooks for Administrators][16] | [4 Free Shell Scripting eBooks][17] -现在下载你的免费电子书 - [10 本给管理员的免费电子书][16] | [4 本免费的 shell 脚本电子书][17] - -[Roundcube][3] 是 Linux 中最常用的 Webmail 用户代理之一,它为终端用户提供了一个现代化的 Web 界面,它可以与所有邮件服务进行交互,以便阅读、撰写和发送电子邮件。Roundcube 支持各种邮件协议,包括安全的邮件协议,如IMAPS,POP3S 或者 submission。 +[Roundcube][3] 是 Linux 中最常用的 Webmail 用户代理之一,它为终端用户提供了一个现代化的 Web 界面,它可以与所有邮件服务进行交互,以便阅读、撰写和发送电子邮件。Roundcube 支持各种邮件协议,包括安全的邮件协议,如IMAPS、POP3S 或者 submission。 在本文中,我们将讨论如何在 iRedMail 中使用 IMAPS 以及 submission 安全端口配置 Roundcube,以检索和发送 Samba4 AD 帐户的电子邮件、如何从浏览器访问 iRedMail Roundcube Web 界面,并添加网址别名、如何启用 Samba4 AD 集成全局 LDAP 地址簿以及如何禁用某些不需要的 iRedMail 服务。 -#### 要求 +### 要求 1. [如何在 CentOS 7 上安装 iRedMail,用于Samba4 AD集成][1] - 2. [在 CentOS 7 上配置 iRedMail,用于 Samba4 AD 集成][2] ### 第一步:在 Samba4 AD DC 中声明域帐户的电子邮件地址 -1. 为了发送和接收 Samba4 AD DC 域账户的邮件,您需要编辑每个用户帐户,如下所示,通过从[安装了 RSAT 工具的 Windows 机器][4]并且已经加入 Samba4 AD 中打开 ADUC 工具显式地在邮箱字段填写正确的地址。 +1、 为了发送和接收 Samba4 AD DC 域账户的邮件,您需要编辑每个用户帐户,如下所示,通过从[安装了 RSAT 工具的 Windows 机器][4]并且已经加入 Samba4 AD 中打开 ADUC 工具显式地在邮箱字段填写正确的地址。 [![Add Email Account to Join Samba4 AD DC](https://www.tecmint.com/wp-content/uploads/2017/05/Active-Directory-User-and-Computers.jpg)][5] -添加邮箱帐户来加入 Samba4 AD DC +*添加邮箱帐户来加入 Samba4 AD DC* -2. 相似地,要使用邮件列表,你需要在 ADUC 中创建组,为每个组添加相应的电子邮件地址,并分配合适的用户帐户作为每个组的成员。 +2、 相似地,要使用邮件列表,你需要在 ADUC 中创建组,为每个组添加相应的电子邮件地址,并分配合适的用户帐户作为每个组的成员。 这步创建了一个邮件列表,所有 Samba4 AD 组成员的邮箱都会收到给这个 AD 组邮箱地址的邮件。使用下面的截图作为指导为 Samba4 组声明电子邮件字段,并为组添加域成员。 @@ -32,15 +26,15 @@ by [Matei Cezar][15] | 发布日期: 2017-05-13 | 更新日期: 2017-05-14 [![Create Group Admin for Samba4 AD DC](https://www.tecmint.com/wp-content/uploads/2017/05/Create-Group-Admin-for-Samba4-AD-DC.png)][6] -为 Samba4 AD DC 创建组管理员 +*为 Samba4 AD DC 创建组管理员* [![Add Users to Group](https://www.tecmint.com/wp-content/uploads/2017/05/Add-Users-to-Group.png)][7] -将用户添加到组 +*将用户添加到组* 在本例中,发送给 admins@tecmint.lan 的所有邮件地址将被该组的每个成员邮箱接收,它是 “Domain Admins” 组声明的电子邮件地址。 -3. 你可以声明 Samba4 AD 帐户的电子邮件地址的另一种方法是直接从其中一个 AD DC 控制台使用 samba-tool 命令行创建一个用户或组,并使用 `--mail-address` 标志指定邮件地址。 +3、 你可以声明 Samba4 AD 帐户的电子邮件地址的另一种方法是直接从其中一个 AD DC 控制台使用 samba-tool 命令行创建一个用户或组,并使用 `--mail-address` 标志指定邮件地址。 使用下面其中一个命令创建一个指定邮件地址的用户: @@ -69,14 +63,13 @@ by [Matei Cezar][15] | 发布日期: 2017-05-13 | 更新日期: 2017-05-14 ### 第二步:安全 Roundcube Webmail -4. 开始修改 Roundcube 配置文件之前,首先使用[ netstat 命令][8]管道输出给 egrep 过滤器来列出[ Dovecot 和 Postfix ][9]监听的套接字,并确保安全端口(IMAPS 是 993,submission 是 587 )是活跃的并且已启用。 +4、 开始修改 Roundcube 配置文件之前,首先使用 [netstat 命令][8]管道输出给 egrep 过滤器来列出 [Dovecot 和 Postfix][9] 监听的套接字,并确保安全端口(IMAPS 是 993,submission 是 587 )是活跃的并且已启用。 ``` # netstat -tulpn| egrep 'dovecot|master' ``` -5. 要强制邮件的接收和发送在使用安全的 IMAP 和 SMTP 端口的 Roundcube 以及 iRedMail 服务之间,打开位于 /var/www/roundcubemail/config/config.inc.php 的 Roundcube 配置文件并确保你修改过了下面的行,本例中是 localhost,如下片段所示: - +5、 要强制邮件的接收和发送在使用安全的 IMAP 和 SMTP 端口的 Roundcube 以及 iRedMail 服务之间,打开位于 `/var/www/roundcubemail/config/config.inc.php` 的 Roundcube 配置文件并确保你修改过了下面的行,本例中是 `localhost`,如下片段所示: ``` // For IMAPS @@ -93,7 +86,7 @@ $config['smtp_auth_type'] = 'LOGIN'; 这步强烈建议在远程主机中安装 Roudcube,而不是提供了邮件服务的主机中(IMAP、POP3 或者 SMTP 守护进程)。 -6. 接下来,不要关闭配置文件,搜索并做如下小的修改以便 Roundcube 能够通过 HTTPS 协议访问、隐藏版本号以及自动为登录 Web 界面的帐户追加域名。 +6、 接下来,不要关闭配置文件,搜索并做如下小的修改以便 Roundcube 能够通过 HTTPS 协议访问、隐藏版本号以及自动为登录 Web 界面的帐户追加域名。 ``` $config['force_https'] = true; @@ -101,7 +94,7 @@ $config['useragent'] = 'Your Webmail'; // Hide version number $config['username_domain'] = 'domain.tld' ``` -7. 同样,禁用下面的插件:managesieve 和 password,通过在以 $config[‘plugins’] 开头的行前添加注释 `(//)`。 +7、 同样,禁用下面的插件:managesieve 和 password,通过在以 `$config[‘plugins’]` 开头的行前添加注释 `//`。 一旦登录并验证了域,用户将从连接到 Samba4 AD DC 的 Windows 或 Linux 机器上更改密码。系统管理员将全局管理域帐户的所有筛选规则。 @@ -109,7 +102,7 @@ $config['username_domain'] = 'domain.tld' // $config['plugins'] = array('managesieve', 'password'); ``` -8. 最后,保存并关闭配置文件,并打开浏览器访问 Roundcube Webmail,通过 HTTPS 协议进入 iRedMail IP 地址或者 FQDN/mail 位置。 +8、 最后,保存并关闭配置文件,并打开浏览器访问 Roundcube Webmail,通过 HTTPS 协议进入 iRedMail IP 地址或者 FQDN/mail 位置。 由于浏览器使用的是自签名证书,所以你首次访问 Roundcube 会在浏览器上看到一个警告。接受证书并用 Samba AD 帐户凭证登录。 @@ -118,13 +111,13 @@ https://iredmail-FQDN/mail ``` [![Roundcube Webmail Login](https://www.tecmint.com/wp-content/uploads/2017/05/Roundcube-Webmail-Login.png)][10] -Roundcube Webmail 登录 +*Roundcube Webmail 登录* ### 第三步:在 Roundcube 中启用 Samba AD 联系人 -9. 要配置 Samba AD 全局 LDAP 地址簿以在 Roundcube 联系人中显示,再次打开 Roundcube 配置文件,并做如下修改: +9、 要配置 Samba AD 全局 LDAP 地址簿以在 Roundcube 联系人中显示,再次打开 Roundcube 配置文件,并做如下修改: -到达文件的底部,并辨认以 “# Global LDAP Address Book with AD” 开头的部分,删除到文件底部的所有内容,并替换成如下代码段: +到达文件的底部,并辨认以 `# Global LDAP Address Book with AD` 开头的部分,删除到文件底部的所有内容,并替换成如下代码段: ``` # Global LDAP Address Book with AD. @@ -164,29 +157,29 @@ $config['ldap_public']["global_ldap_abook"] = array( ); ``` -在这段代码中替换相应的 name、hosts、base_dn、bind_dn 和 bind_pass 的值。 +在这段代码中替换相应的 `name`、`hosts`、`base_dn`、`bind_dn` 和 `bind_pass` 的值。 -10. 做了所需修改后,保存并关闭文件,登录 Roundcube webmail 界面,并进入地址簿菜单。 +10、 做了所需修改后,保存并关闭文件,登录 Roundcube webmail 界面,并进入地址簿菜单。 所有域名帐户(用户和组)与其指定的电子邮件地址的联系人列表都将被显示在全局地址簿上。 [![Roundcube User Contact List](https://www.tecmint.com/wp-content/uploads/2017/05/Roundcube-User-Contact-List.png)][11] -Roundcube 用户联系人列表 +*Roundcube 用户联系人列表* ### 第四步:为 Roundcube Webmail 界面添加一个别名 -11. 要从 https://webmail.domain.tld 访问 Roundcube 而不是从 iRedMail 默认提供的旧地址,你需要进行以下更改。 +11、 要从 https://webmail.domain.tld 访问 Roundcube 而不是从 iRedMail 默认提供的旧地址,你需要进行以下更改。 在已安装 RSAT 工具的已加入的 Windows 机器上打开 DNS 管理器,并如下所示,添加一条 iRedMail FQDN、named webmail 的 CNAME 记录。 [![DNS Webmail Properties](https://www.tecmint.com/wp-content/uploads/2017/05/DNS-Webmail-Properties.jpg)][12] -DNS Webmail 属性 +*DNS Webmail 属性* -12. 接下来,在 iRedMail 机器中,打开位于 /etc/httpd/conf.d/ssl.conf 的 Apache Web 服务器的 SSL 配置文件,将 DocumentRoot 指向 /var/www/roundcubemail/。 +12、 接下来,在 iRedMail 机器中,打开位于 `/etc/httpd/conf.d/ssl.conf` 的 Apache Web 服务器的 SSL 配置文件,将 `DocumentRoot` 指向 `/var/www/roundcubemail/`。 -修改 /etc/httpd/conf.d/ssl.conf 片段: +修改 `/etc/httpd/conf.d/ssl.conf` 片段: ``` @@ -199,7 +192,7 @@ DocumentRoot “/var/www/roundcubemail/” # systemctl restart httpd ``` -13. 现在打开下面的地址,Roundcube 界面应该会显示出来。接受自签名证书错误以进入登录页面。用你自己的域名替换例子中的 domain.tld。 +13、 现在打开下面的地址,Roundcube 界面应该会显示出来。接受自签名证书错误以进入登录页面。用你自己的域名替换例子中的 domain.tld。 ``` https://webmail.domain.tld @@ -207,42 +200,41 @@ https://webmail.domain.tld ### 第五步:禁用 iRedMail 未使用的服务 -14. 由于 iRedMail 守护进程配置为查询 Samba4 AD DC LDAP 服务器的帐户信息和其他资源,因此可以通过使用以下命令来安全地停止和禁用 iRedMail 机器上的某些本地服务,例如 LDAP 数据库服务器和 iredpad 服务。 - +14、 由于 iRedMail 守护进程配置为查询 Samba4 AD DC LDAP 服务器的帐户信息和其他资源,因此可以通过使用以下命令来安全地停止和禁用 iRedMail 机器上的某些本地服务,例如 LDAP 数据库服务器和 iredpad 服务。 ``` # systemctl stop slapd iredpad # systemctl disable slapd iredpad ``` -15. 另外,如下图所示,通过在 crontab 文件中的每行之前添加注释(#),禁用 iRedMail 执行的某些计划任务,例如 LDAP 数据库备份和 iRedPad 跟踪记录。 +15、 另外,如下图所示,通过在 crontab 文件中的每行之前添加注释 `#`,禁用 iRedMail 执行的某些计划任务,例如 LDAP 数据库备份和 iRedPad 跟踪记录。 ``` # crontab -e ``` [![Disable iRedMail Tasks](https://www.tecmint.com/wp-content/uploads/2017/05/Disable-iRedMail-Tasks.png)][13] -禁用 iRedMail 任务 +*禁用 iRedMail 任务* ### 第六步:在 Postfix 中使用邮件别名 -16. 要将所有本地生成的邮件(发往 postmaster 并随后重定向到 root 帐户)重定向到特定的 Samba4 AD 帐户,请打开位于 /etc/postfix/aliases 中的 Postfix 别名配置文件,并修改root行,如下所示: +16、 要将所有本地生成的邮件(发往 postmaster 并随后重定向到 root 帐户)重定向到特定的 Samba4 AD 帐户,请打开位于 `/etc/postfix/aliases` 中的 Postfix 别名配置文件,并修改 `root` 行,如下所示: ``` root: your_AD_email_account@domain.tld ``` -17. 应用别名配置文件,以便 Postfix 可以通过执行 newaliases 命令以其自己的格式读取它,并测试邮件是否通过发出以下命令发送到正确的域电子邮件帐户。 +17、 应用别名配置文件,以便 Postfix 可以通过执行 `newaliases` 命令以其自己的格式读取它,并测试邮件是否通过发出以下命令发送到正确的域电子邮件帐户。 ``` # echo “Test mail” | mail -s “This is root’s email” root ``` -18. 邮件发送完毕后,请使用你为邮件重定向设置的域帐户登录 Roundcube webmail,并验证先前发送的邮件应该在你的帐户收件箱中。 +18、 邮件发送完毕后,请使用你为邮件重定向设置的域帐户登录 Roundcube webmail,并验证先前发送的邮件应该在你的帐户收件箱中。 [![Verify User Mail](https://www.tecmint.com/wp-content/uploads/2017/05/Verify-User-Mail.png)][14] -验证用户邮件 +*验证用户邮件* 就是这样了!现在你已经有了一个完全工作的与 Samba4 AD 集成的邮件服务器了。域帐户可以用它们的内部或者其他外部域发送和接收邮件了。 @@ -259,17 +251,17 @@ root: your_AD_email_account@domain.tld via: https://www.tecmint.com/integrate-iredmail-roundcube-with-samba4-ad-dc/ -作者:[ ][a] +作者:[Matei Cezar][a] 译者:[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/) 荣誉推出 [a]:https://www.tecmint.com/author/cezarmatei/ -[1]:https://www.tecmint.com/install-iredmail-on-centos-7-for-samba4-ad-integration/ -[2]:https://www.tecmint.com/integrate-iredmail-to-samba4-ad-dc-on-centos-7/ +[1]:https://linux.cn/article-8567-1.html +[2]:https://linux.cn/article-8673-1.html [3]:https://www.tecmint.com/install-and-configure-roundcube-webmail-for-postfix-mail-server/ -[4]:https://www.tecmint.com/manage-samba4-ad-from-windows-via-rsat/ +[4]:https://linux.cn/article-8097-1.html [5]:https://www.tecmint.com/wp-content/uploads/2017/05/Active-Directory-User-and-Computers.jpg [6]:https://www.tecmint.com/wp-content/uploads/2017/05/Create-Group-Admin-for-Samba4-AD-DC.png [7]:https://www.tecmint.com/wp-content/uploads/2017/05/Add-Users-to-Group.png From fa7ca2ff6026170721e26de15e401a3b149d223b Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 9 Jul 2017 05:44:53 +0800 Subject: [PATCH 062/100] PRF:20170525 An introduction to Linux s EXT4 filesystem.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 部分 --- ...introduction to Linux s EXT4 filesystem.md | 82 ++++++++----------- 1 file changed, 36 insertions(+), 46 deletions(-) diff --git a/translated/tech/20170525 An introduction to Linux s EXT4 filesystem.md b/translated/tech/20170525 An introduction to Linux s EXT4 filesystem.md index 25e27d187e..62e6933e26 100644 --- a/translated/tech/20170525 An introduction to Linux s EXT4 filesystem.md +++ b/translated/tech/20170525 An introduction to Linux s EXT4 filesystem.md @@ -1,24 +1,18 @@ Linux 的 EXT4 文件系统简介 ============================================================ -### 让我们大概地从 EXT4 的历史、特性以及最佳实践这几个方面来学习它和之前的所有的 EXT 文件系统有何不同。 +> 让我们大概地从 EXT4 的历史、特性以及最佳实践这几个方面来学习它和之前的几代 EXT 文件系统有何不同。 -![An introduction to the EXT4 filesystem](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/hard_drives.png?itok=yZWyaSO6 "An introduction to the EXT4 filesystem") ->图片来自 : [WIlliam][8][ Warby][9]. 由 [Jason Baker][10] 编辑. Creative Commons [BY-SA 2.0][11]. -在之前关于 Linux 文件系统的文章里,我写过一篇 [an introduction to Linux filesystems][12] 和一些更高级的概念例如 [everything is a file][13]. 我想要更深入地了解 EXT 文件系统的特性的详细内容,但是首先让我们来回答一个问题,“什么样才算是一个文件系统 ?” 一个文件系统应该涵盖以下所有点: +在之前关于 Linux 文件系统的文章里,我写过一篇 [Linux 文件系统介绍][12] 和一些更高级的概念例如 [一切都是文件][13]。 我想要更深入地了解 EXT 文件系统的特性的详细内容,但是首先让我们来回答一个问题,“什么样才算是一个文件系统 ?” 一个文件系统应该涵盖以下所有特点: -1. **数据存储:** 对于任何一个文件系统来说,一个最主要的功能就是能够被当作一个容器结构来存储和恢复数据。 +1. **数据存储:** 对于任何一个文件系统来说,一个最主要的功能就是能够被当作一个容器结构来存储和取得数据。 +2. **命名空间:** 命名空间是一个提供了命名规则和数据结构的用于命名与组织的方法学。 +3. **安全模型:** 一个用于定义访问权限的策略。 +4. **API:** 调用操作这个系统的对象的系统方法,这些对象诸如目录和文件。 +5. **实现:** 能够实现以上几点的软件。 -2. **命名空间:** 命名空间是一个提供了命名规则和数据结构的用于命名与组织的方法学。 - -3. **安全模型:** 一个用于定义访问权限的策略。 - -4. **API:** 指的是调用了操作这个系统的对象的系统方法,这些对象诸如目录和文件。 - -5. **实现:** 能够实现以上几点的软件。 - -本文内容的讨论主要集中于上述几点中的第一项并探索为一个 EXT 文件系统的数据存储提供逻辑框架的元数据结构。 +本文内容的讨论主要集中于上述几点中的第一项,并探索为一个 EXT 文件系统的数据存储提供逻辑框架的元数据结构。 ### EXT 文件系统历史 @@ -26,47 +20,42 @@ Linux 的 EXT4 文件系统简介 ### Minix -当 Linux Torvalds 在写最初的 Linux 内核的时候,他需要一个文件系统但是他又不想自己写一个。于是他简单地把 [Minix 文件系统][14] 加了进去,这个 Minix 文件系统是由 [Andrew S. Tanenbaum][15] 写的同时也是 Tanenbaum 的 Minix 操作系统的一部分。[Minix][16] 是一个类 Unix 风格的操作系统,最初编写它的原因是用于教育。Minx 的代码是自由可用的且经过适当的许可的,所以 Torvalds 可以把它用 Linux 的最初版本里。 +当 Linux Torvalds 在写最初的 Linux 内核的时候,他需要一个文件系统但是他又不想自己写一个。于是他简单地把 [Minix 文件系统][14] 加了进去,这个 Minix 文件系统是由 [Andrew S. Tanenbaum][15] 写的,同时它也是 Tanenbaum 的 Minix 操作系统的一部分。[Minix][16] 是一个类 Unix 风格的操作系统,最初编写它的原因是用于教育用途。Minix 的代码是自由可用的并有适当的许可协议,所以 Torvalds 可以把它用 Linux 的最初版本里。 Minix 有以下这些结构,其中的大部分位于生成文件系统的分区中: -* [**boot 扇区**][6] 是硬盘驱动安装后的第一个扇区。这个 boot 块包含了一个非常小的 boot 记录和一个分区表。 - -* 每一个分区的第一个块都是一个包含了元数据的 **superblock** ,这些元数据定义了其他文件系统的结构并将其定位于物理硬盘的具体分区上。 - -* 一个 **inode 位图块** 决定了哪些 inode 是在使用中的,哪一些是未使用的。 - -* **inode** 在硬盘上有它们自己的空间。每一个 inode 都包含了一个文件的信息包括其所处的数据块的位置,也就是该文件所处的区域。 - +* [**引导扇区**][6] 是硬盘安装后的第一个扇区。这个引导块包含了一个非常小的引导记录和一个分区表。 +* 每一个分区的第一个块都是一个包含了元数据的**超级块(superblock)** ,这些元数据定义了其他文件系统的结构并将其定位于物理硬盘的具体分区上。 +* 一个 **inode 位图块** 决定了哪些 inode 是在使用中的,哪一些是未使用的。 +* **inode** 在硬盘上有它们自己的空间。每一个 inode 都包含了一个文件的信息,包括其所处的数据块的位置,也就是该文件所处的区域。 * 一个 **区位图** 用于保持追踪数据区域的使用和未使用情况。 - * 一个 **数据区**, 这里是数据存储的地方。 -对上述了两种位图类型来说,一个 bit 表示一个制定的数据区或者一个指定的 inode. 如果这个 bit 是 0 则表示这个数据区或者这个 inode 是可以使用的,如果是 1 则表示正在使用中。 +对上述了两种位图类型来说,一个位(bit)表示一个指定的数据区或者一个指定的 inode。 如果这个位是 0 则表示这个数据区或者这个 inode 是可用的,如果是 1 则表示正在使用中。 -那么,[inode][17] 又是什么呢 ? 就是 index-node (索引节点)的简写。 inode 是位于磁盘上的一个 256 字节的块,用于存储和该 inode 对应的文件的相关数据。这些数据包含了文件的大小、文件的所有者和所属组的用户的 ID、文件模式(即访问权限)以及三个时间戳用于指定:该文件最后的访问时间、该文件的最后修改时间和该 inode 中的数据的最后修改时间。 +那么,[inode][17] 又是什么呢 ? 就是 index-node (索引节点)的简写。 inode 是位于磁盘上的一个 256 字节的块,用于存储和该 inode 对应的文件的相关数据。这些数据包含了文件的大小、文件的所有者和所属组的用户 ID、文件模式(即访问权限)以及三个时间戳用于指定:该文件最后的访问时间、该文件的最后修改时间和该 inode 中的数据的最后修改时间。 -同时,这个 inode 还包含了指向了其所对应的文件的数据在硬盘中的位置。在 Minix 和 EXT1-3 文件系统中,inode 表示的是一系列的的数据区和块。Minix 文件系统的 inode 支持 9 个数据块包括 7 个直接数据块和 2 个间接数据块。如果你想要更深入的了解,这里有一个优秀的 PDF 详细地描述了 [Minix 文件系统街头][18] 。同时你也可以在维基百科上对 [inode 指针结构][19] 做一个快速的浏览。 +同时,这个 inode 还包含了指向了其所对应的文件的数据在硬盘中的位置。在 Minix 和 EXT 1-3 文件系统中,这是一个数据区和块的列表。Minix 文件系统的 inode 支持 9 个数据块,包括 7 个直接数据块和 2 个间接数据块。如果你想要更深入的了解,这里有一个优秀的 PDF 详细地描述了 [Minix 文件系统结构][18] 。同时你也可以在维基百科上对 [inode 指针结构][19] 做一个快速了解。 ### EXT -原生的 [EXT 文件系统][20] (指经过扩展的) 是由 [Rémy Card][21] 编写并于 1992 年与 Linux 一同发行。主要是为了克服 Minix 文件系统中的一些文件大小限制的问题。其中,最主要的结构变化就是文件系统中的元数据。它基于 Unix 文件系统 (UFS),也被称为伯克利快速文件系统(FFS)。我发现只有很少一部分关于 EXT 文件系统的发行信息是可以被验证的,显然这是因为其存在着严重的问题并且它很快地被 EXT2 文件系统取代了。 +原生的 [EXT 文件系统][20] (意即扩展的(extended)) 是由 [Rémy Card][21] 编写并于 1992 年与 Linux 一同发行。主要是为了克服 Minix 文件系统中的一些文件大小限制的问题。其中,最主要的结构变化就是文件系统中的元数据。它基于 Unix 文件系统 (UFS),其也被称为伯克利快速文件系统(FFS)。我发现只有很少一部分关于 EXT 文件系统的发行信息是可以被确证的,显然这是因为其存在着严重的问题,并且它很快地被 EXT2 文件系统取代了。 ### EXT2 -[EXT2 文件系统][22] 就相当地成功,它在 Linux 发行版中存活了多年。它是我在 1997 年开始使用 Red Hat Linux 时认识的第一个文件系统。实际上,EXT2 文件系统有着和 EXT 文件系统基本相同的元数据结构。然而 EXT2 更高瞻远瞩,因为其元数据结构之间留有很多磁盘空间供将来使用。 +[EXT2 文件系统][22] 就相当地成功,它在 Linux 发行版中存活了多年。它是我在 1997 年开始使用 Red Hat Linux 5.0 时接触的第一个文件系统。实际上,EXT2 文件系统有着和 EXT 文件系统基本相同的元数据结构。然而 EXT2 更高瞻远瞩,因为其元数据结构之间留有很多磁盘空间供将来使用。 -和 Minix 类似,EXT2 也有一个[boot 扇区][23] ,它是硬盘驱动安装后的第一个扇区。它包含了少量的 boot 记录和一个分区表。接着 boot 扇区之后是一些保留的空间,它跨越引导记录和通常位于下一个柱面的硬盘驱动器上的第一个分区之间的空间。 [GRUB2] [24] - 也可能是GRUB1 - 将此空间用于其部分启动代码。 +和 Minix 类似,EXT2 也有一个[引导扇区][23] ,它是硬盘安装后的第一个扇区。它包含了非常小的引导记录和一个分区表。接着引导扇区之后是一些保留的空间,它填充了引导记录和硬盘驱动器上的第一个分区(通常位于下一个柱面的)之间的空间。[GRUB2][24] - 也可能是 GRUB1 - 将此空间用于其部分引导代码。 -每个 EXT2 分区中的空间分为各柱面组,它允许更精细地管理数据空间。 根据我的经验,每一组大小通常约为8MB。 下面的图1显示了一个柱面组的基本结构。 柱面中的数据分配单元是块,通常大小为4K。 +每个 EXT2 分区中的空间被分为柱面组,它允许更精细地管理数据空间。 根据我的经验,每一组大小通常约为 8MB。 下面的图 1 显示了一个柱面组的基本结构。 柱面中的数据分配单元是块,通常大小为 4K。 ![cylindergroup-01_1.png](https://opensource.com/sites/default/files/images/life-uploads/cylindergroup-01_1.png) -Figure 1: EXT 文件系统中的柱面组的结构 +*图 1: EXT 文件系统中的柱面组的结构* -柱面组中的第一个块是一个超级块,它包含了一个定义了其他文件系统的结构并将其定位于物理硬盘的具体分区上的元数据。分区中有一些柱面组还会有备用超级块,但并不是所有的柱面组都有。我们还可以使用例如 **dd** 等磁盘工具来拷贝备用超级块的内容到主超级块上以达到更换损坏超级块的目的。虽然这种情况不会经常发生,但是在几年前我的一个超级块损坏了,我就是用这种方法来修复的。幸好,我很有先见之明地使用了 **dumpe2fs** 命令来备份了我的分区描述符信息到我的系统上。 +柱面组中的第一个块是一个超级块(superblock),它包含了一个元数据,定义了其它文件系统的结构并将其定位于物理硬盘的具体分区上。分区中有一些柱面组还会有备用超级块,但并不是所有的柱面组都有。我们还可以使用例如 `dd` 等磁盘工具来拷贝备用超级块的内容到主超级块上,以达到修复损坏的超级块的目的。虽然这种情况不会经常发生,但是在几年前我的一个超级块损坏了,我就是用这种方法来修复的。幸好,我很有先见之明地使用了 `dumpe2fs` 命令来备份了我的分区描述符信息到我的系统上。 -以下是 **dumpe2fs** 命令的一部分输出。这部分输出主要是超级块上包含的一些元数据,同时也是文件系统上的前两个柱面组的数据。 +以下是 `dumpe2fs` 命令的一部分输出。这部分输出主要是超级块上包含的一些元数据,同时也是文件系统上的前两个柱面组的数据。 ``` # dumpe2fs /dev/sda1 @@ -147,26 +136,26 @@ Group 2: (Blocks 65536-98303) Free inodes: 16289-24432 Group 3: (Blocks 98304-131071) - +<截断> ``` -每一个柱面组都有自己的 inode 位图用于判定该柱面组中的哪些 inode 是使用中的而哪些又是未被使用的。每一个柱面组的 inode 都有它们自己的空间。每一个 inode 都包含了对应的文件的相关信息,包括其位于该文件的数据块中的位置。这个块位图纪录了文件系统中的使用中和非使用中的数据块。请注意,在上面的输出中有大量关于文件系统的数据。在非常大的文件系统上,组数据可以运行到数百页的长度。 组元数据包括组中所有空闲数据块的列表。 +每一个柱面组都有自己的 inode 位图,用于判定该柱面组中的哪些 inode 是使用中的而哪些又是未被使用的。每一个柱面组的 inode 都有它们自己的空间。每一个 inode 都包含了对应的文件的相关信息,包括其位于该文件的数据块中的位置。这个块位图纪录了文件系统中的使用中和非使用中的数据块。请注意,在上面的输出中有大量关于文件系统的数据。在非常大的文件系统上,组数据可以运行到数百页的长度。 组元数据包括组中所有空闲数据块的列表。 EXT 文件系统实现了数据分配策略以确保产生最少的文件碎片。减少文件碎片可以提高文件系统的性能。这些策略会在下面的 EXT4 中描述到。 -我所遇见的关于 EXT2 文件系统最大的问题是 **fsck** (文件系统检查) 程序这一环节占用了很长一段时间来定位和校准文件系统中的所有不一致性导致其共花费了数个小时来修复一个崩溃。有一次我的其中一台电脑共花费了 28 个小时在一次崩溃后重新启动时恢复磁盘上,并且是在磁盘被检测量在几百兆字节大小的情况下。 +我所遇见的关于 EXT2 文件系统最大的问题是 `fsck` (文件系统检查) 程序这一环节占用了很长一段时间来定位和校准文件系统中的所有的不一致性,从而导致一次系统崩溃(crash)后其会花费了数个小时来修复。有一次我的其中一台电脑在崩溃后重新启动时共花费了 28 个小时恢复磁盘,并且是在磁盘被检测量只有几百兆字节大小的情况下。 ### EXT3 -[EXT3 文件系统][25] 具有克服 **fsck** 程序需要完全恢复在文件更新操作期间发生的不正确关机损坏的磁盘结构所需的大量时间的单一目标。EXT 文件系统的唯一新增是 [日志][26],它将提前记录将对文件系统执行的更改。 磁盘结构的其余部分与 EXT2 中的相同。 +[EXT3 文件系统][25] 应一个目标而生,就是克服 `fsck` 程序需要完全恢复在文件更新操作期间发生的不正确关机而损坏的磁盘结构所需的大量时间。它对 EXT 文件系统的唯一新增功能是 [日志][26],它将提前记录将对文件系统执行的更改。 EXT3 的磁盘结构的其余部分与 EXT2 中的相同。 -作为一个先前的版本,除了直接写入数据到磁盘的数据区域外,EXT3 的日志在写入元数据时同时会也写入文件数据到磁盘上的一个指定数据区域。一旦这些数据安全地到达硬盘,它就可以几乎零丢失率地被合并或者被追加到目标文件。当这些数据被提交到磁盘上的数据区域上,这些日志就会随即更新,这样在系统发生故障之前,文件系统将保持一致状态,才能提交日志中的所有数据。在下次启动时,将检查文件系统的不一致性,然后将日志中保留的数据提交到磁盘的数据区,以完成对目标文件的更新。 +除了直接写入数据到磁盘的数据区域外,同先前的版本一样,EXT3 写入文件数据的日志随同元数据写入到磁盘上的一个指定数据区域。一旦这些数据安全地到达硬盘,它就可以几乎零丢失率地被合并或者被追加到目标文件。当这些数据被提交到磁盘上的数据区域上,这些日志就会随即更新,这样在日志中的所有数据提交之前,系统发生故障时文件系统将保持一致状态。在下次启动时,将检查文件系统的不一致性,然后将日志中保留的数据提交到磁盘的数据区,以完成对目标文件的更新。 -日记功能确实降低了数据写入性能,但是有三个可用于日志的选项,允许用户在性能和数据完整性和安全性之间进行选择。 我的个人更偏向于选择安全性,因为我的环境不需要大量的磁盘写入活动。 +日志功能确实降低了数据写入性能,但是有三个可用于日志的选项,允许用户在性能和数据完整性和安全性之间进行选择。 我的个人更偏向于选择安全性,因为我的环境不需要大量的磁盘写入活动。 -日志功能减少了在从几小时(甚至几天)到几分钟之间的失败后检查硬盘驱动器所需的时间。 多年来,我遇到了很多问题导致了我的系统崩溃。要详细说的话恐怕还得再写一篇文章,但这足以说明大多数是我自己造成的,就比如不小心踢掉一个电源插头。 幸运的是,EXT日志文件系统将启动恢复时间缩短到两三分钟。 此外,自从我开始使用带日志记录的EXT3,我从来没有遇到丢失数据的问题。 +日志功能将失败后检查硬盘驱动器所需的时间从减少了从几小时(甚至几天)减少到几分钟。 多年来,我遇到了很多导致了我的系统崩溃的问题。要详细说的话恐怕还得再写一篇文章,但这需要说明的是大多数是我自己造成的,就比如不小心踢掉一个电源插头。 幸运的是,EXT 日志文件系统将启动恢复时间缩短到两三分钟。 此外,自从我开始使用带日志记录的 EXT3,我从来没有遇到丢失数据的问题。 -EXT3 的日志功能可以关闭,然后作为 EXT2 文件系统。 该日志本身仍然是存在的,只是状态为空且未使用。 只需使用类型参数使用 mount 命令来 remount 到分区即可指定EXT2 \。 你可以从命令行执行此操作,但是具体还是取决于你正在使用的文件系统,但你可以更改 **/ etc / fstab** 文件中的类型说明符,然后重新启动。 我强烈建议不要将 EXT3文件系统安装为 EXT2 ,因为这会具有丢失数据和增加恢复时间的潜在可能性。 +EXT3 的日志功能可以关闭,然后其功能就等同于 EXT2 文件系统了。 该日志本身仍然是存在的,只是状态为空且未使用。 只需 `mount` 命令使用文件系统类型参数来重新挂载即可指定为 EXT2。 你可以从命令行执行此操作,但是具体还是取决于你正在使用的文件系统,但你可以更改 `/etc/fstab` 文件中的类型说明符,然后重新启动。 我强烈建议不要将 EXT3 文件系统安装为 EXT2 ,因为这会具有丢失数据和增加恢复时间的潜在可能性。 EXT2 文件系统可以使用如下命令来通过日志升级到 EXT3 。 @@ -174,15 +163,15 @@ EXT2 文件系统可以使用如下命令来通过日志升级到 EXT3 。 tune2fs -j /dev/sda1 ``` - **/dev/sda1** 表示驱动和分区的标识符。同时要注意修改 **/etc/fstab** 中的文件类型标识符并 remount 分区或者重启系统以确保修改生效。 +`/dev/sda1` 表示驱动器和分区的标识符。同时要注意修改 `/etc/fstab` 中的文件系统类型标识符并重新挂载分区或者重启系统以确保修改生效。 ### EXT4 -[EXT4 filesystem][27]主要提高了性能、可靠性和容量。位了提高可靠性,它新增了元数据和日志校验和。同时位了满足各种关键任务要求,文件系统新增了纳秒级别的时间戳。在时间戳字段中添加两个高位来延迟时间戳的 [2038 年的问题][28] ,在 EXT4 文件系统至少可达到 2446 年。 +[EXT4 文件系统][27]主要提高了性能、可靠性和容量。为了提高可靠性,它新增了元数据和日志校验和。同时为了满足各种关键任务要求,文件系统新增了纳秒级别的时间戳。在时间戳字段中添加两个高位来延缓时间戳的 [2038 年的问题][28] ,这样 EXT4 文件系统至少可达到 2446 年。 -在 EXT4 中,数据分配从固定块更改为盘区,盘区由硬盘驱动器上的开始和结束位置来描述。这使得可以在单个 inode 指针条目中描述非常长的物理连续的文件,这可以显着减少描述大文件中所有数据的位置所需的指针数。 EXT4 中已经实施了其他分配策略,以进一步减少碎片化。 +在 EXT4 中,数据分配从固定块更改为盘区(extent),盘区由硬盘驱动器上的开始和结束位置来描述。这使得可以在单个 inode 指针条目中描述非常长的物理上连续的文件,这可以显著减少描述大文件中所有数据的位置所需的指针数。 其它在 EXT4 中已经实施的分配策略可以进一步减少碎片化。 -EXT4 通过将新创建的文件分散在磁盘上,从而使其不会全部聚集在磁盘起始位置,就像早期的PC文件系统一样,减少了碎片。文件分配算法尝试在柱面组中尽可能均匀地扩展文件,并且当需要分段时,要使不连续文件扩展区尽可能靠近同一文件中的其他文件,以尽可能减少头部搜索和旋转等待时间尽可能的当创建新文件或扩展现有文件时,使用其他策略来预分配额外的磁盘空间。这有助于确保扩展文件不会自动导致其分段。新文件不会在现有文件之后立即分配,这也可以防止现有文件的碎片化。 +EXT4 通过将新创建的文件分散在磁盘上,从而使其不会像早期的 PC 文件系统一样全部聚集在磁盘起始位置,从而减少了碎片。文件分配算法尝试在柱面组中尽可能均匀地散布文件,并且当文件需要分段存储时,要使不连续的文件盘区尽可能靠近同一文件中的其他部分,以尽可能减少磁头搜索和电机旋转等待时间。当创建新文件或扩展现有文件时,使用其它策略来预先分配额外的磁盘空间。这有助于确保扩展文件时不会自动导致其分段。新文件不会在现有文件之后立即分配空间,这也可以防止现有文件的碎片化。 除了磁盘上数据的实际位置外,EXT4 使用诸如延迟分配的功能策略,以允许文件系统在分配空间之前收集正在写入磁盘的所有数据。这可以提高数据空间将是连续的可能性。 @@ -249,6 +238,7 @@ fsck -fn /dev/mapper/vg_01-home EXT 文件系统在一些 Linux 发行版本上作为默认文件系统已经超过二十多年了。它们用最少的维护代价提供了稳定性、高可用性、可靠性和其他各种表现。我尝试过一些其它的文件系统但最终都还是回归到 EXT。每一个我在工作中使用到 Linux 的地方都使用到了 EXT 文件系统,同时发现了它们适用于任何主流的负载。毫无疑问,EXT4 文件系统应该被用于大部分的 Linux 文件系统上,除非我们有明显的使用其它文件系统的理由。 + -------------------------------------------------------------------------------- 作者简介: From d97cafe9c218fa4e11da7e2799c80b2d81de1a92 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 9 Jul 2017 07:36:20 +0800 Subject: [PATCH 063/100] PRF&PUB:20170213 Free as in puppy The hidden costs of free software.md @XYenChi --- ...puppy The hidden costs of free software.md | 63 ++++++++++++++++++ ...puppy The hidden costs of free software.md | 64 ------------------- 2 files changed, 63 insertions(+), 64 deletions(-) create mode 100644 published/20170213 Free as in puppy The hidden costs of free software.md delete mode 100644 translated/talk/20170213 Free as in puppy The hidden costs of free software.md diff --git a/published/20170213 Free as in puppy The hidden costs of free software.md b/published/20170213 Free as in puppy The hidden costs of free software.md new file mode 100644 index 0000000000..9cd1e31368 --- /dev/null +++ b/published/20170213 Free as in puppy The hidden costs of free software.md @@ -0,0 +1,63 @@ +幼犬式免费:免费软件中的无形消费 +============================================================ + + ![幼犬式免费:免费软件中的无形消费](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/osdc_whitehurst_money.png?itok=Xqow4bzq "幼犬式免费: 免费软件中的无形消费") + +Image by : opensource.com + +我们习惯于软件被描述为“自由式免费free as in freedom”和“啤酒式免费free as in beer”。但还有另一种不常被提起的“免费”——“幼犬式免费free as in puppy”。这个概念来自于当别人送你一只免费的小狗,但那只小狗不是真的免费。日常照顾它需要花费大量精力与金钱。商业术语是“总体拥有成本”,即 TCO ,这适用于所有场景,不仅仅是开源软件和小狗。 + +既然免费小狗问题适用于所有事,那么它是如何对于开源软件特别重要的呢?有一些解释。首先,如果你已经购买了软件,就会因为消费对它设定期望值。软件起初免费后来需要花钱似乎是很无理的要求。其次,如果这发生在一个组织首次采用开源项目的时候,就会阻碍该组织下一次采用开源项目。最终且违反直觉的是,看起来开源软件需要花钱可能使得它更轻易“卖出”,如果它真的免费,未免也太好了一点。 + +接下来的部分是软件消费渐显的共同之处。这绝不是一个详尽的列表。 + +### 起始消费 + +开始使用软件之前,你必须首先拥有这个软件。 + +* **软件:** 因为它是开源的不一定意味着它是_免费的_。 +* **硬件:** 考虑到软件的需求。如果你没有使用软件所需的硬件(可能是服务器硬件或者客户端硬件),你得买。 +* **培训:** 很少有软件完全直白如话的。在于你是选择培训还是自己去弄清楚。 +* **实战:** 把所有零部件放在一起只是开始,现在,是时候把所有东西拼在一起了。 + * **安装和配置:** 至少这将花费一些员工的工作时间。如果这是一个大项目,你可能需要花钱请一个系统整合服务商或者其他供应商来做这件事。 + * **数据导入:** 如果要取代现成的系统,存在数据搬家的问题。皆大欢喜的是所有都是相同标准编译的,这样就没什么问题。然而在很多情况,需要写一些脚本来提取和重载数据。 + * **其他系统的接口:** 说到写脚本,这个软件能和你使用的其他软件(例如,目录服务或者工资软件)很好联系起来吗? + * **定制:** 如果原本的软件不能满足你所有的需求,那它可能需要定制。你可以做到,但是仍需要努力或者是一些原材料。 +* **商业变化:** 当你的组织希望有所提升时,新软件也可能会变化。然而这种转换不是免费的。例如,生产效率刚开始可能会下降因为员工还在适应新软件。 + +### 经营成本 + +安装软件是简单部分,现在你得使用它。 + +* **更多培训:** 什么,你认为我们已经做好了? 过段时间,你的组织会加入新人,他们需要学习如何使用这个软件,或者说是添加了额外功能的新版本软件发布了。 +* **维护:** + * **订阅费:** 有些软件通过收取订阅费来提供更新。 + * **补丁:**取决于软件的自身,打补丁需要费很多功夫。包括测试和部署。 + * **开发:**你自己做所有定制吗?现在你必须维护下去了。 +* **支持:** 当它坏了得有人来修,无论是供应商还是自己的团队,确实需要一笔花费。 +* **良好的做法:** 这个不是必需品,但如果你在使用开源软件,无论如何给一些回馈是非常好的。比如代码贡献、在邮件列表提供支持、赞助年度会议等等。 +* **商业利益:** 好吧,这不是一个付费项,而且它抵消了一些费用。使用软件对你的组织意味着什么呢?如果它使得量产产品减少了 25% 的浪费,这就是价值。再换个例子,它可能帮助你减少 30% 不盈利部分。 + +这样例子数不胜数,确实需要一定想象力来想出所有的花费。算出正确的价值需要一些实验和大量的的优质客户,但是这样分析一遍的话会使得它更加清晰。就好像一只小狗狗,如果预先知道自己会付出多少,这可能会是一个有价值的实验。 + +-------------------------------------------------------------------------------- + +作者简介: + +Ben Cotton - Ben Cotton 是一个培训过的气象学家和一个职业的高效计算机工程师。 Ben 在 Cycle Computing 做技术传教士。他是 Fedora 用户和贡献者,合作创办当地的一个开源集会,是一名开源倡议者和软件自由机构的支持者。他的推特 (@FunnelFiasco) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/17/2/hidden-costs-free-software + +作者:[Ben Cotton][a] +译者:[XYenChi](https://github.com/XYenChi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/bcotton +[1]:https://opensource.com/article/17/2/hidden-costs-free-software?rate=gXfsYPWiIQNslwJ3zOAje71pTMRhp25Eo0HTdLWOKv4 +[2]:https://opensource.com/user/30131/feed +[3]:https://opensource.com/article/17/2/hidden-costs-free-software#comments +[4]:https://opensource.com/users/bcotton diff --git a/translated/talk/20170213 Free as in puppy The hidden costs of free software.md b/translated/talk/20170213 Free as in puppy The hidden costs of free software.md deleted file mode 100644 index 64c3f8cb1f..0000000000 --- a/translated/talk/20170213 Free as in puppy The hidden costs of free software.md +++ /dev/null @@ -1,64 +0,0 @@ -幼犬式免费:免费软件中的无形消费 -============================================================ - - ![幼犬式免费:免费软件中的无形消费](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/osdc_whitehurst_money.png?itok=Xqow4bzq "幼犬式免费: 免费软件中的无形消费") -Image by : opensource.com - -我们习惯于软件被描述为“自由式免费”和“啤酒式免费”。但还有另一种不常被提起的“免费”——“幼犬式免费”。这个概念来自于当别人送你一只免费的小狗,但那只小狗不是真的免费。日常照顾它需要花费大量精力与金钱。商业术语是“所有权的总花费”,或 TCO (总体拥有成本),这适用于所有场景,不仅仅是开源软件和小狗。 - -既然免费小狗问题适用于所有事,那么它是如何对于开源软件特别重要的呢?有一些解释。首先,如果你已经购买了软件,就会因为消费对它设定期望值。软件起初免费后来收费似乎是主要的无理要求。其次,如果这发生在一个组织首次采用开源项目的时候,就会阻碍该组织下一次采用开源项目。最终且违反直觉的是,表明开源软件需要消费可能使得它更轻易“卖出”,如果它真的免费,未免也太好了一点。 - -接下来的部分是软件消费渐显的共同之处。这绝不是一个详尽的列表。 - -### 起始消费 - -开始使用软件之前,你必须首先拥有这个软件。 - -* **软件:** 只因为它开源不一定意味着它是_免费的_. -* **硬件:** 考虑到软件的需求。如果你没有使用软件所需的硬件(可能是服务器硬件或者客户端硬件),你得买 -* **培训:** 很少有软件完全直白如话的。在于你是选择培训还是自己弄清楚。 -* **实战** 把所有零部件放在一起只是开始,现在,是时候把所有难题放在一起了。 - - * **安装和配置:** 至少这将花费一些员工的工作时间。如果这是一个大项目,你可能需要花钱请一个系统整合者或者其他供应商来做这件事。 - * **数据导入:** 如果要取代现成的系统,存在数据搬家的问题。皆大欢喜的是所有都是相同标准编译的,这样就没什么问题。然而在很多情况,需要写一些脚本来提取和重载数据。 - * **其他系统的接口:** 说到写脚本,这个软件能和你使用的其他软件(例如,词典服务或者工资单软件)很好联系起来吗? - * **定制:** 如果原本的软件不能满足你所有的需求,那它可能需要定制。你可以做到,但是仍需要努力或者是一些原材料。 -* **营业额变化:** 当你的组织希望有所改善时,新软件也会变化。然而这种转换不是免费的。例如,生产效率刚开始可能会下降因为员工还在适应新软件。 - -### 经营成本 - -安装软件是简单部分,现在你得使用它。 - -* **更多培训:** 什么, 你认为我们已经做好这了? 过段时间,你的组织会加入信任,他们需要学习如何使用这个软件,或者说是添加了额外功能的新发行版软件出版了。 -* **维护:** - - * **会员费:** 有些软件通过收取会员费来提供更新。 - * **补丁:**取决于软件的天性,打补丁需要费很多功夫。包括测试和调度。 - * **发展:**你自己做所有定制吗?现在你得永远保持这样了。、 -* **支持:** 当它坏了得有人来修,无论是供应商还是自己的团队,确实需要一笔花费。 -* **好身份:** 这个不是必需品,但如果你在使用开源软件,无论如何给一些回馈是非常好的。比如代码贡献、在邮件列表提供支持、赞助年度会议等等。 -* **商业利益:** 好吧,这不是一个付费项,而且它抵消了一些费用。使用软件对你的组织意味着什么呢?如果它使得量产产品减少了 25% 的浪费,这就是价值。再换个例子,它可能帮助你减少 30% 不盈利部分。 - -这样例子数不胜数,确实需要一定想象力来想出所有的花费。算出正确的价值需要一些实验和大量的的优质客户,但只是经历过程的话会使得它更加清晰。就好像一只小狗狗,如果预先知道自己会付出多少,这可能会是一个有价值的实验。 - --------------------------------------------------------------------------------- - -作者简介: - -Ben Cotton - Ben Cotton 是一个培训过的气象学家和一个职业的高效计算机工程师。 Ben 在 Cycle Computing 做技术传教士.他是 Fedora 用户和贡献者, 合作创办当地的一个开源集会,是一名开源倡议者和软件自由机构的支持者。他的推特 (@FunnelFiasco) - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/17/2/hidden-costs-free-software - -作者:[Ben Cotton ][a] -译者:[XYenChi](https://github.com/XYenChi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/bcotton -[1]:https://opensource.com/article/17/2/hidden-costs-free-software?rate=gXfsYPWiIQNslwJ3zOAje71pTMRhp25Eo0HTdLWOKv4 -[2]:https://opensource.com/user/30131/feed -[3]:https://opensource.com/article/17/2/hidden-costs-free-software#comments -[4]:https://opensource.com/users/bcotton From 195a106bcbe3f9950bc0dc85caaf859cfbd91046 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 9 Jul 2017 19:27:02 +0800 Subject: [PATCH 064/100] translated --- ...urn a Raspberry Pi into an eBook server.md | 117 ------------------ ...urn a Raspberry Pi into an eBook server.md | 114 +++++++++++++++++ 2 files changed, 114 insertions(+), 117 deletions(-) delete mode 100644 sources/tech/20170627 How to turn a Raspberry Pi into an eBook server.md create mode 100644 translated/tech/20170627 How to turn a Raspberry Pi into an eBook server.md diff --git a/sources/tech/20170627 How to turn a Raspberry Pi into an eBook server.md b/sources/tech/20170627 How to turn a Raspberry Pi into an eBook server.md deleted file mode 100644 index 7f0355226a..0000000000 --- a/sources/tech/20170627 How to turn a Raspberry Pi into an eBook server.md +++ /dev/null @@ -1,117 +0,0 @@ -translating---geekpi - -How to turn a Raspberry Pi into an eBook server -============================================================ - -### The Calibre eBook management software makes it easy to set up an eBook server on a Raspberry Pi 3, even in low-connectivity areas. - - -![How to turn a Raspberry Pi into an eBook server](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/idea_innovation_mobile_phone.png?itok=Ep49JfKU "How to turn a Raspberry Pi into an eBook server") -Image by :  - -opensource.com - -Recently [Calibre 3.0 was released][12] which enables users to read books in the browser! Note that Raspbian's repositories have not yet been updated yet (as of this writing). - -eBooks are a great way for teachers, librarians, and others to share books, classroom materials, or other documents with students—provided you have ready and reliable access to broadband. But even if you have low or no connectivity, there's an easy solution: Create an eBook server with the open source Calibre eBook management software running on a Raspberry Pi 3\. Here's how I did it—and you can, too. - -First I downloaded the latest [Raspbian Pixel image][13] and installed it on a new 8GB microSD card. Then I inserted the microSD; connected a keyboard, mouse, and an old LCD TV with an HDMI cable; and booted the Pi. After [adjusting the resolution][14] of the Pixel environment on my monitor and connecting to the local network, I was ready to begin. I opened a terminal and entered **sudo apt-get update** to get the latest updates for the operating system. - -### [1updateos.png][1] - -![Updating Raspbian Pixel](https://opensource.com/sites/default/files/u128651/1updateos.png "Updating Raspbian Pixel") - -Next, I installed the [Calibre][15] software by entering **sudo apt-get install calibre** in a terminal. - -### [2install_calibre.png][2] - -![Installing Calibre](https://opensource.com/sites/default/files/u128651/2install_calibre.png "Installing Calibre") - -I launched Calibre from the command line (note that it can be launched from the GUI also). The Calibre interface is very intuitive. The first time you launch, you see the **Welcome to Calibre** wizard. I changed the default Calibre Library to **CalibreLibrary** (one word), because it's easier when launching the content server. - -After choosing the location for my Calibre content, I was ready to begin downloading books. - -### [3calibre-interface.png][3] - -![Calibre's interface](https://opensource.com/sites/default/files/u128651/3calibre-interface.png "Calibre's interface") - -I selected the **Get Books** option from the menu, and it was very easy to enter my search terms and select the eBook provider I was interested in. I was looking for [non-DRM][16] material, so I chose [Project Gutenberg][17] as my source. (Calibre's disclaimer notes that eBook transactions are between you and the individual content providers.) I entered "Mark Twain" in the author field and got 10 results. - -### [4books.png][4] - -![Searching for e-books](https://opensource.com/sites/default/files/u128651/4books.png "Searching for e-books") - -I selected  _Adventures of Huckleberry Finn_ . On the next screen, I could choose between the **MOBI** and **EPUB** eBook formats. I chose EPUB, and the book downloaded very quickly. - -### [5ebook-formats.png][5] - -![Choosing the e-book format](https://opensource.com/sites/default/files/u128651/5ebook-formats.png "Choosing the e-book format") - -You can also add books to the library from other content providers, not in Calibre's list. For example, a teacher could share open educational resources in eBook format with students through this content server.  To load the content, use the "Add Books" menu option at the far left of the interface - -Depending on the size of your library, you may also need to increase the size of your microSD card. - -![start_the_server.png](https://opensource.com/sites/default/files/images/life-uploads/start_the_server.png) - -After you have added content to your eBook server, you are ready to share it with the rest of your network. Get the IP address of your Raspberry Pi by entering **ifconfig** into the terminal. I was using the wireless network, so I used the result for **wlan0** in the example below. Navigate to the far right of the interface and expand the menu. Then, navigate to "Connect and Share" and start the server. - -### [6ipconfig.png][6] - -![Identifying the IP address with ipconfig](https://opensource.com/sites/default/files/u128651/6ipconfig.png "Identifying the IP address with ipconfig") - -My next step was connecting my client computer to the Raspberry Pi to access the eBooks I'd added. I opened a browser on my client device and navigated to the Raspberry Pi's IP address with the port **:8080** appended. In my case, that was **[http://192.168.1.10:8080][10]** (adapt that format to your Pi's IP address). - -You'll see this home page in your browser: - -### [7calibre-home.png][7] - -![Calibre's client homepage](https://opensource.com/sites/default/files/u128651/7calibre-home.png "Calibre's client homepage") - -I tested and easily connected to the server with an iPhone and Linux and MacOS computers. - -You can explore the options on this home page, or click on **All Books** to display all the content on your eBook server. - -### [8browsing-books.png][8] - -![Browsing e-books](https://opensource.com/sites/default/files/u128651/8browsing-books.png "Browsing e-books") - -From here, you can download the books to your device and read them offline. - -Have you ever set up an eBook server? Or are you thinking about setting up one yourself? Share your advice or questions in the comments. - --------------------------------------------------------------------------------- - -作者简介: - -Don Watkins - Educator, education technology specialist, entrepreneur, open source advocate. M.A. in Educational Psychology, MSED in Educational Leadership, Linux system administrator, CCNA, virtualization using Virtual Box. Follow me at @Don_Watkins . - ------------------ - -via: https://opensource.com/article/17/6/raspberrypi-ebook-server - -作者:[Don Watkins ][a] -译者:[译者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 -[1]:https://opensource.com/file/356446 -[2]:https://opensource.com/file/356451 -[3]:https://opensource.com/file/356456 -[4]:https://opensource.com/file/356461 -[5]:https://opensource.com/file/356466 -[6]:https://opensource.com/file/356471 -[7]:https://opensource.com/file/356476 -[8]:https://opensource.com/file/356481 -[9]:https://opensource.com/article/17/6/raspberrypi-ebook-server?rate=60Tv_hObNU1MQs2f3G6kNoT4qLyxJ03S1q75p2UEOYg -[10]:http://192.168.1.10:8080/ -[11]:https://opensource.com/user/15542/feed -[12]:https://the-digital-reader.com/2017/06/19/calibre-3-0-released/ -[13]:https://www.raspberrypi.org/downloads/raspbian/ -[14]:https://www.raspberrypi.org/forums/viewtopic.php?t=5851 -[15]:https://calibre-ebook.com/ -[16]:https://en.wikipedia.org/wiki/Digital_rights_management -[17]:https://www.gutenberg.org/ -[18]:https://opensource.com/users/don-watkins -[19]:https://opensource.com/article/17/6/raspberrypi-ebook-server#comments diff --git a/translated/tech/20170627 How to turn a Raspberry Pi into an eBook server.md b/translated/tech/20170627 How to turn a Raspberry Pi into an eBook server.md new file mode 100644 index 0000000000..972ba4ba91 --- /dev/null +++ b/translated/tech/20170627 How to turn a Raspberry Pi into an eBook server.md @@ -0,0 +1,114 @@ +如何将树莓派变成电子书服务器 +============================================================ + +### Calibre 电子书管理软件可以轻松地在树莓派 3 上设置电子书服务器,即使在连接较慢区域也是如此。 + +![How to turn a Raspberry Pi into an eBook server](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/idea_innovation_mobile_phone.png?itok=Ep49JfKU "How to turn a Raspberry Pi into an eBook server") +图片提供:  + +opensource.com + +最近[Calibre 3.0 发布了][12],它让用户能够在浏览器中阅读!注意 Raspbian 的仓库还没有更新(截至写作时)。 + +电子书是教师、图书馆员和其他人与学生共享书籍、课堂资料或其他文件的好方法,只需要你有可靠的带宽接入即可。但是,即使你的连接速度较慢或无法连接,还有一个简单的解决方案:使用在树莓派 3 上运行的开源 Calibre 电子书管理软件创建电子书服务器。这是我所做的,你也可以。 + +首先我下载了最新的[ Raspbian Pixel 镜像][13],并安装在一个新的 8GB microSD 卡上。然后我插入 microSD,连接到一块键盘,鼠标并用一根 HDMI 线连接到一台旧的 LCD 电视,然后启动了 Pi。在我的显示器上[调整了 Pixel 环境分辨率][14]并连接到本地网络之后,我准备开始了。我打开一个终端,并输入 **sudo apt-get update** 以获取操作系统的最新更新。 + +### [1updateos.png][1] + +![Updating Raspbian Pixel](https://opensource.com/sites/default/files/u128651/1updateos.png "Updating Raspbian Pixel") + +接下来,我在终端中输入 **sudo apt-get install calibre** 来安装 [Calibre][15]。 + +### [2install_calibre.png][2] + +![Installing Calibre](https://opensource.com/sites/default/files/u128651/2install_calibre.png "Installing Calibre") + +我从命令行启动了 Calibre(注意它也可以从 GUI 启动)。Calibre 的界面非常直观。第一次启动时,你会看到 **Welcome to Calibre** 的向导。我将默认 Calibre Library 更改为 **CalibreLibrary**(一个字),因为这启动内容服务器时更容易。 + +在选择完我的 Calibre 内容位置后,我准备好开始下载书了。 + +### [3calibre-interface.png][3] + +![Calibre's interface](https://opensource.com/sites/default/files/u128651/3calibre-interface.png "Calibre's interface") + +我从菜单中选择了 **Get Books** 选项,在这很容易输入我的搜索字词,并选择我感兴趣的电子书提供者。我正在寻找[非 DRM ][16]的材料,所以我选择 [Project Gutenberg][17] 作为我的源。(Caliber 的免责声明指出,电子书交易是在你和个人内容提供商之间。)我在作者字段中输入 “Mark Twain”,并得到10个结果。 + +### [4books.png][4] + +![Searching for e-books](https://opensource.com/sites/default/files/u128651/4books.png "Searching for e-books") + +我选择了 _Adventures of Huckleberry Finn_ 这本书。在下一页面上,我可以选择 **MOBI** 和 **EPUB** 这两种电子书格式。我选择了 EPUB,这本书下载得很快。 + +### [5ebook-formats.png][5] + +![Choosing the e-book format](https://opensource.com/sites/default/files/u128651/5ebook-formats.png "Choosing the e-book format") + +你也可以从其他内容提供商向库中添加图书,而不是在 Calibre 的列表中添加图书。例如,老师可以通过该内容服务器与学生分享电子书格式的开放教育资源。要加载内容,请使用界面最左侧的 “Add Books” 选项。 + +根据你图书库的大小,你也许需要增加 microSD 卡的大小。 + +![start_the_server.png](https://opensource.com/sites/default/files/images/life-uploads/start_the_server.png) + +将内容添加到电子书服务器后,即可与网络中的其他人共享内容。通过在终端中输入 **ifconfig ** 获取你的树莓派 IP 地址。我正在使用无线网络,所以我在下面的例子中使用了 **wlan0** 中的结果。点击界面的最右侧并展开菜单。然后点击 “Connect and Share” 并启动服务器。 + +### [6ipconfig.png][6] + +![Identifying the IP address with ipconfig](https://opensource.com/sites/default/files/u128651/6ipconfig.png "Identifying the IP address with ipconfig") + +我下一步是通过我的电脑客户端连接到树莓派访问我添加的电子书。我在客户端上打开一个浏览器并输入树莓的地址,后面加上 **:8080** 端口。在我这里是 **[http://192.168.1.10:8080][10]** (根据你 Pi 的地址来适配)。 + +你会在浏览器中看到主页: + +### [7calibre-home.png][7] + +![Calibre's client homepage](https://opensource.com/sites/default/files/u128651/7calibre-home.png "Calibre's client homepage") + +我已经测试,并能用 iPhone、Linux、MacOS 计算机轻易连接到服务器。 + +你可以在这个主页总探索选项,或者点击 **All Books** 显示服务器上的所有内容。 + +### [8browsing-books.png][8] + +![Browsing e-books](https://opensource.com/sites/default/files/u128651/8browsing-books.png "Browsing e-books") + +从这里,你可以下载书到你的设备并离线阅读了。 + +你还没有设置一台电子书服务器么?或者你考虑自己设置一台么?在评论中分享你的建议或者问题。 + +-------------------------------------------------------------------------------- + +作者简介: + +Don Watkins - 教育家、教育技术专家、企业家、开源倡导者。教育心理学硕士、教育领导硕士、Linux 系统管理员、CCNA、使用 Virtual Box 虚拟化。关注我 @Don_Watkins。 + +----------------- + +via: https://opensource.com/article/17/6/raspberrypi-ebook-server + +作者:[Don Watkins ][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/don-watkins +[1]:https://opensource.com/file/356446 +[2]:https://opensource.com/file/356451 +[3]:https://opensource.com/file/356456 +[4]:https://opensource.com/file/356461 +[5]:https://opensource.com/file/356466 +[6]:https://opensource.com/file/356471 +[7]:https://opensource.com/file/356476 +[8]:https://opensource.com/file/356481 +[9]:https://opensource.com/article/17/6/raspberrypi-ebook-server?rate=60Tv_hObNU1MQs2f3G6kNoT4qLyxJ03S1q75p2UEOYg +[10]:http://192.168.1.10:8080/ +[11]:https://opensource.com/user/15542/feed +[12]:https://the-digital-reader.com/2017/06/19/calibre-3-0-released/ +[13]:https://www.raspberrypi.org/downloads/raspbian/ +[14]:https://www.raspberrypi.org/forums/viewtopic.php?t=5851 +[15]:https://calibre-ebook.com/ +[16]:https://en.wikipedia.org/wiki/Digital_rights_management +[17]:https://www.gutenberg.org/ +[18]:https://opensource.com/users/don-watkins +[19]:https://opensource.com/article/17/6/raspberrypi-ebook-server#comments From a2b56ef53042d011c8e583fd5956e05e2eda4d28 Mon Sep 17 00:00:00 2001 From: cycoe Date: Sun, 9 Jul 2017 22:12:40 +0800 Subject: [PATCH 065/100] translated by cycoe --- ...talling Fedora 26 Beta on a MacBook Air.md | 90 ------------------- ...talling Fedora 26 Beta on a MacBook Air.md | 89 ++++++++++++++++++ 2 files changed, 89 insertions(+), 90 deletions(-) delete mode 100644 sources/tech/20170617 Installing Fedora 26 Beta on a MacBook Air.md create mode 100644 translated/tech/20170617 Installing Fedora 26 Beta on a MacBook Air.md diff --git a/sources/tech/20170617 Installing Fedora 26 Beta on a MacBook Air.md b/sources/tech/20170617 Installing Fedora 26 Beta on a MacBook Air.md deleted file mode 100644 index 63cb2ef09d..0000000000 --- a/sources/tech/20170617 Installing Fedora 26 Beta on a MacBook Air.md +++ /dev/null @@ -1,90 +0,0 @@ -Translating by cycoe - -Installing Fedora 26 Beta on a MacBook Air -====================== - - -Since Fedora 26 Beta came out a few days ago, I decided it was a great time to throw it on my 13" MacBook Air. - -This MacBook Air is a model number A1466 EMC 2925 which looks like a 2015ish model, 8gb mem, 2.2GHz i7, 512gb ssd. - -First thing I did was download the beta. You can grab it from the [GetFedora][1] website. Once you have it downloaded, install it to a usb flash drive. From Linux, you can do this easily with the dd command. - -Plug your USB drive into your computer and tail /var/log/syslog (or /var/log/messages) to see what flies by. You can also do a 'df -h' to show the storage devices to find the correct /dev/sdX. - -In this example, we'll assume the USB flash drive is /dev/sdc - -Code: -``` -dd if=/home/rob/Downloads/Fedora-Workstation-Live-x86_64-26_Beta-1.4.iso of=/dev/sdc bs=8M status=progress oflag=direct -``` - -That may take a bit.. let it finish out. - -Next, I shut down the macbook, counted to 5 and powered it back on. After hitting the power on button I held down the 'option' button to give me boot options. The image below shows what my choices were: - -![macbook-air-fedora.jpg](https://www.linux.org/attachments/macbook-air-fedora-jpg.2763/) - -Click the arrow under 'fedora' and proceed with the install. - -After going through the installation I noticed that I had no wifi. Luckily I had a thunderbolt-to-ethernet dongle since this laptop doesn't actually have an ethernet port. I hopped on google and found some great instructions from [this page][2]. - -To set up wifi, -Update your kernel - -Code: -``` -sudo dnf update kernel -``` - -(then reboot) - -Install rpmfusion repo - -Code: -``` -su -c 'dnf install -y http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm' -``` - -Install akmods and kernel-devel packages - -Code: -``` -sudo dnf install -y akmods "kernel-devel-uname-r == $(uname -r)" -``` - -Install the broadcom-wl package from rpmfusion - -Code: -``` -sudo dnf install -y broadcom-wl -``` - -Rebuild kernel extensions - -Code: -``` -sudo akmods -``` - -Then, reboot and hop on your wifi! - -Messing around a little bit with it so far, I'm very impressed! All of the function keys work that I care about (screen brightness, keyboard backlight, volume). - -Then, in July when the non-beta is released, I'll just dnf my way to it! - -Thanks Fedora! - --------------------------------------------------------------------------------- - -via: https://www.linux.org/threads/installing-fedora-26-beta-on-a-macbook-air.12464/ - -作者:[Rob ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.linux.org/members/rob.1/ -[1]:https://getfedora.org/en/workstation/prerelease/ -[2]:https://gist.github.com/jamespamplin/7a803fd5be61d4f93e0c5dcdea3f99ee diff --git a/translated/tech/20170617 Installing Fedora 26 Beta on a MacBook Air.md b/translated/tech/20170617 Installing Fedora 26 Beta on a MacBook Air.md new file mode 100644 index 0000000000..95f7c6a574 --- /dev/null +++ b/translated/tech/20170617 Installing Fedora 26 Beta on a MacBook Air.md @@ -0,0 +1,89 @@ +Translated by cycoe + +在 MacBook Air 上安装 Fedora 26 测试版 +====================== + + +距离 Fedora 26 测试版发布已有几天,我认为是时候把它安装在我的 13 寸 MacBook Air 上了。 + +这代 MacBook Air 的型号为 A1466 EMC 2925,拥有 8gb 内存,2.2GHz i7 处理器,512gb ssd,以及与 2015ish 相似的外观。 + +首先我下载了 beta 版镜像,你能够从 [GetFedora][1] 网站获取。一旦你下载完成,就可将它安装在 USB 闪存驱动器上。在 Linux 上,你可以用 `dd` 命令方便的完成这个操作。 + +将 USB 驱动器插入到你的电脑上,并使用 `tail` 命令读取 `/var/log/syslog` 或 `/var/log/messages` 文件的最后几行。你也可以使用 `df -h` 命令查看存储设备从而找到正确的 /dev/sdX。 + +在下面的例子中,我们假设 USB 闪存驱动器为 /dev/sdc + +代码: +``` +dd if=/home/rob/Downloads/Fedora-Workstation-Live-x86_64-26_Beta-1.4.iso of=/dev/sdc bs=8M status=progress oflag=direct +``` + +这将花费一点点时间... 让我们耐心等待。 + +接下来,我关掉 MacBook,等待 5 s 后将它重新启动。在按下电源键后,我按住 'option' 键来呼出启动选项。我的选择如下图: + +![macbook-air-fedora.jpg](https://www.linux.org/attachments/macbook-air-fedora-jpg.2763/) + +点击 'fedora' 下面的箭头进入安装过程。 + +在进入安装过程后我注意到我没有 wifi 网络。幸运的是我有个雷电口转以太网的转接器,因为这个笔记本实际上没有以太网接口。我寄希望于谷歌并于 [此处][2] 找到了一些很棒的指导。 + +设置 wifi 前先更新内核 + +代码: +``` +sudo dnf update kernel +``` + +(然后重启) + +安装 rpmfusion 仓库 + +代码: +``` +su -c 'dnf install -y http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm' +``` + +安装 akmods 和 kernel-devel 包 + +代码: +``` +sudo dnf install -y akmods "kernel-devel-uname-r == $(uname -r)" +``` + +从 rpmfusion 仓库安装 broadcom-wl 包 + +代码: +``` +sudo dnf install -y broadcom-wl +``` + +重构内核扩展 + +代码: +``` +sudo akmods +``` + +然后重启连接你的 wifi! + +到目前为止我们已经解决,这使我印象非常深刻!所有我关心的功能键都能够正常工作,如屏幕亮度、键盘背光、音量。 + +接下来,等 7 月份发布非测试版时,我将马上使用 dnf 升级! + +感谢你,Fedora! + +-------------------------------------------------------------------------------- + +via: https://www.linux.org/threads/installing-fedora-26-beta-on-a-macbook-air.12464/ + +作者:[Rob ][a] +译者:[cycoe](https://github.com/cycoe) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.linux.org/members/rob.1/ +[1]:https://getfedora.org/en/workstation/prerelease/ +[2]:https://gist.github.com/jamespamplin/7a803fd5be61d4f93e0c5dcdea3f99ee From 2e932b9c22c0a8b9f879948ce0a7c09f932b3ab7 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 9 Jul 2017 23:49:38 +0800 Subject: [PATCH 066/100] PRF&PUB:28 - The history of Android.md @alim0x --- .../28 - The history of Android.md | 80 +++++++------------ 1 file changed, 28 insertions(+), 52 deletions(-) rename {translated/talk => published}/The history of Android/28 - The history of Android.md (76%) diff --git a/translated/talk/The history of Android/28 - The history of Android.md b/published/The history of Android/28 - The history of Android.md similarity index 76% rename from translated/talk/The history of Android/28 - The history of Android.md rename to published/The history of Android/28 - The history of Android.md index 7dc1bef410..a5926fec19 100644 --- a/translated/talk/The history of Android/28 - The history of Android.md +++ b/published/The history of Android/28 - The history of Android.md @@ -1,11 +1,9 @@ -安卓编年史 +安卓编年史(28):Android 5.0 Lollipop——有史以来最重要的安卓版本(2) ================================================================================ ->让我们跟着安卓从 0.5 版本到 7 的无尽迭代来看看它的发展历史。 - #### ART——为未来提供了一个平台的安卓运行时 -安卓里没有多少组件的血统能追溯到 1.0 时代,但在 2014 年 Dalvik 这个驱动安卓应用的运行时是它们中的一员。Dalvik 最初是为单核,低端性能设备设计的,而且存储和内存占用的优先级要高于性能表现。在过去的几年里,谷歌给 Dalvik 扩充了越来越多的更新,比如 JIT 支持,并发垃圾回收,以及多进程支持。但是随着多核手机的出现,它们比 T-Mobile G1 快上很多倍,而这些功能升级扩充只能帮安卓到这里了。 +安卓里没有多少组件的血统能追溯到 1.0 时代,但在 2014 年, Dalvik 这个驱动安卓应用的运行时是它们中的一员。Dalvik 最初是为单核、低端性能设备设计的,而且存储和内存占用的优先级要高于性能表现。在过去的几年里,谷歌给 Dalvik 扩充了越来越多的更新,比如 JIT 支持、并发垃圾回收,以及多进程支持。但是随着多核手机的出现,它们比 T-Mobile G1 快上很多倍,而这些功能升级扩充只能帮安卓到这里了。 解决方案就是用 ART 这个安卓运行时替换 Dalvik,这是一个完全为现代智能手机硬件重写的应用引擎。ART 更强调性能表现和用户界面流畅度。ART 带来了一个从 JIT(Just-in-time,即时)编译到 AOT(Ahead-of-time,提前)编译的转变。JIT 会在每次应用运行的时候即时编译,节省存储空间,因为编译后的代码从不写入存储,但它消耗更多的 CPU 和内存资源。AOT 会将编译后的代码保存到存储,让应用启动的时候更快并减少内存使用。ART 会在设备上将编译代码作为安装的一部分进行,而不分发预编译的代码,这样编译器可以进行一些针对特定设备的优化。ART 还带来了 64 位支持,扩大了内存寻址范围,由 64 位指令集带来更佳的性能表现(特别是在媒体和加密应用上)。 @@ -14,74 +12,52 @@ #### 一个系统层级的界面刷新 -* [ - ![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/systemui150-1-150x150.jpg) - ][1] -* [ - ![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/lock-1-150x150.jpg) - ][2] -* [ - ![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/recent-apps-150x150.jpg) - ][3] -* [ - ![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/recent2-150x150.jpg) - ][4] -* [ - ![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/notification-1-150x150.jpg) - ][5] -* [ - ![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/headsup-1-150x150.jpg) - ][6] -* [ - ![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/panels-150x150.jpg) - ][7] -* [ - ![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/noticontrols-150x150.jpg) - ][8] +![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/systemui150-1-150x150.jpg) Material Design 带来了一个几乎对安卓所有界面的完全翻新。首先,整个核心系统界面改变了。安卓得到了一个全新的按钮集合,看起来有点像是 PlayStation 的手柄:三角形,圆形以及正方形按钮,分别代表后退,主屏幕,和最近应用。得益于全新的图标集,状态栏也是焕然一新。 +![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/lock-1-150x150.jpg) + 最近应用获得了大翻新。从一个小略缩图纵向列表变成了一个巨大的,几乎全屏的略缩图串联列表。它还获得了一个新名字(也没那么守旧),“概览(Overview)”。这明显是受到了前面版本的 Chrome 标签页切换器效果的启发。 +![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/recent-apps-150x150.jpg) + 顺带一说,在这个安卓版本里 Chrome 的标签页切换器效果消失了。作为一种将 Web 应用与本地应用同等对待的尝试,Chrome 标签合并到了概览列表。是的:最近“应用”列表现在显示的是最近打开的应用,加上最近打开的网站。在棒棒糖中,最近应用列表还采取了一种“以文档为中心”的方法,意味着应用可以在最近应用列表中显示多个项目。比如你在 Google Docs 中打开了两个文档,它们都会显示在最近应用中,让你可以在它们之间轻松切换,而不用到应用的文件列表去来回切换。 +![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/recent2-150x150.jpg) + 通知面板是全新的。谷歌给通知面板带来了“卡片”主题,将每个项目归整到它自己的矩形中。单个通知条目从黑色背景变成了白色背景,有了更佳的排版和圆形图标。这些新通知来到了锁屏上,将它从一个最没用的中间屏变成了很有用的屏幕,用于展示“这里是你不在的时候发生的事情”。 -全屏的通知,比如来电以及闹钟,都被抛弃了,取而代之的是在屏幕顶部弹出一个“抬头”通知。抬头通知也对“高优先级”应用可用,最初这是为即时消息设计的。但是否是高优先级的通知这取决于开发者的决定,在开发者意识到这可以让他们的通知更显眼之后,所有人都开始使用它。之后版本的安卓通过给用户提供“高优先级”的设置解决了这个问题。 +![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/notification-1-150x150.jpg) + +全屏的通知,比如来电以及闹钟,都被抛弃了,取而代之的是在屏幕顶部弹出一个“抬头(HUD)”通知。抬头通知也对“高优先级”应用可用,最初这是为即时消息设计的。但是否是高优先级的通知这取决于开发者的决定,在开发者意识到这可以让他们的通知更显眼之后,所有人都开始使用它。之后版本的安卓通过给用户提供“高优先级”的设置解决了这个问题。 + +![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/headsup-1-150x150.jpg) 谷歌还给棒棒糖添加了一个单独的,但很相似的“优先”通知系统。“优先”通知是一个介于完全静音和“提醒一切消息”之间的模式,允许用户将特定的联系人和应用标记为重要。优先模式只会为这些重要的人发出提醒。在界面上来看,它采用了音量控制附加通知优先级控制以及设置中心添加一项优先通知新设置的形式。当你处在优先模式的时候,状态栏会有一颗星形标识。 +![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/panels-150x150.jpg) + 快速设置获得了一系列的大改善。控制项现在是一块在通知_上面_的面板,所以它可以通过“两次下拉”手势来打开它。第一次下拉会打开通知面板,第二次下拉手势会缩小通知面板并打开快速设置。快速设置的布局变了,抛弃了平铺排列,转为一个单独面板上的一系列浮动按钮。顶部是十分方便的亮度调节条,之后是连接,自动旋转,手电筒,GPS,以及 Chromecast 的按钮。 +![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/noticontrols-150x150.jpg) + 快速设置现在还有了实际的内嵌面板。它可以在主界面显示无线网络接入点,蓝牙设备,以及移动数据使用量。 - -* [ - ![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/4-150x150.jpg) - ][9] -* [ - ![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/gmail2-150x150.jpg) - ][10] -* [ - ![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/fit-150x150.jpg) - ][11] -* [ - ![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/messages-1-150x150.jpg) - ][12] -* [ - ![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/googl1-150x150.jpg) - ][13] -* [ - ![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/2-150x150.jpg) - ][14] -* [ - ![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/reminers-150x150.png) - ][15] +![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/4-150x150.jpg) Material Design 革新给了几乎每个应用一个新图标,并带来了一个更明亮,白色背景的应用抽屉。默认应用阵容也有了很大的变化。和这些新应用问声好吧:通讯录,谷歌文档,Fit,信息,照片,Play 报亭,以及谷歌幻灯片。和这些死去的应用说再见吧:相册,G+ 照片,People,Play 杂志,电子邮件,以及 Quickoffice。 +![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/gmail2-150x150.jpg) + 这些新应用中很多来自 Google Drive,从一个单独的大应用分割成每个产品一个应用。现在我们有了云端硬盘,文档,表格,以及幻灯片,都来自于云端硬盘团队。云端硬盘同时也要对 Quickoffice 的死亡负责,云端硬盘团队令它元气大伤。在“谷歌从来没法做好决定”分类下:通讯录从“People”改回了“Contacts”,短信应用在运营商的要求下叫回了“Messenger”。(那些运营商_不_喜欢谷歌环聊插手短信的职能。)我们有项真正的新服务:谷歌健身,一个健康追踪应用,可以在安卓手机和安卓手表上工作。Play 杂志也有了新的设计,添加了网站内容,所以它改名叫“Play 报亭”。 +![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/fit-150x150.jpg) +![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/messages-1-150x150.jpg) +![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/googl1-150x150.jpg) +![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/2-150x150.jpg) +![](https://cdn.arstechnica.net/wp-content/uploads/2016/10/reminers-150x150.png) + 还有更多的谷歌专有应用接管 AOSP 的例子。 * “G+ 照片”变成了“谷歌照片”,并取代了 AOSP 的相册成为默认照片应用,而相册也就随之消亡了。改名成“谷歌照片”是为照片应用[退出 Google+][16]并成为独立服务做准备。谷歌照片的发布在棒棒糖发布之后六个月——暂时应用只像是 Google+ 应用换了个图标和界面设计。 @@ -94,7 +70,7 @@ via: http://arstechnica.com/gadgets/2016/10/building-android-a-40000-word-histor 作者:[RON AMADEO][a] 译者:[alim0x](https://github.com/alim0x) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From b1230092ad76ee0636d731c1898238df8d0777b2 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 10 Jul 2017 00:26:41 +0800 Subject: [PATCH 067/100] PRF&PUB:20170215 Using Scripting Languages in IoT Challenges and Approaches.md @xiaow6 --- ...guages in IoT Challenges and Approaches.md | 66 +++++++++++++++++ ...guages in IoT Challenges and Approaches.md | 70 ------------------- 2 files changed, 66 insertions(+), 70 deletions(-) create mode 100644 published/20170215 Using Scripting Languages in IoT Challenges and Approaches.md delete mode 100644 translated/tech/20170215 Using Scripting Languages in IoT Challenges and Approaches.md diff --git a/published/20170215 Using Scripting Languages in IoT Challenges and Approaches.md b/published/20170215 Using Scripting Languages in IoT Challenges and Approaches.md new file mode 100644 index 0000000000..f1852837e0 --- /dev/null +++ b/published/20170215 Using Scripting Languages in IoT Challenges and Approaches.md @@ -0,0 +1,66 @@ +在物联网中使用脚本语言面临的挑战与对策 +============================================================ + + +![Scripting IoT](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/scripting-languages-iot.jpg?itok=d6uog0Ss "Scripting IoT") + +> 在即将到来的嵌入式 Linux 会议 + OpenIoT 峰会中,Paul Sokolovsky 将会讨论在嵌入式开发中使用脚本语言的一些挑战。 + +脚本语言(又称作超高级语言Very High-Level Languages或 VHLLs ),例如 Python、 PHP 以及 JavaScript 常用在桌面、服务器和网页开发中。它们强大的内置功能能够让你花费少量的时间和精力来开发小型却有用的应用,Paul Sokolovsky,Linaro 公司物联网工程师如是说。然而,目前在物联网中使用超高级语言深度开发嵌入式应用相对来说有些别扭。 + +在即将到来的[嵌入式 Linux 会议][6] + [OpenIoT 峰会][7]中,Sokolovsky 会讨论在嵌入式开发中使用 VHLLs 的挑战并且基于 MicroPython 的例子与 JerryScript + Zephyr.js 项目比较不同的对策。 我们与Sokolovsky 进行了一番交谈来获得更多信息。 + +**Linux.com:您可以给我们的读者一些 VHLLs 的背景知识吗?** + +Paul Sokolovsky: 超高级语言成为计算机科学和信息技术风景中的一部分已经几十年了。也许第一个流行的脚本语言是 Unix shell(sh),尽管由于较小的特征集,它很少被认为是一种超高级语言,而是一种特定领域语言。所以第一个真正破纪录的 VHLLs 是 Perl(1987)和 Tcl(1988),很快紧跟着出现了 Python(1991),Ruby(1995),PHP(1995),JavaScript(1995)以及许多其它语言。 + +不同 VHLLs 之间的区别特性包括:它们的解析本能(从使用者的角度来看,也许是因为其中复杂的编译器作祟),内置可用的强大的数据类型如任意大小的列表和映射,可观的标准库,以及允许用户访问甚至更大的第三方库的外部模块系统。所有的这些特性都与相对容易使用的感觉(更少的输入,不需要构建等)和简单的学习曲线相耦合。 + +**Linux.com: 使用这些语言做开发有哪些优势?** + +Sokolovsky: 优势的根源来自于以上描述的这些特性。一个新手可以非常轻松的开始使用脚本语言并且快速的学习它。很多 VHLLs 提供了一个强大的交互模式,所以你不需要去读那些厚厚的使用手册来开始使用脚本语言,而是直接去探索和体验它们。强大的内置功能允许你去开发小而有用的应用(脚本),而仅仅使用很少的时间和精力(这就是“脚本语言”名字的来源)。如果要转向开发大型应用,广泛的第三方库和可以轻而易举使用的模块系统使得开发变得流畅和高产。 + +**Linux.com: 在嵌入式平台上使用脚本开发和在其他平台开发有什么区别?** + +Sokolovsky: 鉴于之前我们讨论过的 VHLLs 振奋人心的能力,有一个创意——为什么我们不能享受使用 VHLLs 为嵌入式设备做开发而具有所有(或者至少一部分)优势呢?这里我提到的“嵌入式设备”不仅仅是拥有 8-32 MB RAM 的小型 Linux 系统,还有运行在微控制器(MCU)上有几千字节内存的深度嵌入式系统。少量(有些时候几乎没有)的相关资源肯定使这个创意的实现变得更加复杂。 另一个问题是设备访问和交互。嵌入式设备通常没有显示屏和键盘,但是幸运的是解决这个问题的答案已经存在几十年了,这里要感谢 Unix,它提供了使用串口(UART)来搭建一个终端连接的方法。当然,在主机端,有些用户喜欢使用图形集成开发环境(IDE)来隐藏串口通信细节。 + +所以,由于嵌入式设备所有的这些不同特性,这个创意就是提供一个尽可能熟悉的工作环境。但熟悉只是其中一方面,另一方面,为了适应甚至最小的设备,工作环境需要尽可能的缩小。要想解决这些矛盾需要嵌入式 VHLLs 的操作可以高度配置,来适应不同的项目和硬件的需求。 + +**Linux.com:只有在物联网中使用这些语言才会遇到的挑战有哪些?比如说你如何处理内存限制?** + +Sokolovsky: 当然,解释程序本身几乎不怎么消耗硬件资源。但是在当今世界,最珍贵的资源是人类的时间。不管你是一个研发工程师、一个仅仅有几个小时的周末创客、一个被 bug 和安全问题淹没的支持工程师,或者一个计划开发新产品的产品经理——你手头上大概都没有什么多余时间。因此需要将 VHLLs 的生产力提供到嵌入式工程师手上。 + +当前的工艺水平使得这些需求变得可行。公正的来讲,甚至于微处理器单元(MCU)平均 都有 16-32 KB RAM , 128-256 KB ROM。这仅仅足够搭载一个核心解释程序,一个标准库类型的规范子集,一些硬件驱动,以及一个很小但是依旧有用的应用程序。假如你的硬件配置稍微越过了中间线,其能力得到了快速的增长——这实际上是由于一个从 1970 年代就闻名的技巧:使用自定义的字节码和精码(pcode)相比原始机器代码能够让你获得更大的代码/特性密度。 + +在这条道路上有很多挑战,RAM 不够用是主要的一个。我是在一个 16 GB RAM 的笔记本上写下的这些话(但不断切换的话依然会很卡),而刚才提到的 16KB 比它小一百万倍!不过,通过小心的选择算法和编程技巧,在这样小的 RAM 下仍有可能通过脚本语言来执行简单程序,而相当复杂的程序可能需要 128-256K。 + +有很多的技术挑战需要解决(它们已经被成功的解决了),这里没有足够的篇幅来涵盖它们。不过,我在 OpenIoT 峰会上的演讲会涵盖使用两种嵌入式脚本语言的经验和成就:MicroPython(Python3 的子集)和 Zephyr.js(JavaScript/Node.js 的子集),都运行在 Linux 基金会的 Zephyr 实时操作系统上,它被寄希望于在 IoT 工业界取得和 Linux 在移动互联网和服务器方面一样的成就。(相关 PPT 会为无法参加 OpenIoT 会议的朋友在会议后放出。) + +**Linux.com: 你能给我们一些 VHLLs 最适用的应用的例子吗?以及一些它们不适用的例子?** + +Sokolovsky:以上是很多关于 VHLLs 的光明前景,公正的来说:在嵌入式开发中,这里有很多一厢情愿的幻想(或者说希望其是能够自我实现的预言)。在嵌入式开发中 VHLLs 现在可以提供的是:快速成型,以及教育/创客市场上所必须的易学性和易用性。有一些先行者在其它领域使用 VHLLs,但是就目前来看,它需要在基础构造和工具开发上投入更多。重要的是,这样的投入应遵循开源原则并分享,否则会逐渐损害到 VHLLs 能够节省使用者时间和精力的优势。 + +谨记这些,嵌入式 VHLLs 是发育完全(“逐渐变的完整”)的语言,能够适应各种类型的应用,但是要受制于硬件。例如,假如一个微处理器的规格低于之前提到的阈值,如一个老旧的 8-bit 微处理器,那么只有同样古老而优秀的 C 语言能够为你所用。另外一个限制是当你真的想要充分利用硬件时—— C 语言或者汇编程序才是正确的选择。但是,这里有一个惊喜——嵌入式 VHLLs 的开发者也想到了这一点,例如 MicroPython 允许你将 Python 和汇编程序在同一个应用中结合起来。 + +嵌入式 VHLLs 的优势是其可配置性和可(重复)编程性,外加灵活的连接性支持。这恰恰是 IoT 和智能设备最需要的,很多 IoT 应用使用起来也不需要太复杂。考虑一下,例如,一个可以贴在任何地方用来完成各种任务的智能按钮。但是,如果你需要调整双击的时间时怎么办?使用脚本语言,你可以做到。也许你完全不会考虑三连击,但是现在在某些情况下四连击都可能是有用的。使用脚本语言,你可以轻易修改它。 + +(题图:来自 Pixabay,基于 CC0 协议) + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/event/elcna/2017/2/using-scripting-languages-iot-challenges-and-approaches + +作者:[AMBER ANKERHOLZ][a] +译者:[xiaow6](https://github.com/xiaow6) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.linux.com/users/aankerholz +[1]:https://www.linux.com/licenses/category/used-permission +[2]:https://www.linux.com/licenses/category/creative-commons-zero +[3]:https://www.linux.com/files/images/paul-sokolovsky-2014-09-21jpg +[4]:https://www.linux.com/files/images/scripting-languages-iotjpg +[5]:http://events.linuxfoundation.org/events/embedded-linux-conference/program/schedule?utm_source=linux&utm_campaign=elc17&utm_medium=blog&utm_content=video-blog +[6]:http://events.linuxfoundation.org/events/embedded-linux-conference +[7]:https://events.linuxfoundation.org/events/openiot-summit/program/schedule diff --git a/translated/tech/20170215 Using Scripting Languages in IoT Challenges and Approaches.md b/translated/tech/20170215 Using Scripting Languages in IoT Challenges and Approaches.md deleted file mode 100644 index e55ffd9cb3..0000000000 --- a/translated/tech/20170215 Using Scripting Languages in IoT Challenges and Approaches.md +++ /dev/null @@ -1,70 +0,0 @@ - -在物联网中使用脚本语言的挑战与途径 -============================================================ - - - ![Scripting IoT](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/scripting-languages-iot.jpg?itok=d6uog0Ss "Scripting IoT") - -在即将到来的嵌入式 Linux 会议 + OpenIoT 峰会中,Paul Sokolovsky 将会讨论在嵌入式开发中使用脚本语言的一些挑战。来自Pixabay,基于CC0协议。 - -脚本语言(又称作超高级语言或 VHLLs ),例如 Python, PHP, 以及 JavaScript 都常常在桌面、服务器和网页开发中被使用。而且,它们强大的内置功能能够让你花费少量的时间和精力来开发小型却有用的应用,Paul Sokolovsky,Linaro 公司物联网工程师如是说。然而,目前在物联网中使用超高级语言深度开发嵌入式应用相对来说有些别扭。 - - ![Paul Sokolovsky](https://www.linux.com/sites/lcom/files/styles/floated_images/public/paul-sokolovsky-2014-09-21.jpg?itok=nUlGjxf3 "Paul Sokolovsky") -Paul Sokolovsky,Linaro 公司物联网工程师。[图片已获授权][1] - -在即将到来的[嵌入式 Linux 会议][6] + [OpenIoT 峰会][7]中,Sokolovsky 会讨论在嵌入式开发中使用 VHLLs 的挑战并且比较不同的实现途径,基于 MicroPython 的例子与 JerryScript + Zephyr.js 项目。 我们与Sokolovsky进行了一番交谈来获得更多信息。 - -**Linux.com:您可以给我们的读者一些 VHLLs 的背景知识吗?** - -Paul Sokolovsky: 超高级语言成为计算机科学和信息技术风景中的一部分已经几十年了。也许第一个流行的脚本语言是 Unix shell(sh),尽管由于较小的特征集,它很少被认为是一种超高级语言,而是一种特定领域语言。所以第一个真正破纪录的 VHLLs 是 Perl(1987)和 Tcl(1988),很快紧跟着出现了 Python(1991),Ruby(1995),PHP(1995),JavaScript(1995)以及许多其它语言。 - -不同 VHLLs 之间的区别特性包括:它们的解析本能(从使用者的角度来看,也许是因为其中复杂的编译器作祟),内置可用的强大的数据类型如任意大小的列表和映射,大小合适的标准库,以及允许用户访问甚至更大的第三方库的外部的模块系统。所有的这些特性都与相对容易使用的感觉(更少的打字,没有构建时间等)和简单的学习曲线相耦合。 - -**Linux.com: 使用这些语言做开发有哪些优势?** - -Sokolovsky: 优势的根源来自于以上描述的这些特性。一个新手可以非常轻松的开始使用脚本语言并且快速的学习它。很多 VHLLs 提供了一个强大的交互模式,所以你不需要去读那些厚厚的使用手册来开始使用脚本语言,而是直接去探索和体验它们。强大的内置功能允许你去开发小而有用的应用——脚本——仅仅使用很少的时间和精力(这就是“脚本语言”名字的来源)。如果要转向开发大型应用,广泛的第三方库和轻而易举被使用的模块系统使得开发变得流畅和高产。 - -**Linux.com: 在嵌入式平台上使用脚本开发和在其他平台开发有什么区别?** - -Sokolovsky: 鉴于之前我们讨论过的 VHLLs 振奋人心的能力,有一个创意——为什么我们不能享受使用 VHLLs 为嵌入式设备做开发具有的所有(或者至少一部分)优势呢?这里我提到的“嵌入式设备”不仅仅是拥有 8-32 MB RAM 的小型 Linux 系统,还有运行在微控制器(MCUs)上有几千字节内存的深度嵌入式系统。少量(有些时候几乎没有)的相关资源肯定使这个创意的实现变得更加复杂。 另一个问题是设备访问和交互。嵌入式设备通常没有显示屏和键盘,但是幸运的是解决这个问题的答案已经存在几十年了,这里要感谢Unix,提供了使用串口(UART)来搭建一个终端连接的方法。当然,在主机端,有些用户喜欢使用图形集成开发环境(IDE)来隐藏串口通信细节。 - -所以,由于嵌入式设备所有的这些不同特性,这个创意就是提供一个尽可能熟悉的工作环境。但熟悉只是其中一方面,另一方面,为了适应甚至最小的设备,工作环境需要尽可能的缩小。要想解决这些冲突需要嵌入式 VHLLs 的操作能够被高度配置,来适应不同的项目和硬件的需求。 - -**Linux.com:只有在物联网中使用这些语言才会遇到的挑战有哪些?比如说你如何处理内存限制?** - -Sokolovsky: 当然,解释程序本身几乎不怎么消耗硬件资源。但是在当今世界,最珍贵的资源是人类的时间。不管你是一个研发工程师,一个仅仅有几个小时周末的制造者,一个让 bug 和安全问题淹没的支持工程师,或者一个计划开发新产品的产品经理——你手头上大概都没有什么多余时间。因此需要将 VHLLs 的生产力提供到嵌入式工程师手上。 - -当前的工艺水平使得这些需求变得可行。公正的来讲,甚至于微处理器单元(MCUs)平均 RAM 都有 16-32 KB,ROM 128-256 KB。这仅仅足够搭载一个核心解释程序,一个标准库类型的规范子集,一些硬件驱动,以及一个很小——但是依旧有用——的应用程序。假如你的硬件配置稍微越过了中间线,其容量得以快速的增长——这实际上是由于一个从 1970 年代就闻名的技巧:使用自定义的字节码和精码相比原始机器代码能够让你获得更大的代码/特性密度。 - -在这条道路上有很多挑战,RAM 不够用是主要的一个。我是在一个 16 GB RAM 的笔记本上写下的这些话(但不断切换的话依然会很卡),而刚才提到的 16KB 比它小一百万倍!不过,通过小心的选择算法和编程技巧,在这样小的 RAM 下仍有可能通过脚本语言来执行简单程序,而相当复杂的程序可能需要128-256K。 - -有很多的技术挑战需要讲解(它们已经被成功的讲解了),这里没有足够的篇幅来涵盖它们。不过,我在 OpenIoT 峰会上的演讲会涵盖使用两种嵌入式脚本语言的经验和成就:MicroPython(Python3 的子集)和 Zephyr.js(JavaScript/Node.js 的子集),都运行在 Linux 基金会的 Zephyr 实时操作系统上,它被寄希望于为 IoT 工业界做出 Linux 为手机和服务器工业做出的贡献。(相关 PPT 会为无法参加 OpenIoT 会议的朋友在会议后放出。) - -**Linux.com: 你能给我们一些 VHLLs 最适用的应用的例子吗?以及一些它们不适用的例子?** - -Sokolovsky:以上是很多关于 VHLLs 的光明前景,公正的来说:在嵌入式开发中,这里有很多一厢情愿的幻想(或者说希望其是能够自我实现的预言)。在嵌入式开发中 VHLLs 现在可以提供的是:快速成型,以及教育/制造市场所必须的易学性和易用性。有一些先行者在其它领域使用 VHLLs,但是就目前来看,它需要在基础构造和工具开发上投入更多。这样的投入在开源和公开分享原则下被指引是非常重要的,否则会逐渐损害到 VHLLs 能够节省使用者时间和精力的优势。 - -谨记这些,嵌入式 VHLLs 是发育完全(“逐渐变的完整”)的语言,能够适应各种类型的应用,但是要屈服于硬件限制。例如,假如一个微处理器的规格低于之前提到的阈值,如一个老旧的 8-bit 微处理器,那么只有同样古老而优秀的 C 语言能够为你所用。另外一个限制是当你真的想要充分利用硬件时—— C 语言或者汇编程序才是正确的选择。但是,这里有一个惊喜——嵌入式 VHLLs 的开发者也想到了这一点,例如 MicroPython 允许你将 Python 和汇编程序在同一个应用中结合起来。 - -嵌入式 VHLLs 突出的的是其可配置性和可(重复)编程性,外加灵活的连接性支持。这恰恰是 IoT 和智能设备最需要的,很多 IoT 应用使用起来也不需要太复杂。考虑一下,例如,一个可以贴在任何地方用来完成任何任务的智能按钮。但是,如果你需要调整双击的时间时怎么办?使用脚本语言,你可以做到。也许你完全不会考虑三连击,但是现在在某些情况下四连击都可能是有用的。使用脚本语言,你可以轻易修改它。 - -_嵌入式 Linux 会议 + OpenIoT 北美峰会于 2017 年 2 月 21 - 23 号在美国俄勒冈州波特兰市举办。请[查阅][5]关于 Linux 内核、嵌入式开发和嵌入式系统,以及开放物联网最新事物相关的130个相关会议。_ - --------------------------------------------------------------------------------- - -via: https://www.linux.com/news/event/elcna/2017/2/using-scripting-languages-iot-challenges-and-approaches - -作者:[AMBER ANKERHOLZ][a] -译者:[xiaow6](https://github.com/xiaow6) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.linux.com/users/aankerholz -[1]:https://www.linux.com/licenses/category/used-permission -[2]:https://www.linux.com/licenses/category/creative-commons-zero -[3]:https://www.linux.com/files/images/paul-sokolovsky-2014-09-21jpg -[4]:https://www.linux.com/files/images/scripting-languages-iotjpg -[5]:http://events.linuxfoundation.org/events/embedded-linux-conference/program/schedule?utm_source=linux&utm_campaign=elc17&utm_medium=blog&utm_content=video-blog -[6]:http://events.linuxfoundation.org/events/embedded-linux-conference -[7]:https://events.linuxfoundation.org/events/openiot-summit/program/schedule From 2412692fb0893e881ba4b7a50bf11f8ff54361ba Mon Sep 17 00:00:00 2001 From: stevenzdg988 Date: Mon, 10 Jul 2017 10:44:20 +0800 Subject: [PATCH 068/100] stevenzdg988 translating --- sources/tech/20170529 Ubuntu GamePack.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170529 Ubuntu GamePack.md b/sources/tech/20170529 Ubuntu GamePack.md index 3dbbd3ef17..0d515d3b3f 100644 --- a/sources/tech/20170529 Ubuntu GamePack.md +++ b/sources/tech/20170529 Ubuntu GamePack.md @@ -1,3 +1,5 @@ +"stevenzdg988 translating" + Ubuntu GamePack =============== From ba1365b589a4b919db0e594f1e6929b5dff74153 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 10 Jul 2017 13:13:12 +0800 Subject: [PATCH 069/100] translating --- ... Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 .md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170620 How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 .md b/sources/tech/20170620 How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 .md index 68867a87cd..136dd2c66f 100644 --- a/sources/tech/20170620 How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 .md +++ b/sources/tech/20170620 How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 .md @@ -1,3 +1,5 @@ +translating----geekpi + How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 [ 19/June/2017 ] ============================================================ From 6a17ac6d29f952ab88582d3719afc40abbf2d1f2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 10 Jul 2017 15:04:16 +0800 Subject: [PATCH 070/100] translated --- ...k Clash Vulnerability CVE-2017-1000364 .md | 66 +++++++++---------- 1 file changed, 32 insertions(+), 34 deletions(-) rename {sources => translated}/tech/20170620 How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 .md (73%) diff --git a/sources/tech/20170620 How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 .md b/translated/tech/20170620 How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 .md similarity index 73% rename from sources/tech/20170620 How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 .md rename to translated/tech/20170620 How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 .md index 136dd2c66f..61ee08ca50 100644 --- a/sources/tech/20170620 How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 .md +++ b/translated/tech/20170620 How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 .md @@ -1,24 +1,22 @@ -translating----geekpi - -How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 [ 19/June/2017 ] +如何修补和保护 Linux 内核堆栈冲突漏洞 CVE-2017-1000364 [ 2017.6.19 ] ============================================================ - [![](https://www.cyberciti.biz/media/new/category/old/linux-logo.png)][12] Avery serious security problem has been found in the Linux kernel called “The Stack Clash.” It can be exploited by attackers to corrupt memory and execute arbitrary code. An attacker could leverage this with another vulnerability to execute arbitrary code and gain administrative/root account privileges. How do I fix this problem on Linux? + [![](https://www.cyberciti.biz/media/new/category/old/linux-logo.png)][12] 在 Linux 内核中发现了一个名为 “Stack Clash” 的严重安全问题,攻击者可能会利用它来破坏内存并执行任意代码。攻击者可以利用另一个漏洞来执行任意代码并获得管理/root 帐户权限。在 Linux 中该如何解决这个问题? [![the-stack-clash-on-linux-openbsd-netbsd-freebsd-solaris](https://www.cyberciti.biz/media/new/faq/2017/06/the-stack-clash-on-linux-openbsd-netbsd-freebsd-solaris.jpeg)][22] -The Qualys Research Labs discovered various problems in the dynamic linker of the GNU C Library (CVE-2017-1000366) which allow local privilege escalation by clashing the stack including Linux kernel. This bug affects Linux, OpenBSD, NetBSD, FreeBSD and Solaris, on i386 and amd64\. It can be exploited by attackers to corrupt memory and execute arbitrary code. +Qualys 研究实验室在 GNU C Library(CVE-2017-1000366)的动态链接器中发现了许多问题,它们通过与 Linux 内核的堆栈冲突来允许本地特权升级。这个 bug 在 i386 和 amd64 上影响 Linux、OpenBSD、NetBSD、FreeBSD 和 Solaris。攻击者可以利用它来破坏内存并执行任意代码。 -### What is CVE-2017-1000364 bug? +### 什么是 CVE-2017-1000364 bug? -[From RHN][13]: +[来自 RHN][13]: -> A flaw was found in the way memory was being allocated on the stack for user space binaries. If heap (or different memory region) and stack memory regions were adjacent to each other, an attacker could use this flaw to jump over the stack guard gap, cause controlled memory corruption on process stack or the adjacent memory region, and thus increase their privileges on the system. This is a kernel-side mitigation which increases the stack guard gap size from one page to 1 MiB to make successful exploitation of this issue more difficult. +> 在用户空间二进制文件的堆栈中分配内存的方式发现了一个缺陷。如果堆(或不同的内存区域)和堆栈内存区域彼此相邻,则攻击者可以使用此缺陷跳过堆栈保护区域,从而导致进程堆栈或相邻内存区域受到控制的内存损坏,从而增加其系统权限。有一个在内核中减轻这个漏洞的方法,将堆栈保护区域大小从一页增加到 1 MiB,从而使成功利用这个功能变得困难。 [As per the original research post][14]: -> Each program running on a computer uses a special memory region called the stack. This memory region is special because it grows automatically when the program needs more stack memory. But if it grows too much and gets too close to another memory region, the program may confuse the stack with the other memory region. An attacker can exploit this confusion to overwrite the stack with the other memory region, or the other way around. +> 计算机上运行的每个程序都使用一个称为堆栈的特殊内存区域。这个内存区域是特别的,因为当程序需要更多的堆栈内存时,它会自动增长。但是,如果它增长太多,并且与另一个内存区域太接近,程序可能会将堆栈与其他内存区域混淆。攻击者可以利用这种混乱来覆盖其他内存区域的堆栈,或者反过来。 -### A list of affected Linux distros +### 收到影响的 Linux 发行版 1. Red Hat Enterprise Linux Server 5.x @@ -78,26 +76,26 @@ The Qualys Research Labs discovered various problems in the dynamic linker of th 29. SUSE Linux Enterprise Server for Raspberry Pi 12 SP2 -### Do I need to reboot my box? +### 我需要重启我的电脑么? -Yes, as most services depends upon the dynamic linker of the GNU C Library and kernel itself needs to be reloaded in memory. +是的,由于大多数服务依赖于 GNU C Library 的动态连接器,并且内核自身需要在内存中重新加载。 -### How do I fix CVE-2017-1000364 on Linux? +### 我该如何在 Linux 中修复 CVE-2017-1000364? -Type the commands as per your Linux distro. You need to reboot the box. Before you apply patch, note down your current kernel version: +根据你的 Linux 发行版输入命令。你需要重启电脑。在应用补丁之前,记下你当前内核的版本: `$ uname -a $ uname -mrs` -Sample outputs: +示例输出: ``` Linux 4.4.0-78-generic x86_64 ``` -### Debian or Ubuntu Linux +### Debian 或者 Ubuntu Linux -Type the following [apt command][15]/[apt-get command][16] to apply updates: +输入下面的[ apt 命令][15]/[apt-get 命令][16]来应用更新: `$ sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade` -Sample outputs: +示例输出: ``` Reading package lists... Done @@ -184,24 +182,24 @@ Setting up linux-headers-4.9.0-3-amd64 (4.9.30-2+deb9u1) ... Processing triggers for libc-bin (2.24-11+deb9u1) ... ``` -Reboot your server/desktop using [reboot command][17]: +使用[ reboot 命令][17]重启桌面/服务器: `$ sudo reboot` ### Oracle/RHEL/CentOS/Scientific Linux -Type the following [yum command][18]: +输入下面的[ yum 命令][18]: `$ sudo yum update $ sudo reboot` ### Fedora Linux -Type the following dnf command: +输入下面的 dnf 命令: `$ sudo dnf update $ sudo reboot` -### Suse Enterprise Linux or Opensuse Linux +### Suse Enterprise Linux 或者 Opensuse Linux -Type the following zypper command: +输入下面的 zypper 命令: `$ sudo zypper patch $ sudo reboot` @@ -225,43 +223,43 @@ $ sudo reboot` `$ sudo zypper in -t patch SUSE-SLE-Module-Public-Cloud-12-2017-996=1 $ sudo reboot` -### Verification +### 验证 -You need to make sure your version number changed after issuing [reboot command][19] +你需要确认你的版本号在 [reboot 命令][19]之后改变了。 `$ uname -a $ uname -r $ uname -mrs` -Sample outputs: +示例输出: ``` Linux 4.4.0-81-generic x86_64 ``` -### A note about OpenBSD users +### 给 OpenBSD 用户的注意事项 -See [this page][20] for more info. +见[此页][20]获取更多信息。 -### A note about Oracle Solaris +### 给 Oracle Solaris 的注意事项 -[See this page][21] for more info. +[见此页][20]获取更多信息。 -### References: +### 参考 -* [The Stack Clash][4] +* [堆栈冲突][4] -------------------------------------------------------------------------------- 作者简介: Vivek Gite -The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on [Twitter][1], [Facebook][2], [Google+][3]. +作者是 nixCraft 的创始人,对于 Linux 操作系统/Unix shell脚本有经验丰富的系统管理员和培训师。他曾与全球客户及各行各业,包括IT、教育、国防和空间研究以及非营利部门合作。在 [Twitter][1]、[Facebook] [2]、[Google +] [3] 上关注他。 -------------------------------------------------------------------------------- via: https://www.cyberciti.biz/faq/howto-patch-linux-kernel-stack-clash-vulnerability-cve-2017-1000364/ 作者:[Vivek Gite ][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From e99708443795a3059dc0a3f6cfba6cf9adc6c91a Mon Sep 17 00:00:00 2001 From: datastruct Date: Mon, 10 Jul 2017 15:21:18 +0800 Subject: [PATCH 071/100] Update 20170529 Ubuntu GamePack.md --- sources/tech/20170529 Ubuntu GamePack.md | 30 +++++++++++++----------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/sources/tech/20170529 Ubuntu GamePack.md b/sources/tech/20170529 Ubuntu GamePack.md index 0d515d3b3f..72ab18b83b 100644 --- a/sources/tech/20170529 Ubuntu GamePack.md +++ b/sources/tech/20170529 Ubuntu GamePack.md @@ -6,26 +6,28 @@ Ubuntu GamePack A lot of people who like to use their Linux system for gaming. There seems to be no shortage of gaming systems which can supply access to games. UALinux is a Ukrainian company which promotes the use of GNU/Linux. UALinux has created a Ubuntu version to fill the gap for gaming. The Operating System (OS) is called Ubuntu GamePack and is based off of Ubuntu 16.04. +很大一部分 Linux爱好者喜欢用他们的系统玩游戏。现在看起来能够可以支持游戏的游戏系统很短缺。UALinux是一家推广使用GNU/Linux的乌克兰公司。UALinux开发了一个Ubuntu版本填补了这一空白。这个操作系统(OS)命名为Ubuntu GamePack 基于Ubuntu 16.04. + **Contents** - +** 内容 ** The list of games would be quite extensive but the company claims there is access to over 22,381 games. - +游戏现在已经相当广泛,但是游戏公司已经宣称可以访问超过22,381款游戏。 The GamePack includes Lutris and Steam to allow you access to the specific gaming services the distributer provides. - +GamePack 包括 Lutris 和 Steam两部分,允许您访问分发商提供的定制游戏服务。 For Windows-based games there is PlayOnLinux, WINE and CrossOver so the games will run on Linux. - +对于基于Windows的游戏,有PlayOnLinux,WINE和CrossOver转换到Linux上运行。 For DOS games you can run the games in DosBox which is a DOS emulator for Linux. - +对于DOS游戏,您可以在DosBox中运行游戏,这是一个Linux的DOS模拟器 Sparky APTus Gamer is also installed to allow access to numerous gaming console emulators. The emulators include: - -* AdvanceMENU – front-end for AdvanceMAME, AdvanceMESS, MAME, MESS, xmame, Raine and other emulators - -* Atari800 - emulator for Atari 8-bit systems, XE Game System and Atari 5200 SuperSystem - -* DeSmuME - Nintendo DS emulator - -* Desura - digital distribution platform for Windows, Linux and X systems - OnLine installer - +Sparky APTus Gamer被安装应用允许访问众多游戏控制模拟器。 模拟器包括: +*   AdvanceMENU – front-end for AdvanceMAME, AdvanceMESS, MAME, MESS, xmame, Raine and other emulators +*  AdvanceMENU - 前端包括 AdvanceMAME, AdvanceMESS, MAME, MESS, xmame, Raine 以及其他的模拟器 +*   Atari800 - emulator for Atari 8-bit systems, XE Game System and Atari 5200 SuperSystem +*  Atari800 - Atari 8位系统的模拟器,XE游戏系统和Atari 5200 超级系统 +*   DeSmuME - Nintendo DS emulator +*   DeSmuME - Nintendo DS 模拟器 +*   Desura - digital distribution platform for Windows, Linux and X systems - OnLine installer +*   Desura - * DOSBox - DOS emulator for BeOS, Linux, Mac X, OS2, and Windows * DOSEMU - DOS Emulator for Linux From 11b7110d87289874d5a6b11defce6b44eebf1408 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 10 Jul 2017 16:59:34 +0800 Subject: [PATCH 072/100] PRF&PUB:20170627 How to turn a Raspberry Pi into an eBook server.md @geekpi --- ...urn a Raspberry Pi into an eBook server.md | 40 +++++-------------- 1 file changed, 11 insertions(+), 29 deletions(-) rename {translated/tech => published}/20170627 How to turn a Raspberry Pi into an eBook server.md (75%) diff --git a/translated/tech/20170627 How to turn a Raspberry Pi into an eBook server.md b/published/20170627 How to turn a Raspberry Pi into an eBook server.md similarity index 75% rename from translated/tech/20170627 How to turn a Raspberry Pi into an eBook server.md rename to published/20170627 How to turn a Raspberry Pi into an eBook server.md index 972ba4ba91..72308d7906 100644 --- a/translated/tech/20170627 How to turn a Raspberry Pi into an eBook server.md +++ b/published/20170627 How to turn a Raspberry Pi into an eBook server.md @@ -1,46 +1,34 @@ 如何将树莓派变成电子书服务器 ============================================================ -### Calibre 电子书管理软件可以轻松地在树莓派 3 上设置电子书服务器,即使在连接较慢区域也是如此。 +> Calibre 电子书管理软件可以轻松地在树莓派 3 上设置电子书服务器,即使在连接较慢区域也是如此。 ![How to turn a Raspberry Pi into an eBook server](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/idea_innovation_mobile_phone.png?itok=Ep49JfKU "How to turn a Raspberry Pi into an eBook server") -图片提供:  -opensource.com - -最近[Calibre 3.0 发布了][12],它让用户能够在浏览器中阅读!注意 Raspbian 的仓库还没有更新(截至写作时)。 +最近 [Calibre 3.0 发布了][12],它让用户能够在浏览器中阅读电子书!注意 Raspbian 的仓库还没有更新它(截至写作时)。 电子书是教师、图书馆员和其他人与学生共享书籍、课堂资料或其他文件的好方法,只需要你有可靠的带宽接入即可。但是,即使你的连接速度较慢或无法连接,还有一个简单的解决方案:使用在树莓派 3 上运行的开源 Calibre 电子书管理软件创建电子书服务器。这是我所做的,你也可以。 -首先我下载了最新的[ Raspbian Pixel 镜像][13],并安装在一个新的 8GB microSD 卡上。然后我插入 microSD,连接到一块键盘,鼠标并用一根 HDMI 线连接到一台旧的 LCD 电视,然后启动了 Pi。在我的显示器上[调整了 Pixel 环境分辨率][14]并连接到本地网络之后,我准备开始了。我打开一个终端,并输入 **sudo apt-get update** 以获取操作系统的最新更新。 - -### [1updateos.png][1] +首先我下载了最新的 [Raspbian Pixel 镜像][13],并安装在一个新的 8GB microSD 卡上。然后我插入 microSD,连接了键盘、鼠标并用一根 HDMI 线连接到一台旧的 LCD 电视,然后启动了 Pi。在我的显示器上[调整了 Pixel 环境分辨率][14]并连接到本地网络之后,我准备开始了。我打开一个终端,并输入 `sudo apt-get update` 以获取操作系统的最新更新。 ![Updating Raspbian Pixel](https://opensource.com/sites/default/files/u128651/1updateos.png "Updating Raspbian Pixel") -接下来,我在终端中输入 **sudo apt-get install calibre** 来安装 [Calibre][15]。 - -### [2install_calibre.png][2] +接下来,我在终端中输入 `sudo apt-get install calibre` 来安装 [Calibre][15]。 ![Installing Calibre](https://opensource.com/sites/default/files/u128651/2install_calibre.png "Installing Calibre") -我从命令行启动了 Calibre(注意它也可以从 GUI 启动)。Calibre 的界面非常直观。第一次启动时,你会看到 **Welcome to Calibre** 的向导。我将默认 Calibre Library 更改为 **CalibreLibrary**(一个字),因为这启动内容服务器时更容易。 +我从命令行启动了 Calibre(注意它也可以从 GUI 启动)。Calibre 的界面非常直观。第一次启动时,你会看到 **Welcome to Calibre** 的向导。我将默认 “Calibre Library” 更改为 “CalibreLibrary”(一个词),因为这启动内容服务器时更容易。 在选择完我的 Calibre 内容位置后,我准备好开始下载书了。 -### [3calibre-interface.png][3] - ![Calibre's interface](https://opensource.com/sites/default/files/u128651/3calibre-interface.png "Calibre's interface") -我从菜单中选择了 **Get Books** 选项,在这很容易输入我的搜索字词,并选择我感兴趣的电子书提供者。我正在寻找[非 DRM ][16]的材料,所以我选择 [Project Gutenberg][17] 作为我的源。(Caliber 的免责声明指出,电子书交易是在你和个人内容提供商之间。)我在作者字段中输入 “Mark Twain”,并得到10个结果。 - -### [4books.png][4] +我从菜单中选择了 **Get Books** 选项,在这很容易输入我的搜索字词,并选择我感兴趣的电子书提供者。我正在寻找[非 DRM][16] 的材料,所以我选择 [Project Gutenberg][17] 作为我的源。(Caliber 的免责声明指出,电子书交易是在你和个人内容提供商之间。)我在作者字段中输入 “Mark Twain”,并得到10个结果。 ![Searching for e-books](https://opensource.com/sites/default/files/u128651/4books.png "Searching for e-books") 我选择了 _Adventures of Huckleberry Finn_ 这本书。在下一页面上,我可以选择 **MOBI** 和 **EPUB** 这两种电子书格式。我选择了 EPUB,这本书下载得很快。 - -### [5ebook-formats.png][5] + ![Choosing the e-book format](https://opensource.com/sites/default/files/u128651/5ebook-formats.png "Choosing the e-book format") @@ -50,26 +38,20 @@ opensource.com ![start_the_server.png](https://opensource.com/sites/default/files/images/life-uploads/start_the_server.png) -将内容添加到电子书服务器后,即可与网络中的其他人共享内容。通过在终端中输入 **ifconfig ** 获取你的树莓派 IP 地址。我正在使用无线网络,所以我在下面的例子中使用了 **wlan0** 中的结果。点击界面的最右侧并展开菜单。然后点击 “Connect and Share” 并启动服务器。 - -### [6ipconfig.png][6] +将内容添加到电子书服务器后,即可与网络中的其他人共享内容。通过在终端中输入 `ifconfig` 获取你的树莓派 IP 地址。我正在使用无线网络,所以我在下面的例子中使用了 **wlan0** 中的结果。点击界面的最右侧并展开菜单。然后点击 “Connect and Share” 并启动服务器。 ![Identifying the IP address with ipconfig](https://opensource.com/sites/default/files/u128651/6ipconfig.png "Identifying the IP address with ipconfig") -我下一步是通过我的电脑客户端连接到树莓派访问我添加的电子书。我在客户端上打开一个浏览器并输入树莓的地址,后面加上 **:8080** 端口。在我这里是 **[http://192.168.1.10:8080][10]** (根据你 Pi 的地址来适配)。 +我下一步是通过我的电脑客户端连接到树莓派访问我添加的电子书。我在客户端上打开一个浏览器并输入树莓的地址,后面加上 **:8080** 端口。在我这里是 **http://192.168.1.10:8080** (根据你 Pi 的地址来适配)。 你会在浏览器中看到主页: -### [7calibre-home.png][7] - ![Calibre's client homepage](https://opensource.com/sites/default/files/u128651/7calibre-home.png "Calibre's client homepage") 我已经测试,并能用 iPhone、Linux、MacOS 计算机轻易连接到服务器。 你可以在这个主页总探索选项,或者点击 **All Books** 显示服务器上的所有内容。 -### [8browsing-books.png][8] - ![Browsing e-books](https://opensource.com/sites/default/files/u128651/8browsing-books.png "Browsing e-books") 从这里,你可以下载书到你的设备并离线阅读了。 @@ -86,9 +68,9 @@ Don Watkins - 教育家、教育技术专家、企业家、开源倡导者。教 via: https://opensource.com/article/17/6/raspberrypi-ebook-server -作者:[Don Watkins ][a] +作者:[Don Watkins][a] 译者:[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/) 荣誉推出 From 311bdde1c18ff5ea1719b5dd8b2b2ee54a5dd248 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 10 Jul 2017 20:45:59 +0800 Subject: [PATCH 073/100] translating --- sources/tech/20170619 Is IoT the Future of Linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170619 Is IoT the Future of Linux.md b/sources/tech/20170619 Is IoT the Future of Linux.md index 15bac22e49..32f58162db 100644 --- a/sources/tech/20170619 Is IoT the Future of Linux.md +++ b/sources/tech/20170619 Is IoT the Future of Linux.md @@ -1,3 +1,5 @@ +translating---geekpi + Is IoT the Future of Linux? ============================================================ From 0511c92f0a0f014c82d5001af3fd34c3eb6b032a Mon Sep 17 00:00:00 2001 From: datastruct Date: Mon, 10 Jul 2017 22:05:10 +0800 Subject: [PATCH 074/100] Update 20170529 Ubuntu GamePack.md --- sources/tech/20170529 Ubuntu GamePack.md | 61 +++++++++++++++++++++--- 1 file changed, 54 insertions(+), 7 deletions(-) diff --git a/sources/tech/20170529 Ubuntu GamePack.md b/sources/tech/20170529 Ubuntu GamePack.md index 72ab18b83b..df4cef864a 100644 --- a/sources/tech/20170529 Ubuntu GamePack.md +++ b/sources/tech/20170529 Ubuntu GamePack.md @@ -6,54 +6,101 @@ Ubuntu GamePack A lot of people who like to use their Linux system for gaming. There seems to be no shortage of gaming systems which can supply access to games. UALinux is a Ukrainian company which promotes the use of GNU/Linux. UALinux has created a Ubuntu version to fill the gap for gaming. The Operating System (OS) is called Ubuntu GamePack and is based off of Ubuntu 16.04. -很大一部分 Linux爱好者喜欢用他们的系统玩游戏。现在看起来能够可以支持游戏的游戏系统很短缺。UALinux是一家推广使用GNU/Linux的乌克兰公司。UALinux开发了一个Ubuntu版本填补了这一空白。这个操作系统(OS)命名为Ubuntu GamePack 基于Ubuntu 16.04. + +很大一部分 Linux 爱好者喜欢用他们的系统玩游戏。现在看起来能够可以支持游戏的游戏系统很短缺。UALinux 是一家推广使用 GNU/Linux 的乌克兰公司。UALinux 开发了一个 Ubuntu 版本填补了这一空白。把这个基于 Ubuntu 16.04 的操作系统(OS)命名为 Ubuntu GamePack . **Contents** + ** 内容 ** + The list of games would be quite extensive but the company claims there is access to over 22,381 games. + 游戏现在已经相当广泛,但是游戏公司已经宣称可以访问超过22,381款游戏。 + The GamePack includes Lutris and Steam to allow you access to the specific gaming services the distributer provides. -GamePack 包括 Lutris 和 Steam两部分,允许您访问分发商提供的定制游戏服务。 + +GamePack 包括 Lutris 和 Steam 两部分,允许您访问分发商提供的定制游戏服务。 + For Windows-based games there is PlayOnLinux, WINE and CrossOver so the games will run on Linux. -对于基于Windows的游戏,有PlayOnLinux,WINE和CrossOver转换到Linux上运行。 + +对于基于 Windows 的游戏,有 PlayOnLinux,WINE 和 CrossOver 转换到 Linux 上运行。 + For DOS games you can run the games in DosBox which is a DOS emulator for Linux. -对于DOS游戏,您可以在DosBox中运行游戏,这是一个Linux的DOS模拟器 + +对于 DOS 游戏,您可以在 DosBox 中运行游戏,这是一个 Linux 的 DOS 模拟器 + Sparky APTus Gamer is also installed to allow access to numerous gaming console emulators. The emulators include: -Sparky APTus Gamer被安装应用允许访问众多游戏控制模拟器。 模拟器包括: + +Sparky APTus Gamer 被安装应用允许访问众多游戏控制模拟器。 模拟器包括: + *   AdvanceMENU – front-end for AdvanceMAME, AdvanceMESS, MAME, MESS, xmame, Raine and other emulators + *  AdvanceMENU - 前端包括 AdvanceMAME, AdvanceMESS, MAME, MESS, xmame, Raine 以及其他的模拟器 + *   Atari800 - emulator for Atari 8-bit systems, XE Game System and Atari 5200 SuperSystem -*  Atari800 - Atari 8位系统的模拟器,XE游戏系统和Atari 5200 超级系统 + +*  Atari800 - Atari 8位系统的模拟器,XE 游戏系统和 Atari 5200 超级系统 + *   DeSmuME - Nintendo DS emulator + *   DeSmuME - Nintendo DS 模拟器 + *   Desura - digital distribution platform for Windows, Linux and X systems - OnLine installer -*   Desura - + +*   Desura - 为Windows数字化分发平台,Linux 和 x 系统 - 在线安装 + * DOSBox - DOS emulator for BeOS, Linux, Mac X, OS2, and Windows +* DOSBox - 为系统 BeOS, Linux, Mac X, OS2, 和 Windows 定制的 DOS 模拟器 + * DOSEMU - DOS Emulator for Linux +* DOSEMU - 为 Linux 系统定制的 DOS 模拟器 + * ePSXe - enhanced PSX emulator +* ePSXe - 增强的 PSX 模拟器(仿真器) + * FCEUX - Nintendo Entertainment System (NES), Famicom and Famicom Disk System (FDS) emulator +* FCEUX - 任天堂娱乐系统(NES),费米康和费米康磁盘系统(FDS)模拟器(仿真器) + * FS-UAE - Cross-platform Amiga emulator +* FS-UAE - 跨平台多媒体(Amiga)模拟器 + * GNOME Video Arcade - Simple MAME frontend +* GNOME Video Arcade - 简化 MAME 前端 + * Hatari - Atari ST, STE, TT and Falcon emulator for Linux and other systems +* Hatari - 用于Linux和其他系统的Atari ST,STE,TT和 Falcon 模拟器(仿真器) + * Higan - Emulator for Nintendos SNES, NES, Gameboy, Gameboy Color and Gameboy Advance +* Higan - 任天堂 SNES,NES,Gameboy,Gameboy Color 和 Gameboy Advance 的模拟器 + * Kega_Fusion - Sega SG/SC/SF, Master System, Game Gear, Genesis/Megadrive, SVP, Pico, SegaCD/MegaCD emulator +* Kega_Fusion - 世嘉 SG / SC / SF,主系统,游戏机,创世纪 / 麦加驱动,SVP,Pico,SegaCD / MegaCD 模拟器(仿真器) + * MAME - Hardware emulator which faithfully reproduces the behavior of many arcade machines +* MAME - 不折不扣地复制许多街机行为硬件模拟器(仿真器) + * Mednafen - Atari Lynx, GameBoy, NES, SNES, PC-FX, Sega, Sony PlayStation and other systems +* Mednafen - Atari Lynx,GameBoy,NES,SNES,PC-FX,世嘉,索尼游戏站等系统 + * MESS - Emulator for various consoles and computing systems +* MESS - 各种控制台和计算系统的模拟器(仿真器) + * Nestopia - Nintendo Entertainment System/Famicom emulator +* Nestopia - 任天堂娱乐系统/费米康模拟器 + * PCSX - Sony PlayStation emulator * PlayOnLinux - Front-end for Wine From 7fdc41c40df706983dc9cdca8bbd516a97bb8295 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 11 Jul 2017 09:10:17 +0800 Subject: [PATCH 075/100] translated --- .../20170619 Is IoT the Future of Linux.md | 86 ------------------- .../20170619 Is IoT the Future of Linux.md | 84 ++++++++++++++++++ 2 files changed, 84 insertions(+), 86 deletions(-) delete mode 100644 sources/tech/20170619 Is IoT the Future of Linux.md create mode 100644 translated/tech/20170619 Is IoT the Future of Linux.md diff --git a/sources/tech/20170619 Is IoT the Future of Linux.md b/sources/tech/20170619 Is IoT the Future of Linux.md deleted file mode 100644 index 32f58162db..0000000000 --- a/sources/tech/20170619 Is IoT the Future of Linux.md +++ /dev/null @@ -1,86 +0,0 @@ -translating---geekpi - -Is IoT the Future of Linux? -============================================================ - -_Linux will certainly play a key role in the Internet of Things, but it likely will share the spotlight._ - - -With [Canonical refocusing][8] on becoming profitable and new technologies, some among us have found ourselves pondering where Linux is headed in the future and whether or not IoT (Internet of Things) is the future of Linux? This article aims to address both issues head on. - -### Mycroft runs Linux - -Unknown to most of the non-tech savvy world, there is in fact a few different IoT projects out there that aren't the over-commercialized ones we keep seeing ads for on the Web. The most successful among there has to be the [Mycroft][9] project. - -Part of what makes Mycroft interesting is that you're not required to get it as stand alone hardware. This means you can actually download it to a Raspberry Pi or even your own PC. This is an element of freedom not found in more commonly known commercialized alternatives from other players in the IoT device space. Another interesting fact about the Mycroft project is that it was initially funded with crowd funding. So from its inception, it was truly a community inspired project. - -So what about its skills, the term used to describe recipes for its abilities? As it stands now, I've heard some mixed reviews. By taking a look into the listed skills available on Github, the overall list seems to be fairly impressive. Digging deeper, it's easy to see that many of the skills are geekier than those found with proprietary IoT devices. - -It's also worth noting that there's a distinctive difference between an official skill for IoT devices and those developed by community members. The official skills list for Mycroft is actually pretty weak. Let's face it, as cool as it is to have Linux running an IoT device, it's mind-blowing to me that there are no official email checking skills listed on the [Mycroft Github][10] page. Okay, there is one for Gmail in the community skills section...and it's listed with a question mark as it's apparently not verified as working (or not). - -### Google Home – It's a Linux puzzle wrapped in a riddle - -So what about Google's IoT offering, Google Home. Surely this runs on Linux, right? Well, in a very broad sense...sort of. It turns out that Google Home is [based on the Chromecast][11]. And the Chromecast? Well, it's based on Google TV. Are we at the Linux part yet? Not exactly. - -Apparently the Chromecast is basically running a [stripped down version of Android][12]. And as most of us know, Android does indeed utilize a customized version of the Linux kernel. - -It's at this point, I feel like we need to ask ourselves – is Google the best representative for Linux IoT that we can come up with? I'd argue no, as I feel like they're willing to make privacy compromises we wouldn't see in a pure Linux IoT environment. But that's just my personal belief. - -Assuming we're willing to give Google Home the benefit of the doubt and assuming that there is some Linux worth recognizing under the hood, how does it compare to the pure open source experience found with Mycroft? - -Currently, Google is crushing it. First of all, you can indeed install the "brains" of Google Home (called Google Assistant) to a Raspberry Pi if you wish to. This is made available through the [Google Assistant SDK][13]. - -The SDK is you guessed it...available to be installed on Linux. After installing portaudio, various libs and a pip install of google-assistant-sdk, you're ready to start talking to your Pi much like you would a Google Home device. - -Getting back to the actual Google Home device itself, you might be wondering about its available skills? Out of the box, it provides music playback with Google Play Music, Pandora, Spotify, and iHeart Radio, among other streaming music services. Not only does Google Home have more "conversation" skills available than Mycroft, it works with services like Netflix and home brands such as Philips, Nest and [IFTTT][14] for various smart home tasks. Did I mention it can also schedule stuff on Google Calendar or order pizza? - -Comparatively, Mycroft is better for the DIY developer who is looking to create their own skills where Google Home is ready to roll now, not someday. - -### Amazon Echo can run on Linux - -I'll be first to admit that I have no idea if the Amazon Echo itself runs on some element of Linux or not. That said, I do know you can install the brains behind the Echo onto a Linux powered Raspberry Pi! When it was [first released for the Pi][15], it was a bit of a let down since you had to press a button to activate the Echo's listening mode. - -Flash forward to now, Echo for the Pi now supports a programmable "hot word" to activate it. This means you can run a Pi installed with Linux that operates in a similar manner to an official Amazon Echo. Then again, if you buy an Echo Dot, you could just skip the extra work and save the geeky stuff for a Mycroft install on a Pi instead. - -Just like Mycroft and Google Home, the Amazon Echo being available on a Pi is important as it makes the IoT technology available to anyone – not just those who opt for the official hardware. And because Amazon has had more time to develop the technology, the Echo is arguably ahead of the competition with programmable skills and overall progress. - -So even though Google Home does a far better job answering questions with better answers, the Echo supports more third party IoT devices and some believe has a more natural voice than Google Home. Personally, I think the voices on both devices sound good. But that's just my opinion. - -### IoT is Linux at its best - -Assuming for a minute we continue to see these IoT devices that are compatible with Linux or projects like Mycroft that are genuinely partners with the community using Linux, one thing is for sure – Linux continues to be a part of the equation. - -I would argue that not using a free/open source platform like Linux is just foolish. After all, these devices will often times be connected to other IoT automation components. This means security needs to be a real consideration. Running IoT with Linux under the hood means that we're able as a community to ensure that security is job one, instead of hoping the manufacturer does this for us. - -Need an example as to why this is important? Look to any consumer router not running open source firmware. What happens when the manufacturer stops supporting that device – security risks crop up. - -Is IoT the future of Linux? In my opinion, I think it is...but not in its entirety. I think that for many it will be a stepping ground. But in the end, I think that there will be so much proprietary "stuff" piled on top of the Linux portion that only pure projects like Mycroft will remain Linux only. - -So what say you? Do you think that open source projects like Mycroft are proper competition with Google and Amazon offerings now? Perhaps instead, you feel that there are other Linux based offerings better suited for the job? Whatever it may be, hit the Comments and let's talk about it. - --------------------------------------------------------------------------------- - -via: http://www.datamation.com/open-source/is-iot-the-future-of-linux.html - -作者:[Matt Hartley ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.datamation.com/author/Matt-Hartley-3080.html -[1]:http://www.datamation.com/feedback/http://www.datamation.com/open-source/is-iot-the-future-of-linux.html -[2]:http://www.datamation.com/author/Matt-Hartley-3080.html -[3]:http://www.datamation.com/e-mail/http://www.datamation.com/open-source/is-iot-the-future-of-linux.html -[4]:http://www.datamation.com/print/http://www.datamation.com/open-source/is-iot-the-future-of-linux.html -[5]:http://www.datamation.com/open-source/is-iot-the-future-of-linux.html#comment_form -[6]:http://www.datamation.com/open-source/is-iot-the-future-of-linux.html# -[7]:http://www.datamation.com/author/Matt-Hartley-3080.html -[8]:https://insights.ubuntu.com/2017/04/05/growing-ubuntu-for-cloud-and-iot-rather-than-phone-and-convergence/ -[9]:https://mycroft.ai/ -[10]:https://github.com/MycroftAI/mycroft-skills -[11]:https://www.theverge.com/circuitbreaker/2016/5/31/11822032/google-home-chromecast-android -[12]:https://www.extremetech.com/computing/162463-chromecast-hacked-its-based-on-google-tv-and-android-not-chrome-os -[13]:https://developers.google.com/assistant/sdk/ -[14]:https://ifttt.com/google_assistant -[15]:https://www.raspberrypi.org/blog/amazon-echo-homebrew-version/ diff --git a/translated/tech/20170619 Is IoT the Future of Linux.md b/translated/tech/20170619 Is IoT the Future of Linux.md new file mode 100644 index 0000000000..94936d9cb6 --- /dev/null +++ b/translated/tech/20170619 Is IoT the Future of Linux.md @@ -0,0 +1,84 @@ +物联网是 Linux 的未来么? +============================================================ + + +_Linux 将会在物联网中扮演一个关键角色,但是它可能会分享焦点。_ + +随着[ Canonical 重新聚焦在][8]赢利和新技术,我们中的一些人发现我们正在思考 Linux 未来将走向何方,IoT(物联网)是否是 Linux 的未来? 本文旨在解决这两个问题。 + +### Mycroft 运行于 Linux + +对于大多数非技术世界的人来说,实际上有几个不同的 IoT 项目,它们不是我们不断在网络上看到广告的过度商业化的项目。其中最成功的就是 [Mycroft][9] 项目。 + +使得 Mycroft 有趣的部分原因是你不需要在专门的硬件上得到它。这意味着你可以将其下载到 Raspberry Pi 或甚至您自己的 PC 上。这是其他玩家在物联网领域其他更常见的商业化替代品中不常见到的自由元素。Mycroft 项目的另一个有趣的事实是,它最初是众筹的。所以从一开始它就是真正的社区驱动的项目。 + +那么它的技能,这个用来描述它能力的术语怎么样?目前,我听到一些褒贬不一的评论。通过查看 Github 上列出的技能,整体列表似乎相当令人印象深刻。更深层次挖掘的话,很容易看出,许多技能比使用专有的 IoT 设备的技能要好。 + +值得注意的是,物联网设备的官方技能与社区成员开发的功能之间存在明显的区别。Mycroft 的官方技能列表其实很薄弱。让我们面对它,就像 Linux 运行物联网设备一样酷,对我来说,没有官方的邮件检查技能列在 [Mycroft Github][10] 页面上是令人兴奋的。好吧,在社区技能部分有一个 Gmail,它带有一个问号,因为它显然没有验证可以工作(或不工作)。 + +### Google Home - 这是一个包含在谜语中的 Linux 谜题 + +那么 Google 的物联网产品 Google Home 呢?当然这运行在 Linux上,对吧?是的,在广泛意义上。。。事实证明,Google Home [基于 Chromecast][11]。那 Chromecast 呢?它是基于 Google TV。我们还在 Linux 的部分么?不完全是。 + +显然,Chromecast 基本上是运行[ Android 的精简版][12]。而且我们大多数人都知道,Android 确实使用了 Linux 内核的定制版本。 + +在这一点上,我觉得我们需要问自己 - Google 是我们可以想出的最好的 Linux 物联网代表吗?我不会反对,因为我觉得他们愿意在一个纯粹的 Linux 物联网环境中做出我们不会看到的隐私妥协。 但这只是我个人的信仰。 + +假设我们愿意让 Google Home 获得怀疑的好处,假设有一些 Linux 值得认可,那么与 Mycroft 的纯粹的开源体验相比呢? + +目前,谷歌正在打破它。首先,如果你愿意,你可以安装 Google Home(称为 Google Assistant)的“大脑”到树莓派上。这可以通过 [Google Assistant SDK][13] 获得。 + +如你猜的那样,这个 SDK 可以在 Linux 上安装。安装完 portaudio、各种库并且 pip 安装 google-assistant-sdk 之后,你可以开始用派进行通话了,就像 Google Home 设备一样。 + +回到实际 Google Home 设备本身,你可能会想知道它的可用技能?开箱即用,它提供与 Google Play 音乐、Pandora、Spotify 和 iHeart Radio 以及其他流式音乐服务的音乐播放。Google Home 不仅拥有比 Mycroft 更多的“交流”技能,它还适用于像 Netflix 这样的服务和诸如 Philips、Nest和 [IFTTT][14] 等各种智能家居任务的家庭品牌。我有提到它还可以安排 Google 日历或者订购披萨么? + +相比之下,Mycroft 对于想要创造自己的技能的 DIY 开发者来说更好,Google Home 现在可以开始使用,而不是某一天。 + +### Amazon Echo 可以运行于 Linux + +我首先要承认的是我不知道 Amazon Echo 本身是否运行在 Linux 的某些元素上。也就是说,我知道你可以将 Echo 背后的大脑安装到 Linux 驱动的树莓派上!当[第一次发布派上的版本时][15],有点让人失望的是,你不得不按一个按钮来激活 Echo 的聆听模式。 + +很快进行到现在,派上的 Echo 现在支持可编程的“热词”来激活它。这意味着你可以运行一个安装了 Linux 的派,其操作方式与官方 Amazon Echo 相似。在说一次,如果你买了 Echo Dot,你可以跳过额外的工作来代替在安装了 Mycroft 的派上保存极客的东西。 + +就像 Mycroft 和 Google Home 一样,Amazon Echo 可以在派上使用很重要,因为它使任何人都可以使用物联网技术 - 而不仅仅是那些选择官方硬件的人。而且由于亚马逊已经有更多的时间来开发这项技术,因此,可以说 Echo 是超前于可编程技能竞争以及整体进度的。 + +所以即使 Google Home 在问题回答上更好,但是 Echo 支持更多的第三方物联网设备,有些人认为它比 Google Home 有更自然的声音。就个人而言,我认为两台设备的声音听起来都不错。但这只是我的意见。 + +### 物联网是 Linux 最好的 + +假设我们将继续看到这些与 Linux 兼容的物联网设备或者像 Mycroft 这样真正用 Linux 与社区的项目,有一点是可以肯定的,Linux 仍然是等式的一部分。 + +我认为不使用像 Linux 这样的自由/开放源代码平台是愚蠢的。毕竟,这些设备往往会连接到其他物联网自动化组件。这意味着安全性是一个真正的考虑。在 Linux 下运行物联网意味着我们可以作为一个社区确保安全是好的,而不是希望制造商为我们做到这一点。 + +需要一个例子说明为什么这很重要?看看那些不运行开源固件的路由器。当制造商停止支持该设备时会发生什么 - 安全风险开始出现。 + +物联网是 Linux 的未来吗?在我看来,我认为这是。。。但不是全部。我认为对许多人来说,这是前进的道路。但是最后,我认为在 Linux 之上将会有许多专有的“东西”,只有像 Mycroft 这样纯粹的项目才能保持 Linux。 + +那么你会说什么?你认为像 Mycroft 这样的开源项目现在与 Google 和 Amazon 的产品在正常竞争么?反之,你觉得还有其他基于 Linux 的产品更适合这项工作么?无论是什么,点击评论,让我们来谈谈。 + +-------------------------------------------------------------------------------- + +via: http://www.datamation.com/open-source/is-iot-the-future-of-linux.html + +作者:[Matt Hartley ][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.datamation.com/author/Matt-Hartley-3080.html +[1]:http://www.datamation.com/feedback/http://www.datamation.com/open-source/is-iot-the-future-of-linux.html +[2]:http://www.datamation.com/author/Matt-Hartley-3080.html +[3]:http://www.datamation.com/e-mail/http://www.datamation.com/open-source/is-iot-the-future-of-linux.html +[4]:http://www.datamation.com/print/http://www.datamation.com/open-source/is-iot-the-future-of-linux.html +[5]:http://www.datamation.com/open-source/is-iot-the-future-of-linux.html#comment_form +[6]:http://www.datamation.com/open-source/is-iot-the-future-of-linux.html# +[7]:http://www.datamation.com/author/Matt-Hartley-3080.html +[8]:https://insights.ubuntu.com/2017/04/05/growing-ubuntu-for-cloud-and-iot-rather-than-phone-and-convergence/ +[9]:https://mycroft.ai/ +[10]:https://github.com/MycroftAI/mycroft-skills +[11]:https://www.theverge.com/circuitbreaker/2016/5/31/11822032/google-home-chromecast-android +[12]:https://www.extremetech.com/computing/162463-chromecast-hacked-its-based-on-google-tv-and-android-not-chrome-os +[13]:https://developers.google.com/assistant/sdk/ +[14]:https://ifttt.com/google_assistant +[15]:https://www.raspberrypi.org/blog/amazon-echo-homebrew-version/ From 5b7febdd757d1b064e0b4e0910d43adff4dbd6ee Mon Sep 17 00:00:00 2001 From: datastruct Date: Tue, 11 Jul 2017 09:43:29 +0800 Subject: [PATCH 076/100] Update 20170529 Ubuntu GamePack.md --- sources/tech/20170529 Ubuntu GamePack.md | 117 +++++++++++++++++++---- 1 file changed, 99 insertions(+), 18 deletions(-) diff --git a/sources/tech/20170529 Ubuntu GamePack.md b/sources/tech/20170529 Ubuntu GamePack.md index df4cef864a..cbaca4a1df 100644 --- a/sources/tech/20170529 Ubuntu GamePack.md +++ b/sources/tech/20170529 Ubuntu GamePack.md @@ -1,5 +1,3 @@ -"stevenzdg988 translating" - Ubuntu GamePack =============== @@ -103,139 +101,222 @@ Sparky APTus Gamer 被安装应用允许访问众多游戏控制模拟器。 模 * PCSX - Sony PlayStation emulator -* PlayOnLinux - Front-end for Wine +*   PCSX - 索尼游戏平台模拟器(仿真器) +  +*   PlayOnLinux - Front-end for Wine +*   PlayOnLinux - 前端生成 +  * PPSSPP - PPSSPP is an open source PSP emulator available for Windows, MacOS, Linux and Android +* PPSSPP - PPSSPP 是适用于 Windows,MacOS,Linux 和 Android 的开源 PSP 仿真器 + * Steam - launcher for the Steam software distribution service - OnLine installer +* Steam - Steam 软件分发服务的启动器 - 在线安装程序 + * Stella - Atari 2600 Emulator for SDL and the X Window System +* Stella -用于 SDL 和 X Window 系统的 Atari 2600 仿真器 + * VisualBoyAdvance - Full featured Game Boy Advance emulator +* VisualBoyAdvance - 全功能 Game Boy Advance 模拟器 + * Virtual Jaguar - Cross-platform emulator for Atari's infamous Jaguar console +* Virtual Jaguar - 用于 Atari infamous Jaguar 控制台的跨平台模拟器 + * Wine - Windows implementation +*   Wine - 窗口实现 +  * Winetricks - a POSIX shell script 'package manager' for WINE to install some Windows software easily +*   Winetricks - POSIX shell脚本的软件包管理器,能够很容易为 WINE 安装 Windows软件 + * Yabause - Sega Saturn emulator +*   Yabause - 世嘉土星32位游戏机模拟器(仿真器) +  * ZSNES - Emulator for the Super Nintendo Entertainment System +* ZSNES - 超级任天堂娱乐系统模拟器 + The GamePack also includes Oracle Java and Adobe Flash which is needed by quite a few games. +GamePack还包括被相当多的游戏平台所必须的 Oracle java 和 Adobe Flash。 + If this seems to be an OS you are interested in then read on to find out how to download it. +如果这是一个你感兴趣的操作系统,请继续阅读,看看如何下载它。 + **Download** +  +**下载** + The main place to download the OS is from UALinux. The link from UALinux is [https://ualinux.com/en/download/category/25-ubuntu-gamepack][1]. Since the link is from a foreign country it is a slow download. Another option is to download the OS from a Torrent file. If you do not have a Torrent program you may want to download ‘Transmission’. Once you have a Torrent program go to [https://zooqle.com/ubuntu-gamepack-16-04-i386-amd64-январь-2017-pc-vkn99.html][2]. The Torrent will allow you to download both the 64-bit and 32-bit ISO files. +下载此操作系统镜像的主要是来自 UALinux 。其下载链接是: [https://ualinux.com/en/download/category/25-ubuntu-gamepack][1]。 +由于此链接来自国外,所以下载速度很慢。另一种选择是利用种子文件下载此操作系统。如果没有你想要下载的“传输”种子下载程序。你可以通过[https://zooqle.com/ubuntu-gamepack-16-04-i386-amd64-январь-2017-pc-vkn99.html][2] +此链接获得。这个种子文件下载可以下载 64 位和 32 位 的 ISO 镜像文件。 The file sizes vary depending on the architecture you need. The 64-bit OS ISO file is 2.27 GB, while the 32-bit OS ISO file is 2.13 GB. +文件大小取决于您需要的架构。64 位操作系统 ISO 镜像文件大小是 2.27 GB,而 32 位的操作系统 ISO 镜像文件大小是 2.13 GB. +   Once downloaded you can use the ISO file to create a bootable DVD to install the GamePack or you can use a program like ‘USB Image Writer’ to place the ISO on a USB stick to install it. +  +如果下载了你所用的 ISO 镜像文件,你可以利 ISO 文件创建一个可启动的 DVD 安装 Gamepack 或者你可以使用 ‘USB Image Writer’把 ISO 写入到优盘,并利用此优盘安装系统。 The requirements are the same as Ubuntu 16.04: - +  +硬件需求和 Ubuntu 16.04 保持一致: +  * 2 GHz dual core processor or better -* 2 GB system memory +*   2 GHz 双核处理器或者更高 +*   2 GB system memory + +*   2 GB 系统内存 +  * 25 GB of free hard drive space -* Either a DVD drive or a USB port for the installer media +*   25 GB 的磁盘空间 +*   Either a DVD drive or a USB port for the installer media + +*   具有 DVD 驱动器或者具备 USB 端口,以便于安装 +  * Internet access is required for online gaming systems such as Steam +*   在线游戏系统(如Steam)需要互联网接入。 + It goes without saying that for gaming you definitely want to have a system with more than these ‘minimum’ requirements. More memory would be a definite plus as well as a decent video card with a fair amount of Video RAM. +不用说,对于游戏玩家来说,肯定希望拥有比这些“最低配置”要求更高的系统配置。更多的内存将是一个有把握的选择,也应该有一款正版的显存大一点的显卡。 + Once you have a system and the specific ISO file for the system, 32- or 64-bit OS, then you are ready to install the Operating System. -**Installation** +您如果有了硬件系统和系统的特定 32位 或者 64 位 ISO 文件,那么接下来就可以安装操作系统了。 +**Installation** +  +**安装过程** + Once you have the ISO file on a media from which you can boot your system you are ready to continue. +在媒体上利用 ISO 镜像文件启动了系统,您就可以准备进行下一步了。 + Boot from the Ubuntu GamePack media and you should see a screen similar to Figure 1. +从 Ubuntu Gamepack 介质启动,你会看到一个类似图1的屏幕。 + ![Figure 01.png](https://www.linux.org/attachments/figure-01-png.671/) **FIGURE 1** +**图 1** Once everything is loaded the installer can proceed with the installation. Figure 2 shows the next screen which allows you to specify your language and whether you want to install or try the GamePack. If you wish, you can click ‘Try Ubuntu’ to simply load it into memory and try it out without making changes to your drive. +一旦加载完毕,安装程序就可以继续安装了。图2显示下一屏,可以定制语言,接下来是安装或者体验 Gamepack。如果你愿意,你可以点击 “Try Ubuntu” 在不改变驱动器的情况下把它加载到内存中运行。 + ![Figure 02.png](https://www.linux.org/attachments/figure-02-png.672/) **FIGURE 2** +**图 2** Once you are ready to continue select ‘Install Ubuntu’. - +  +接下来继续选择 ‘Install Ubuntu’ 进行安装了。 +  The next screen, Figure 3, allows you to specify whether to download any updates for Ubuntu while installing it. You can also choose to install Third Party software for Graphics, WiFi, Flash, MP3 and other updates. -Once you have made your selections, press ‘Continue’. +下一个屏幕,如图3所示,你可以在安装 Ubuntu 时指定是否下载 Ubuntu 的任何更新。您还可以选择安装第三方的软件,如:Graphics, WiFi, Flash, MP3 和其他更新。 +Once you have made your selections, press ‘Continue’. +  +当定制好你的系统后,就可以点击“Continue”  +  ![Figure 03.png](https://www.linux.org/attachments/figure-03-png.673/) **FIGURE 3** +**图 3** Next, you must specify how the drive will be configured for use as shown in Figure 4\. If you plan on using the whole drive, then it may be easier to leave the settings as they are and click ‘Install Now’. +接下来,您必须指定驱动器将如何配置为使用,如图4所示。如果您计划使用整个驱动器,那么可以更容易地设置,选择此驱动器即可,然后单击“Install Now”。 + ![Figure 04.png](https://www.linux.org/attachments/figure-04-png.674/) **FIGURE 4** +**图 4** As shown in Figure 5 you will be prompted to verify your selection for configuring the hard drive. If you approve the changes then click ‘Continue’. - +  +接下来在图5中可以根据提示确认所选择硬件配置。如果同意以上的更改,请单击“Continue”。  +  ![Figure 05.png](https://www.linux.org/attachments/figure-05-png.675/) **FIGURE 5** +**图 5** Next you will be prompted to choose your Time Zone as shown in Figure 6\. Click ‘Continue’ once you have set your Time Zone. - +接下来,如图6所示,你将按照提示选择时区,选择完毕后点击“Continue”。 ![Figure 06.png](https://www.linux.org/attachments/figure-06-png.676/) **FIGURE 6** +**图 6** A window will appear, Figure 7, to allow you to set the default keyboard layout. Choose the correct layout and press ‘Continue’. - +接下来,如图7所示,需要您设置默认的键盘布局。选择适合您的正确的布局后并按“Continue”。 ![Figure 07.png](https://www.linux.org/attachments/figure-07-png.677/) **FIGURE 7** +**图 7** The last configuration screen is for you to set up a User account as shown in Figure 8\. Type in your name, computer name, User name, password and select if you need to type the password to log onto the system. You can also set to encrypt the Home Folder for this User. +最后一个配置屏幕是为您设置一个用户帐户,如图8所示。键入您的姓名、计算机名、用户名、密码和选择您需要键入密码登录系统的方式。您还可以为该用户设置加密主目录。 ![Figure 08.png](https://www.linux.org/attachments/figure-08-png.678/) **FIGURE 8** +**图 8** The installation should proceed now by setting up the drive as specified. Files will be copied from the boot media to the hard drive as shown in Figure 9\. Once everything is copied to the drive and set up you will be prompted to remove the Boot Media to allow the system to restart. +安装将按定制进行设置驱动器。安装文件将从引导媒体复制到硬盘驱动器,如图9所示。所有内容复制到驱动器并设置,您将被提示移除引导媒体并允许重新启动系统。 ![Figure 09.png](https://www.linux.org/attachments/figure-09-png.679/) **FIGURE 9** +**图 9** After the restart, if you selected to require the User to log in, then you will be given a screen like Figure 10\. Here you enter the password you specified for the User and log onto Ubuntu GamePack. +重新启动后,您需要选择用户登录,会得到类似于图10的屏幕\\。输入指定的用户密码登录到 Ubuntu Gamepack。 ![Figure 10.png](https://www.linux.org/attachments/figure-10-png.680/) **FIGURE 10** +**图 10** After you log onto Ubuntu GamePack you should probably try to perform any software upgrades which may be necessary. Open a Terminal and enter the following two commands: +当你登录到 Ubuntu Gamepack 你应该尝试执行可能需要的任何软件升级。打开一个终端并输入以下两个命令: - _sudo apt-get update -sudo apt-get upgrade_ +sudo apt-get update && sudo apt-get upgrade Any updates which are not installed should be installed to bring the GamePack system up-to-date. - +更新会安装 GamePack 系统定制的软件更新。 Now, simply look through the menu and find the games you wish to play. Open the emulators or any of the game services like Steam. - +现在,只要看看菜单,找到你想玩的游戏就行了。打开模拟器或任何游戏服务如 Steam 。 Hope you enjoy the GamePack and have fun! - +希望你喜欢 Gamepack 并且玩得高兴! -------------------------------------------------------------------------------- via: https://www.linux.org/threads/ubuntu-gamepack.4559/ 作者:[Jarret B ][a] -译者:[译者ID](https://github.com/译者ID) +译者:[stevenzdg988](https://github.com/stevenzdg988) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 0bbadc990fcda7ab53f393ec6fb0ac15f5d4bb70 Mon Sep 17 00:00:00 2001 From: datastruct Date: Tue, 11 Jul 2017 09:45:41 +0800 Subject: [PATCH 077/100] Update 20170529 Ubuntu GamePack.md --- sources/tech/20170529 Ubuntu GamePack.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sources/tech/20170529 Ubuntu GamePack.md b/sources/tech/20170529 Ubuntu GamePack.md index cbaca4a1df..9607f442a9 100644 --- a/sources/tech/20170529 Ubuntu GamePack.md +++ b/sources/tech/20170529 Ubuntu GamePack.md @@ -263,20 +263,25 @@ As shown in Figure 5 you will be prompted to verify your selection for configuri **图 5** Next you will be prompted to choose your Time Zone as shown in Figure 6\. Click ‘Continue’ once you have set your Time Zone. + 接下来,如图6所示,你将按照提示选择时区,选择完毕后点击“Continue”。 + ![Figure 06.png](https://www.linux.org/attachments/figure-06-png.676/) **FIGURE 6** **图 6** A window will appear, Figure 7, to allow you to set the default keyboard layout. Choose the correct layout and press ‘Continue’. + 接下来,如图7所示,需要您设置默认的键盘布局。选择适合您的正确的布局后并按“Continue”。 + ![Figure 07.png](https://www.linux.org/attachments/figure-07-png.677/) **FIGURE 7** **图 7** The last configuration screen is for you to set up a User account as shown in Figure 8\. Type in your name, computer name, User name, password and select if you need to type the password to log onto the system. You can also set to encrypt the Home Folder for this User. + 最后一个配置屏幕是为您设置一个用户帐户,如图8所示。键入您的姓名、计算机名、用户名、密码和选择您需要键入密码登录系统的方式。您还可以为该用户设置加密主目录。 ![Figure 08.png](https://www.linux.org/attachments/figure-08-png.678/) @@ -285,6 +290,7 @@ The last configuration screen is for you to set up a User account as shown in Fi **图 8** The installation should proceed now by setting up the drive as specified. Files will be copied from the boot media to the hard drive as shown in Figure 9\. Once everything is copied to the drive and set up you will be prompted to remove the Boot Media to allow the system to restart. + 安装将按定制进行设置驱动器。安装文件将从引导媒体复制到硬盘驱动器,如图9所示。所有内容复制到驱动器并设置,您将被提示移除引导媒体并允许重新启动系统。 ![Figure 09.png](https://www.linux.org/attachments/figure-09-png.679/) @@ -293,6 +299,7 @@ The installation should proceed now by setting up the drive as specified. Files **图 9** After the restart, if you selected to require the User to log in, then you will be given a screen like Figure 10\. Here you enter the password you specified for the User and log onto Ubuntu GamePack. + 重新启动后,您需要选择用户登录,会得到类似于图10的屏幕\\。输入指定的用户密码登录到 Ubuntu Gamepack。 ![Figure 10.png](https://www.linux.org/attachments/figure-10-png.680/) @@ -301,15 +308,21 @@ After the restart, if you selected to require the User to log in, then you will **图 10** After you log onto Ubuntu GamePack you should probably try to perform any software upgrades which may be necessary. Open a Terminal and enter the following two commands: + 当你登录到 Ubuntu Gamepack 你应该尝试执行可能需要的任何软件升级。打开一个终端并输入以下两个命令: sudo apt-get update && sudo apt-get upgrade Any updates which are not installed should be installed to bring the GamePack system up-to-date. + 更新会安装 GamePack 系统定制的软件更新。 + Now, simply look through the menu and find the games you wish to play. Open the emulators or any of the game services like Steam. + 现在,只要看看菜单,找到你想玩的游戏就行了。打开模拟器或任何游戏服务如 Steam 。 + Hope you enjoy the GamePack and have fun! + 希望你喜欢 Gamepack 并且玩得高兴! -------------------------------------------------------------------------------- From 87526c46121bad91e7bf29d0220b6a9ceda5f8e8 Mon Sep 17 00:00:00 2001 From: stevenzdg988 Date: Tue, 11 Jul 2017 09:51:29 +0800 Subject: [PATCH 078/100] translated --- {sources/tech => translated}/20170529 Ubuntu GamePack.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources/tech => translated}/20170529 Ubuntu GamePack.md (100%) diff --git a/sources/tech/20170529 Ubuntu GamePack.md b/translated/20170529 Ubuntu GamePack.md similarity index 100% rename from sources/tech/20170529 Ubuntu GamePack.md rename to translated/20170529 Ubuntu GamePack.md From 5d9fb1844a05890995e408905243ecd92da30dde Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 11 Jul 2017 13:29:40 +0800 Subject: [PATCH 079/100] translating --- ...8 ways to contribute to open source when you have no time.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170622 8 ways to contribute to open source when you have no time.md b/sources/tech/20170622 8 ways to contribute to open source when you have no time.md index a5b52f6da9..ca41524d02 100644 --- a/sources/tech/20170622 8 ways to contribute to open source when you have no time.md +++ b/sources/tech/20170622 8 ways to contribute to open source when you have no time.md @@ -1,3 +1,5 @@ +translating----geekpi + 8 ways to contribute to open source when you have no time ============================================================ From d22489b14eddc8cb10c9c73fdc8b7f59e7f64fbf Mon Sep 17 00:00:00 2001 From: datastruct Date: Tue, 11 Jul 2017 15:03:15 +0800 Subject: [PATCH 080/100] Update 20170529 Ubuntu GamePack.md --- translated/20170529 Ubuntu GamePack.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/translated/20170529 Ubuntu GamePack.md b/translated/20170529 Ubuntu GamePack.md index 9607f442a9..fbda39385c 100644 --- a/translated/20170529 Ubuntu GamePack.md +++ b/translated/20170529 Ubuntu GamePack.md @@ -161,6 +161,7 @@ The main place to download the OS is from UALinux. The link from UALinux is [ht 下载此操作系统镜像的主要是来自 UALinux 。其下载链接是: [https://ualinux.com/en/download/category/25-ubuntu-gamepack][1]。 由于此链接来自国外,所以下载速度很慢。另一种选择是利用种子文件下载此操作系统。如果没有你想要下载的“传输”种子下载程序。你可以通过[https://zooqle.com/ubuntu-gamepack-16-04-i386-amd64-январь-2017-pc-vkn99.html][2] 此链接获得。这个种子文件下载可以下载 64 位和 32 位 的 ISO 镜像文件。 + The file sizes vary depending on the architecture you need. The 64-bit OS ISO file is 2.27 GB, while the 32-bit OS ISO file is 2.13 GB. 文件大小取决于您需要的架构。64 位操作系统 ISO 镜像文件大小是 2.27 GB,而 32 位的操作系统 ISO 镜像文件大小是 2.13 GB. @@ -216,6 +217,7 @@ Boot from the Ubuntu GamePack media and you should see a screen similar to Figur ![Figure 01.png](https://www.linux.org/attachments/figure-01-png.671/) **FIGURE 1** + **图 1** Once everything is loaded the installer can proceed with the installation. Figure 2 shows the next screen which allows you to specify your language and whether you want to install or try the GamePack. If you wish, you can click ‘Try Ubuntu’ to simply load it into memory and try it out without making changes to your drive. @@ -225,6 +227,7 @@ Once everything is loaded the installer can proceed with the installation. Figur ![Figure 02.png](https://www.linux.org/attachments/figure-02-png.672/) **FIGURE 2** + **图 2** Once you are ready to continue select ‘Install Ubuntu’. @@ -242,6 +245,7 @@ Once you have made your selections, press ‘Continue’. ![Figure 03.png](https://www.linux.org/attachments/figure-03-png.673/) **FIGURE 3** + **图 3** Next, you must specify how the drive will be configured for use as shown in Figure 4\. If you plan on using the whole drive, then it may be easier to leave the settings as they are and click ‘Install Now’. @@ -251,6 +255,7 @@ Next, you must specify how the drive will be configured for use as shown in Figu ![Figure 04.png](https://www.linux.org/attachments/figure-04-png.674/) **FIGURE 4** + **图 4** As shown in Figure 5 you will be prompted to verify your selection for configuring the hard drive. If you approve the changes then click ‘Continue’. @@ -260,6 +265,7 @@ As shown in Figure 5 you will be prompted to verify your selection for configuri ![Figure 05.png](https://www.linux.org/attachments/figure-05-png.675/) **FIGURE 5** + **图 5** Next you will be prompted to choose your Time Zone as shown in Figure 6\. Click ‘Continue’ once you have set your Time Zone. @@ -269,6 +275,7 @@ Next you will be prompted to choose your Time Zone as shown in Figure 6\. Click ![Figure 06.png](https://www.linux.org/attachments/figure-06-png.676/) **FIGURE 6** + **图 6** A window will appear, Figure 7, to allow you to set the default keyboard layout. Choose the correct layout and press ‘Continue’. @@ -278,6 +285,7 @@ A window will appear, Figure 7, to allow you to set the default keyboard layout. ![Figure 07.png](https://www.linux.org/attachments/figure-07-png.677/) **FIGURE 7** + **图 7** The last configuration screen is for you to set up a User account as shown in Figure 8\. Type in your name, computer name, User name, password and select if you need to type the password to log onto the system. You can also set to encrypt the Home Folder for this User. @@ -287,6 +295,7 @@ The last configuration screen is for you to set up a User account as shown in Fi ![Figure 08.png](https://www.linux.org/attachments/figure-08-png.678/) **FIGURE 8** + **图 8** The installation should proceed now by setting up the drive as specified. Files will be copied from the boot media to the hard drive as shown in Figure 9\. Once everything is copied to the drive and set up you will be prompted to remove the Boot Media to allow the system to restart. @@ -296,6 +305,7 @@ The installation should proceed now by setting up the drive as specified. Files ![Figure 09.png](https://www.linux.org/attachments/figure-09-png.679/) **FIGURE 9** + **图 9** After the restart, if you selected to require the User to log in, then you will be given a screen like Figure 10\. Here you enter the password you specified for the User and log onto Ubuntu GamePack. @@ -305,6 +315,7 @@ After the restart, if you selected to require the User to log in, then you will ![Figure 10.png](https://www.linux.org/attachments/figure-10-png.680/) **FIGURE 10** + **图 10** After you log onto Ubuntu GamePack you should probably try to perform any software upgrades which may be necessary. Open a Terminal and enter the following two commands: From d4f21127ab473736f30ce9d67b0e0d8bb87fc4ce Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 11 Jul 2017 15:45:46 +0800 Subject: [PATCH 081/100] PRF:20170525 An introduction to Linux s EXT4 filesystem.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @chenxinlong 翻译的很好,这么专业而有价值的文档确实是很难翻译好,我校对都花了好几天。 --- ...introduction to Linux s EXT4 filesystem.md | 117 +++++++++--------- 1 file changed, 58 insertions(+), 59 deletions(-) diff --git a/translated/tech/20170525 An introduction to Linux s EXT4 filesystem.md b/translated/tech/20170525 An introduction to Linux s EXT4 filesystem.md index 62e6933e26..0483716080 100644 --- a/translated/tech/20170525 An introduction to Linux s EXT4 filesystem.md +++ b/translated/tech/20170525 An introduction to Linux s EXT4 filesystem.md @@ -1,16 +1,15 @@ -Linux 的 EXT4 文件系统简介 +Linux 的 EXT4 文件系统的历史、特性以及最佳实践 ============================================================ > 让我们大概地从 EXT4 的历史、特性以及最佳实践这几个方面来学习它和之前的几代 EXT 文件系统有何不同。 +在之前关于 Linux 文件系统的文章里,我写过一篇 [Linux 文件系统介绍][12] 和一些更高级的概念例如 [一切都是文件][13]。现在我想要更深入地了解 EXT 文件系统的特性的详细内容,但是首先让我们来回答一个问题,“什么样才算是一个文件系统 ?” 一个文件系统应该涵盖以下所有特点: -在之前关于 Linux 文件系统的文章里,我写过一篇 [Linux 文件系统介绍][12] 和一些更高级的概念例如 [一切都是文件][13]。 我想要更深入地了解 EXT 文件系统的特性的详细内容,但是首先让我们来回答一个问题,“什么样才算是一个文件系统 ?” 一个文件系统应该涵盖以下所有特点: - -1. **数据存储:** 对于任何一个文件系统来说,一个最主要的功能就是能够被当作一个容器结构来存储和取得数据。 -2. **命名空间:** 命名空间是一个提供了命名规则和数据结构的用于命名与组织的方法学。 -3. **安全模型:** 一个用于定义访问权限的策略。 -4. **API:** 调用操作这个系统的对象的系统方法,这些对象诸如目录和文件。 -5. **实现:** 能够实现以上几点的软件。 +1. **数据存储:** 对于任何一个文件系统来说,一个最主要的功能就是能够被当作一个结构化的容器来存储和获取数据。 +2. **命名空间:** 命名空间是一个提供了用于命名与组织数据的命名规则和数据结构的方法学。 +3. **安全模型:** 一个用于定义访问权限的策略。 +4. **API:** 操作这个系统的对象的系统功能调用,这些对象诸如目录和文件。 +5. **实现:** 能够实现以上几点的软件。 本文内容的讨论主要集中于上述几点中的第一项,并探索为一个 EXT 文件系统的数据存储提供逻辑框架的元数据结构。 @@ -25,17 +24,17 @@ Linux 的 EXT4 文件系统简介 Minix 有以下这些结构,其中的大部分位于生成文件系统的分区中: * [**引导扇区**][6] 是硬盘安装后的第一个扇区。这个引导块包含了一个非常小的引导记录和一个分区表。 -* 每一个分区的第一个块都是一个包含了元数据的**超级块(superblock)** ,这些元数据定义了其他文件系统的结构并将其定位于物理硬盘的具体分区上。 +* 每一个分区的第一个块都是一个包含了元数据的**超级块(superblock)** ,这些元数据定义了其他的文件系统结构并将其定位于物理硬盘的具体分区上。 * 一个 **inode 位图块** 决定了哪些 inode 是在使用中的,哪一些是未使用的。 * **inode** 在硬盘上有它们自己的空间。每一个 inode 都包含了一个文件的信息,包括其所处的数据块的位置,也就是该文件所处的区域。 -* 一个 **区位图** 用于保持追踪数据区域的使用和未使用情况。 -* 一个 **数据区**, 这里是数据存储的地方。 +* 一个 **区位图** 用于保持追踪数据区域的使用和未使用情况。 +* 一个 **数据区**, 这里是数据存储的地方。 -对上述了两种位图类型来说,一个位(bit)表示一个指定的数据区或者一个指定的 inode。 如果这个位是 0 则表示这个数据区或者这个 inode 是可用的,如果是 1 则表示正在使用中。 +对上述了两种位图类型来说,一个位(bit)表示一个指定的数据区或者一个指定的 inode。 如果这个位是 0 则表示这个数据区或者这个 inode 是未使用的,如果是 1 则表示正在使用中。 那么,[inode][17] 又是什么呢 ? 就是 index-node (索引节点)的简写。 inode 是位于磁盘上的一个 256 字节的块,用于存储和该 inode 对应的文件的相关数据。这些数据包含了文件的大小、文件的所有者和所属组的用户 ID、文件模式(即访问权限)以及三个时间戳用于指定:该文件最后的访问时间、该文件的最后修改时间和该 inode 中的数据的最后修改时间。 -同时,这个 inode 还包含了指向了其所对应的文件的数据在硬盘中的位置。在 Minix 和 EXT 1-3 文件系统中,这是一个数据区和块的列表。Minix 文件系统的 inode 支持 9 个数据块,包括 7 个直接数据块和 2 个间接数据块。如果你想要更深入的了解,这里有一个优秀的 PDF 详细地描述了 [Minix 文件系统结构][18] 。同时你也可以在维基百科上对 [inode 指针结构][19] 做一个快速了解。 +同时,这个 inode 还包含了位置数据,指向了其所对应的文件数据在硬盘中的位置。在 Minix 和 EXT 1-3 文件系统中,这是一个数据区和块的列表。Minix 文件系统的 inode 支持 9 个数据块,包括 7 个直接数据块和 2 个间接数据块。如果你想要更深入的了解,这里有一个优秀的 PDF 详细地描述了 [Minix 文件系统结构][18] 。同时你也可以在维基百科上对 [inode 指针结构][19] 做一个快速了解。 ### EXT @@ -43,17 +42,17 @@ Minix 有以下这些结构,其中的大部分位于生成文件系统的分 ### EXT2 -[EXT2 文件系统][22] 就相当地成功,它在 Linux 发行版中存活了多年。它是我在 1997 年开始使用 Red Hat Linux 5.0 时接触的第一个文件系统。实际上,EXT2 文件系统有着和 EXT 文件系统基本相同的元数据结构。然而 EXT2 更高瞻远瞩,因为其元数据结构之间留有很多磁盘空间供将来使用。 +[EXT2 文件系统][22] 就相当地成功,它在 Linux 发行版中存活了多年。它是我在 1997 年开始使用 Red Hat Linux 5.0 时接触的第一个文件系统。实际上,EXT2 文件系统有着和 EXT 文件系统基本相同的元数据结构。然而 EXT2 更高瞻远瞩,因为其元数据结构之间留有很多供将来使用的磁盘空间。 -和 Minix 类似,EXT2 也有一个[引导扇区][23] ,它是硬盘安装后的第一个扇区。它包含了非常小的引导记录和一个分区表。接着引导扇区之后是一些保留的空间,它填充了引导记录和硬盘驱动器上的第一个分区(通常位于下一个柱面的)之间的空间。[GRUB2][24] - 也可能是 GRUB1 - 将此空间用于其部分引导代码。 +和 Minix 类似,EXT2 也有一个[引导扇区][23] ,它是硬盘安装后的第一个扇区。它包含了非常小的引导记录和一个分区表。接着引导扇区之后是一些保留的空间,它填充了引导记录和硬盘驱动器上的第一个分区(通常位于下一个柱面)之间的空间。[GRUB2][24] - 也可能是 GRUB1 - 将此空间用于其部分引导代码。 -每个 EXT2 分区中的空间被分为柱面组,它允许更精细地管理数据空间。 根据我的经验,每一组大小通常约为 8MB。 下面的图 1 显示了一个柱面组的基本结构。 柱面中的数据分配单元是块,通常大小为 4K。 +每个 EXT2 分区中的空间被分为柱面组(cylinder group),它允许更精细地管理数据空间。 根据我的经验,每一组大小通常约为 8MB。 下面的图 1 显示了一个柱面组的基本结构。 柱面中的数据分配单元是块,通常大小为 4K。 ![cylindergroup-01_1.png](https://opensource.com/sites/default/files/images/life-uploads/cylindergroup-01_1.png) *图 1: EXT 文件系统中的柱面组的结构* -柱面组中的第一个块是一个超级块(superblock),它包含了一个元数据,定义了其它文件系统的结构并将其定位于物理硬盘的具体分区上。分区中有一些柱面组还会有备用超级块,但并不是所有的柱面组都有。我们还可以使用例如 `dd` 等磁盘工具来拷贝备用超级块的内容到主超级块上,以达到修复损坏的超级块的目的。虽然这种情况不会经常发生,但是在几年前我的一个超级块损坏了,我就是用这种方法来修复的。幸好,我很有先见之明地使用了 `dumpe2fs` 命令来备份了我的分区描述符信息到我的系统上。 +柱面组中的第一个块是一个超级块(superblock),它包含了元数据,定义了其它文件系统的结构并将其定位于物理硬盘的具体分区上。分区中有一些柱面组还会有备用超级块,但并不是所有的柱面组都有。我们可以使用例如 `dd` 等磁盘工具来拷贝备用超级块的内容到主超级块上,以达到修复损坏的超级块的目的。虽然这种情况不会经常发生,但是在几年前我的一个超级块损坏了,我就是用这种方法来修复的。幸好,我很有先见之明地使用了 `dumpe2fs` 命令来备份了我的系统上的分区描述符信息。 以下是 `dumpe2fs` 命令的一部分输出。这部分输出主要是超级块上包含的一些元数据,同时也是文件系统上的前两个柱面组的数据。 @@ -139,23 +138,23 @@ Group 3: (Blocks 98304-131071) <截断> ``` -每一个柱面组都有自己的 inode 位图,用于判定该柱面组中的哪些 inode 是使用中的而哪些又是未被使用的。每一个柱面组的 inode 都有它们自己的空间。每一个 inode 都包含了对应的文件的相关信息,包括其位于该文件的数据块中的位置。这个块位图纪录了文件系统中的使用中和非使用中的数据块。请注意,在上面的输出中有大量关于文件系统的数据。在非常大的文件系统上,组数据可以运行到数百页的长度。 组元数据包括组中所有空闲数据块的列表。 +每一个柱面组都有自己的 inode 位图,用于判定该柱面组中的哪些 inode 是使用中的而哪些又是未被使用的。每一个柱面组的 inode 都有它们自己的空间。每一个 inode 都包含了一个文件的相关信息,包括属于该文件的数据块的位置。而块位图纪录了文件系统中的使用中和非使用中的数据块。请注意,在上面的输出中有大量关于文件系统的数据。在非常大的文件系统上,柱面组的数据可以多达数百页的长度。柱面组的元数据包括组中所有空闲数据块的列表。 EXT 文件系统实现了数据分配策略以确保产生最少的文件碎片。减少文件碎片可以提高文件系统的性能。这些策略会在下面的 EXT4 中描述到。 -我所遇见的关于 EXT2 文件系统最大的问题是 `fsck` (文件系统检查) 程序这一环节占用了很长一段时间来定位和校准文件系统中的所有的不一致性,从而导致一次系统崩溃(crash)后其会花费了数个小时来修复。有一次我的其中一台电脑在崩溃后重新启动时共花费了 28 个小时恢复磁盘,并且是在磁盘被检测量只有几百兆字节大小的情况下。 +我所遇见的关于 EXT2 文件系统最大的问题是 `fsck` (文件系统检查) 程序这一环节占用了很长一段时间来定位和校准文件系统中的所有的不一致性,从而导致在系统崩溃(crash)后其会花费了数个小时来修复。有一次我的其中一台电脑在崩溃后重新启动时共花费了 28 个小时恢复磁盘,而且并且是在磁盘被检测量只有几百兆字节大小的情况下。 ### EXT3 -[EXT3 文件系统][25] 应一个目标而生,就是克服 `fsck` 程序需要完全恢复在文件更新操作期间发生的不正确关机而损坏的磁盘结构所需的大量时间。它对 EXT 文件系统的唯一新增功能是 [日志][26],它将提前记录将对文件系统执行的更改。 EXT3 的磁盘结构的其余部分与 EXT2 中的相同。 +[EXT3 文件系统][25]是应一个目标而生的,就是克服 `fsck` 程序需要完全恢复在文件更新操作期间发生的不正确关机而损坏的磁盘结构所需的大量时间。它对 EXT 文件系统的唯一新增功能就是 [日志][26],它将提前记录将对文件系统执行的更改。 EXT3 的磁盘结构的其余部分与 EXT2 中的相同。 -除了直接写入数据到磁盘的数据区域外,同先前的版本一样,EXT3 写入文件数据的日志随同元数据写入到磁盘上的一个指定数据区域。一旦这些数据安全地到达硬盘,它就可以几乎零丢失率地被合并或者被追加到目标文件。当这些数据被提交到磁盘上的数据区域上,这些日志就会随即更新,这样在日志中的所有数据提交之前,系统发生故障时文件系统将保持一致状态。在下次启动时,将检查文件系统的不一致性,然后将日志中保留的数据提交到磁盘的数据区,以完成对目标文件的更新。 +除了同先前的版本一样直接写入数据到磁盘的数据区域外,EXT3 上的日志会将文件数据随同元数据写入到磁盘上的一个指定数据区域。一旦这些(日志)数据安全地到达硬盘,它就可以几乎零丢失率地被合并或被追加到目标文件上。当这些数据被提交到磁盘上的数据区域上,这些日志就会随即更新,这样在日志中的所有数据提交之前,系统发生故障时文件系统将保持一致状态。在下次启动时,将检查文件系统的不一致性,然后将仍保留在日志中的数据提交到磁盘的数据区,以完成对目标文件的更新。 -日志功能确实降低了数据写入性能,但是有三个可用于日志的选项,允许用户在性能和数据完整性和安全性之间进行选择。 我的个人更偏向于选择安全性,因为我的环境不需要大量的磁盘写入活动。 +日志功能确实降低了数据写入性能,但是有三个可用于日志的选项,允许用户在性能和数据完整性、安全性之间进行选择。 我的个人更偏向于选择安全性,因为我的环境不需要大量的磁盘写入活动。 -日志功能将失败后检查硬盘驱动器所需的时间从减少了从几小时(甚至几天)减少到几分钟。 多年来,我遇到了很多导致了我的系统崩溃的问题。要详细说的话恐怕还得再写一篇文章,但这需要说明的是大多数是我自己造成的,就比如不小心踢掉一个电源插头。 幸运的是,EXT 日志文件系统将启动恢复时间缩短到两三分钟。 此外,自从我开始使用带日志记录的 EXT3,我从来没有遇到丢失数据的问题。 +日志功能将失败后检查硬盘驱动器所需的时间从几小时(甚至几天)减少到了几分钟。 多年来,我遇到了很多导致我的系统崩溃的问题。要详细说的话恐怕还得再写一篇文章,但这里需要说明的是大多数是我自己造成的,就比如不小心踢掉电源插头。 幸运的是,EXT 日志文件系统将启动恢复时间缩短到两三分钟。此外,自从我开始使用带日志记录的 EXT3,我从来没有遇到丢失数据的问题。 -EXT3 的日志功能可以关闭,然后其功能就等同于 EXT2 文件系统了。 该日志本身仍然是存在的,只是状态为空且未使用。 只需 `mount` 命令使用文件系统类型参数来重新挂载即可指定为 EXT2。 你可以从命令行执行此操作,但是具体还是取决于你正在使用的文件系统,但你可以更改 `/etc/fstab` 文件中的类型说明符,然后重新启动。 我强烈建议不要将 EXT3 文件系统安装为 EXT2 ,因为这会具有丢失数据和增加恢复时间的潜在可能性。 +EXT3 的日志功能可以关闭,然后其功能就等同于 EXT2 文件系统了。 该日志本身仍然是存在的,只是状态为空且未使用。 只需在 `mount` 命令中使用文件系统类型参数来重新挂载即可指定为 EXT2。 你可以从命令行执行此操作,但是具体还是取决于你正在使用的文件系统,不过你也可以更改 `/etc/fstab` 文件中的类型说明符,然后重新启动。 我强烈建议不要将 EXT3 文件系统挂载为 EXT2 ,因为这会有丢失数据和增加恢复时间的潜在可能性。 EXT2 文件系统可以使用如下命令来通过日志升级到 EXT3 。 @@ -163,80 +162,80 @@ EXT2 文件系统可以使用如下命令来通过日志升级到 EXT3 。 tune2fs -j /dev/sda1 ``` -`/dev/sda1` 表示驱动器和分区的标识符。同时要注意修改 `/etc/fstab` 中的文件系统类型标识符并重新挂载分区或者重启系统以确保修改生效。 +`/dev/sda1` 表示驱动器和分区的标识符。同时要注意修改 `/etc/fstab` 中的文件系统类型标识符并重新挂载分区,或者重启系统以确保修改生效。 ### EXT4 -[EXT4 文件系统][27]主要提高了性能、可靠性和容量。为了提高可靠性,它新增了元数据和日志校验和。同时为了满足各种关键任务要求,文件系统新增了纳秒级别的时间戳。在时间戳字段中添加两个高位来延缓时间戳的 [2038 年的问题][28] ,这样 EXT4 文件系统至少可达到 2446 年。 +[EXT4 文件系统][27]主要提高了性能、可靠性和容量。为了提高可靠性,它新增了元数据和日志校验和。同时为了满足各种关键任务要求,文件系统新增了纳秒级别的时间戳,并在时间戳字段中添加了两个高位来延缓时间戳的 [2038 年问题][28] ,这样 EXT4 文件系统至少可用到 2446 年。 -在 EXT4 中,数据分配从固定块更改为盘区(extent),盘区由硬盘驱动器上的开始和结束位置来描述。这使得可以在单个 inode 指针条目中描述非常长的物理上连续的文件,这可以显著减少描述大文件中所有数据的位置所需的指针数。 其它在 EXT4 中已经实施的分配策略可以进一步减少碎片化。 +在 EXT4 中,数据分配从固定块改为扩展盘区(extent)方式,扩展盘区由硬盘驱动器上的开始和结束位置来描述。这使得可以在单个 inode 指针条目中描述非常长的物理上连续的文件,这可以显著减少描述大文件中所有数据的位置所需的指针数。其它在 EXT4 中已经实施的分配策略可以进一步减少碎片化。 -EXT4 通过将新创建的文件分散在磁盘上,从而使其不会像早期的 PC 文件系统一样全部聚集在磁盘起始位置,从而减少了碎片。文件分配算法尝试在柱面组中尽可能均匀地散布文件,并且当文件需要分段存储时,要使不连续的文件盘区尽可能靠近同一文件中的其他部分,以尽可能减少磁头搜索和电机旋转等待时间。当创建新文件或扩展现有文件时,使用其它策略来预先分配额外的磁盘空间。这有助于确保扩展文件时不会自动导致其分段。新文件不会在现有文件之后立即分配空间,这也可以防止现有文件的碎片化。 +EXT4 通过将新创建的文件散布在磁盘上,使其不会像早期的 PC 文件系统一样全部聚集在磁盘起始位置,从而减少了碎片。文件分配算法尝试在柱面组中尽可能均匀地散布文件,并且当文件(由于太大)需要分段存储时,使不连续的文件扩展盘区尽可能靠近同一文件中的其他部分,以尽可能减少磁头寻道和电机旋转等待时间。当创建新文件或扩展现有文件时,使用其它策略来预先分配额外的磁盘空间。这有助于确保扩展文件时不会自动导致其分段。新文件不会紧挨这现有文件立即分配空间,这也可以防止现有文件的碎片化。 -除了磁盘上数据的实际位置外,EXT4 使用诸如延迟分配的功能策略,以允许文件系统在分配空间之前收集正在写入磁盘的所有数据。这可以提高数据空间将是连续的可能性。 +除了磁盘上数据的实际位置外,EXT4 使用诸如延迟分配的功能策略,以允许文件系统在分配空间之前收集到所有正在写入磁盘的数据,这可以提高数据空间连续的可能性。 -较旧的EXT文件系统(如 EXT2 和 EXT3)可以作为 EXT4 进行 mount ,以使其性能获得较小的提升。不幸的是,这需要关闭 EXT4 的一些重要的新功能,所以我建议不要这样做。 +较旧的 EXT 文件系统(如 EXT2 和 EXT3)可以作为 EXT4 进行 `mount` ,以使其性能获得较小的提升。但不幸的是,这需要关闭 EXT4 的一些重要的新功能,所以我建议不要这样做。 -自 Fedora 14 以来,EXT4 一直是 Fedora 的默认文件系统。我们可以使用 Fedora 文档中描述的 [procedure ][29] 将EXT3文件系统升级到EXT4,但是由于之前仍然存留d的 EXT3 元数据结构,它的性能仍将受到影响。从 EXT3 升级到 EXT4 的最佳方法是备份目标文件系统分区上的所有数据,使用 **mkfs** 命令将空EXT4文件系统写入分区,然后从备份中恢复所有数据。 +自 Fedora 14 以来,EXT4 一直是 Fedora 的默认文件系统。我们可以使用 Fedora 文档中描述的 [流程][29] 将 EXT3 文件系统升级到 EXT4,但是由于仍然存留的之前的 EXT3 元数据结构,它的性能仍将受到影响。从 EXT3 升级到 EXT4 的最佳方法是备份目标文件系统分区上的所有数据,使用 `mkfs` 命令将空 EXT4 文件系统写入分区,然后从备份中恢复所有数据。 ### Inode -以前描述的 inode 是EXT文件系统中的元数据的关键组件。 图 2 显示了 inode 和存储在硬盘驱动器上的数据之间的关系。 该图是单个文件的目录和 inode,在这种情况下,可能会产生高度碎片。 EXT 文件系统可以积极地减少碎片,所以不太可能会看到有这么多间接数据块或扩展盘的文件。 实际上,如下所示,EXT文件系统中的碎片非常低,所以大多数 inode 只使用一个或两个直接数据指针,也不使用间接指针。 +之前介绍过的 inode 是 EXT 文件系统中的元数据的关键组件。 图 2 显示了 inode 和存储在硬盘驱动器上的数据之间的关系。 该图是单个文件的目录和 inode,在这种情况下,可能会产生高度碎片化。 EXT 文件系统可以主动地减少碎片,所以不太可能会看到有这么多间接数据块或扩展盘区的文件。 实际上,你在下面将会看到,EXT 文件系统中的碎片非常低,所以大多数 inode 只使用一个或两个直接数据指针,而不使用间接指针。 ![inodesanddataallocation-01_0.png](https://opensource.com/sites/default/files/images/life-uploads/inodesanddataallocation-01_0.png) -图 2 :inode 存储有关每个文件的信息,并使 EXT 文件系统能够查找属于它的所有数据。 +*图 2 :inode 存储有关每个文件的信息,并使 EXT 文件系统能够查找属于它的所有数据。* -inode 不包含文件的名称。通过目录条目访问文件,目录条目本身是文件的名称,并包含指向 inode 的指针。该指针的值是 inode 号。文件系统中的每个 inode 都具有唯一的 ID 号,但同一台计算机上的其他文件系统(甚至相同的硬盘驱动器)中的 inode 可以具有相同的 inode 号。这对[links][30] 存在影响,但是这个讨论超出了本文的范围。 +inode 不包含文件的名称。通过目录项访问文件,目录项本身就是文件的名称,并包含指向 inode 的指针。该指针的值是 inode 号。文件系统中的每个 inode 都具有唯一的 ID 号,但同一台计算机上的其它文件系统(甚至是相同的硬盘驱动器)中的 inode 可以具有相同的 inode 号。这对 [硬链接][30] 存在影响,但是这个讨论超出了本文的范围。 -inod e包含有关该文件的元数据,包括其类型和权限以及其大小。 inode 还包含 15 个指针的空格,用于描述柱面组数据部分中数据块或扩展区的位置和长度。十二个指针提供对数据扩展区的直接访问,并且应该足以处理大多数文件。然而,对于具有重大分段的文件,有必要以间接节点的形式具有一些附加功能。从技术上讲,这些不是真正的节点,所以我在这里使用这个术语“节点”来方便。 +inode 包含有关该文件的元数据,包括其类型和权限以及其大小。 inode 还包含 15 个指针的空位,用于描述柱面组数据部分中数据块或扩展盘区的位置和长度。12 个指针提供对数据扩展盘区的直接访问,应该足以满足大多数文件的需求。然而,对于具有明显分段的文件,需要以间接节点(node)的形式提供一些额外的容量——从技术上讲,这些不是真正的“inode”,所以为了方便起见我在这里使用这个术语“节点(node)”。 -间接节点是文件系统中的正常数据块,它仅用于描述数据而不用于存储元数据,因此可以支持超过 15 个条目。例如,4K 的块大小可以支持 512 个 4 字节间接节点,允许单个文件的 **12(直接)+ 512(间接)= 524** 范围。还支持双重和三重间接节点支持,但我们大多数人不太可能遇到需要许多扩展的文件。 +间接节点是文件系统中的正常数据块,它仅用于描述数据而不用于存储元数据,因此可以支持超过 15 个条目。例如,4K 的块大小可以支持 512 个 4 字节的间接节点,允许单个文件有 **12(直接)+ 512(间接)= 524** 个扩展盘区。还支持双重和三重间接节点,但我们大多数人不太可能遇到需要那么多扩展盘区的文件。 ### 数据碎片 -对于许多较旧的 PC 文件系统,如 FAT(及其所有变体)和 NTFS,碎片一直是导致磁盘性能下降的重大问题。 碎片整理对于其本身和一些专门的整理软件来说已经称为了一项专门的工程,其效果范围从非常有效到仅仅是微乎其微。 +对于许多较旧的 PC 文件系统,如 FAT(及其所有变体)和 NTFS,碎片一直是导致磁盘性能下降的重大问题。 碎片整理本身就成为一个行业,有各种品牌的整理软件,其效果范围从非常有效到仅仅是微乎其微。 -Linux 的扩展文件系统使用数据分配策略,有助于最小化硬盘驱动器上的文件碎片,并在发生碎片时减少碎片的影响。 你可以使用 EXT 文件系统上的 **fsck** 命令检查文件系统的整体碎片。 以下示例检查主工作站的主目录,只有 1.5% 的碎片。 确保使用 **- n** 参数,因为它会阻止 **fsck** 对扫描文件系统采取的任何操作。 +Linux 的扩展文件系统使用数据分配策略,有助于最小化硬盘驱动器上的文件碎片,并在发生碎片时减少碎片的影响。 你可以使用 EXT 文件系统上的 `fsck` 命令检查整个文件系统的碎片。 以下示例检查我的主工作站的家目录,只有 1.5% 的碎片。 确保使用 `-n` 参数,因为它会防止 `fsck` 对扫描的文件系统采取任何操作。 ``` fsck -fn /dev/mapper/vg_01-home ``` -我曾经进行过一些理论计算,以确定磁盘碎片整理是否会导致任何明显的性能提升。 虽然我做了一些假设,我使用的磁盘性能数据来自一个新的 300GB 的西部数字硬盘驱动器,具有 2.0ms 的追踪到追踪时间。 此示例中的文件数是在计算当天文件系统中存在的实际数。 我假设有相当大量的碎片文件(约 20%)每天都会被触动。 +我曾经进行过一些理论计算,以确定磁盘碎片整理是否会产生任何明显的性能提升。 我做了一些假设条件,我使用的磁盘性能数据来自一个新的 300GB 的西部数字硬盘驱动器,具有 2.0ms 的轨到轨寻道时间。 此示例中的文件数是我在计算的当天的文件系统中存在的实际数。 我假设每天有相当大量的碎片化文件(约 20%)会被用到。 -| **Total files** | **271,794** | -|--|--| -| % fragmentation | 5.00% | -| Discontinuities | 13,590 | +| **全部文件** | **271,794** | +|---|---| +| 碎片率 % | 5.00% | +| 不连续数 | 13,590 | |   |   | -| % fragmented files touched per day | 20% (assume) | -| Number of additional seeks | 2,718 | -| Average seek time | 10.90 ms | -| Total additional seek time per day | 29.63 sec | +| % 每天用到的碎片化文件 | 20% (假设) | +| 额外寻道次数 | 2,718 | +| 平均寻道时间 | 10.90 ms | +| 每天全部的额外寻道时间 | 29.63 sec | |   | 0.49 min | |   |   | -| Track-to-track seek time | 2.00 ms | -| Total additional seek time per day | 5.44 sec | +| 轨到轨寻道时间 | 2.00 ms | +| 每天全部的额外寻道时间 | 5.44 sec | |   | 0.091 min | -表 1: 碎片对磁盘性能的理论影响 +*表 1: 碎片对磁盘性能的理论影响* -我对每天的全部追加寻道时间进行了两次计算,一次是单磁道寻道时间,这是由于EXT文件分配策略而导致大多数文件的可能性更大的情况,一个是平均搜索时间,我认为这将是一个公平的最坏情况。 +我对每天的全部的额外寻道时间进行了两次计算,一次是轨到轨寻道时间,这是由于 EXT 文件分配策略而导致大多数文件最可能的情况,一个是平均寻道时间,我假设这是一个合理的最坏情况。 -从表 1 可以看出,对绝大多数应用程序而言,碎片化对具有甚至适度性能的硬盘驱动器的现代EXT文件系统的影响将是微乎其微的。您可以将您的环境中的数字插入到您自己的类似电子表格中,以了解你对性能影响的期望。这种类型的计算不一定能够代表实际的性能,但它可以提供一些洞察碎片化及其对系统的理论影响。 +从表 1 可以看出,对绝大多数应用程序而言,碎片化甚至对性能适中的硬盘驱动器上的现代 EXT 文件系统的影响是微乎其微的。您可以将您的环境中的数字插入到您自己的类似电子表格中,以了解你对性能影响的期望。这种类型的计算不一定能够代表实际的性能,但它可以提供一些对碎片化及其对系统的理论影响的洞察。 -我的大部分分区的碎片率都在 1.5% 左右或 1.6%,我有一个分区有 3.3% 的碎片,但是这是一个大的 128GB 文件系统,具有少于100 个非常大的 ISO 映像文件; 多年来,我不得不扩张分区,因为它已经太满了。 +我的大部分分区的碎片率都在 1.5% 左右或 1.6%,我有一个分区有 3.3% 的碎片,但是这是一个大约 128GB 文件系统,具有不到 100 个非常大的 ISO 映像文件;多年来,我扩展过该分区几次,因为它已经太满了。 -这并不是说一些应用的环境不需要更多的保证,甚至更少的碎片。 EXT 文件系统可以由有经验和知识的管理员小心调整,管理员可以调整参数以抵消特定的工作负载类型。这个工作可以在文件系统创建的时候或稍后使用 **tune2fs** 命令时完成。每一次调整变化的结果应进行测试,精心的记录和分析,以确保目标环境的最佳性能。在最坏的情况下,如果性能不能提高到期望的水平,则其他文件系统类型可能更适合特定的工作负载。并记住,在单个主机系统上使用混合文件系统类型以匹配放在每个文件系统上的负载是常见的。 +这并不是说一些应用的环境并不需要更少的碎片的环境。 EXT 文件系统可以由有经验和知识的管理员小心调整,管理员可以针对特定的工作负载类型调整参数。这个工作可以在文件系统创建的时候或稍后使用 `tune2fs` 命令时完成。每一次调整变化的结果应进行测试,精心的记录和分析,以确保目标环境的最佳性能。在最坏的情况下,如果性能不能提高到期望的水平,则其他文件系统类型可能更适合特定的工作负载。并记住,在单个主机系统上混用文件系统类型以匹配每个文件系统上的不同负载是常见的。 -由于大多数 EXT 文件系统的碎片数量较少,因此无需进行碎片整理。在任何情况下,EXT 文件系统都没有安全的碎片整理工具。有几个工具允许你检查单个文件的碎片或文件系统中剩余可用空间的碎片。有一个工具,**e4defrag**,它将对剩余可用空间允许的文件,目录或文件系统进行碎片整理。顾名思义,它只适用于 EXT4 文件系统中的文件,并且它还有一其它的些限制。 +由于大多数 EXT 文件系统的碎片数量较少,因此无需进行碎片整理。目前,EXT 文件系统没有安全的碎片整理工具。有几个工具允许你检查单个文件的碎片程度或文件系统中剩余可用空间的碎片程度。有一个工具,`e4defrag`,它可以对允许使用的剩余可用空间、目录或文件系统进行碎片整理。顾名思义,它只适用于 EXT4 文件系统中的文件,并且它还有一其它的些限制。 -如果有必要在 EXT 文件系统上执行完整的碎片整理,则只有一种方法能够可靠地工作。你必须将文件系统中的所有要进行碎片整理的文件在确保在安全复制到其他位置后将其删除。如果可能,你可以增加文件系统的大小,以帮助减少将来的碎片。然后将文件复制回目标文件系统。但是其实即使这样也不能保证所有文件都被完全碎片整理。 +如果有必要在 EXT 文件系统上执行完整的碎片整理,则只有一种方法能够可靠地工作。你必须将文件系统中的所有要进行碎片整理的文件移动从而进行碎片整理,并在确保安全复制到其他位置后将其删除。如果可能,你可以增加文件系统的大小,以帮助减少将来的碎片。然后将文件复制回目标文件系统。但是其实即使这样也不能保证所有文件都被完全去碎片化。 ### 总结 -EXT 文件系统在一些 Linux 发行版本上作为默认文件系统已经超过二十多年了。它们用最少的维护代价提供了稳定性、高可用性、可靠性和其他各种表现。我尝试过一些其它的文件系统但最终都还是回归到 EXT。每一个我在工作中使用到 Linux 的地方都使用到了 EXT 文件系统,同时发现了它们适用于任何主流的负载。毫无疑问,EXT4 文件系统应该被用于大部分的 Linux 文件系统上,除非我们有明显的使用其它文件系统的理由。 +EXT 文件系统在一些 Linux 发行版本上作为默认文件系统已经超过二十多年了。它们用最少的维护代价提供了稳定性、高可用性、可靠性和性能。我尝试过一些其它的文件系统但最终都还是回归到 EXT。每一个我在工作中使用到 Linux 的地方都使用到了 EXT 文件系统,同时我发现了它们适用于任何主流负载。毫无疑问,EXT4 文件系统应该被用于大部分的 Linux 文件系统上,除非我们有明显需要使用其它文件系统的理由。 -------------------------------------------------------------------------------- @@ -249,9 +248,9 @@ David Both - David Both 是一名 Linux 于开源的贡献者,目前居住在 via: https://opensource.com/article/17/5/introduction-ext4-filesystem -作者:[David Both ][a] +作者:[David Both][a] 译者:[chenxinlong](https://github.com/chenxinlong) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From eee390b26c85d5b314376f925eab1d14872de746 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 11 Jul 2017 15:46:05 +0800 Subject: [PATCH 082/100] PUB:20170525 An introduction to Linux s EXT4 filesystem.md @chenxinlong https://linux.cn/article-8685-1.html --- .../20170525 An introduction to Linux s EXT4 filesystem.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20170525 An introduction to Linux s EXT4 filesystem.md (100%) diff --git a/translated/tech/20170525 An introduction to Linux s EXT4 filesystem.md b/published/20170525 An introduction to Linux s EXT4 filesystem.md similarity index 100% rename from translated/tech/20170525 An introduction to Linux s EXT4 filesystem.md rename to published/20170525 An introduction to Linux s EXT4 filesystem.md From 88dd6d54833e19ac4a219c00893b302932e620c5 Mon Sep 17 00:00:00 2001 From: stevenzdg988 Date: Tue, 11 Jul 2017 16:33:33 +0800 Subject: [PATCH 083/100] stevenzdg988 translating --- translated/tech/20170529 Ubuntu GamePack.md | 339 ++++++++++++++++++++ 1 file changed, 339 insertions(+) create mode 100644 translated/tech/20170529 Ubuntu GamePack.md diff --git a/translated/tech/20170529 Ubuntu GamePack.md b/translated/tech/20170529 Ubuntu GamePack.md new file mode 100644 index 0000000000..9607f442a9 --- /dev/null +++ b/translated/tech/20170529 Ubuntu GamePack.md @@ -0,0 +1,339 @@ +Ubuntu GamePack +=============== + + +A lot of people who like to use their Linux system for gaming. There seems to be no shortage of gaming systems which can supply access to games. UALinux is a Ukrainian company which promotes the use of GNU/Linux. UALinux has created a Ubuntu version to fill the gap for gaming. The Operating System (OS) is called Ubuntu GamePack and is based off of Ubuntu 16.04. + + +很大一部分 Linux 爱好者喜欢用他们的系统玩游戏。现在看起来能够可以支持游戏的游戏系统很短缺。UALinux 是一家推广使用 GNU/Linux 的乌克兰公司。UALinux 开发了一个 Ubuntu 版本填补了这一空白。把这个基于 Ubuntu 16.04 的操作系统(OS)命名为 Ubuntu GamePack . + +**Contents** + +** 内容 ** + +The list of games would be quite extensive but the company claims there is access to over 22,381 games. + +游戏现在已经相当广泛,但是游戏公司已经宣称可以访问超过22,381款游戏。 + +The GamePack includes Lutris and Steam to allow you access to the specific gaming services the distributer provides. + +GamePack 包括 Lutris 和 Steam 两部分,允许您访问分发商提供的定制游戏服务。 + +For Windows-based games there is PlayOnLinux, WINE and CrossOver so the games will run on Linux. + +对于基于 Windows 的游戏,有 PlayOnLinux,WINE 和 CrossOver 转换到 Linux 上运行。 + +For DOS games you can run the games in DosBox which is a DOS emulator for Linux. + +对于 DOS 游戏,您可以在 DosBox 中运行游戏,这是一个 Linux 的 DOS 模拟器 + +Sparky APTus Gamer is also installed to allow access to numerous gaming console emulators. The emulators include: + +Sparky APTus Gamer 被安装应用允许访问众多游戏控制模拟器。 模拟器包括: + +*   AdvanceMENU – front-end for AdvanceMAME, AdvanceMESS, MAME, MESS, xmame, Raine and other emulators + +*  AdvanceMENU - 前端包括 AdvanceMAME, AdvanceMESS, MAME, MESS, xmame, Raine 以及其他的模拟器 + +*   Atari800 - emulator for Atari 8-bit systems, XE Game System and Atari 5200 SuperSystem + +*  Atari800 - Atari 8位系统的模拟器,XE 游戏系统和 Atari 5200 超级系统 + +*   DeSmuME - Nintendo DS emulator + +*   DeSmuME - Nintendo DS 模拟器 + +*   Desura - digital distribution platform for Windows, Linux and X systems - OnLine installer + +*   Desura - 为Windows数字化分发平台,Linux 和 x 系统 - 在线安装 + +* DOSBox - DOS emulator for BeOS, Linux, Mac X, OS2, and Windows + +* DOSBox - 为系统 BeOS, Linux, Mac X, OS2, 和 Windows 定制的 DOS 模拟器 + +* DOSEMU - DOS Emulator for Linux + +* DOSEMU - 为 Linux 系统定制的 DOS 模拟器 + +* ePSXe - enhanced PSX emulator + +* ePSXe - 增强的 PSX 模拟器(仿真器) + +* FCEUX - Nintendo Entertainment System (NES), Famicom and Famicom Disk System (FDS) emulator + +* FCEUX - 任天堂娱乐系统(NES),费米康和费米康磁盘系统(FDS)模拟器(仿真器) + +* FS-UAE - Cross-platform Amiga emulator + +* FS-UAE - 跨平台多媒体(Amiga)模拟器 + +* GNOME Video Arcade - Simple MAME frontend + +* GNOME Video Arcade - 简化 MAME 前端 + +* Hatari - Atari ST, STE, TT and Falcon emulator for Linux and other systems + +* Hatari - 用于Linux和其他系统的Atari ST,STE,TT和 Falcon 模拟器(仿真器) + +* Higan - Emulator for Nintendos SNES, NES, Gameboy, Gameboy Color and Gameboy Advance + +* Higan - 任天堂 SNES,NES,Gameboy,Gameboy Color 和 Gameboy Advance 的模拟器 + +* Kega_Fusion - Sega SG/SC/SF, Master System, Game Gear, Genesis/Megadrive, SVP, Pico, SegaCD/MegaCD emulator + +* Kega_Fusion - 世嘉 SG / SC / SF,主系统,游戏机,创世纪 / 麦加驱动,SVP,Pico,SegaCD / MegaCD 模拟器(仿真器) + +* MAME - Hardware emulator which faithfully reproduces the behavior of many arcade machines + +* MAME - 不折不扣地复制许多街机行为硬件模拟器(仿真器) + +* Mednafen - Atari Lynx, GameBoy, NES, SNES, PC-FX, Sega, Sony PlayStation and other systems + +* Mednafen - Atari Lynx,GameBoy,NES,SNES,PC-FX,世嘉,索尼游戏站等系统 + +* MESS - Emulator for various consoles and computing systems + +* MESS - 各种控制台和计算系统的模拟器(仿真器) + +* Nestopia - Nintendo Entertainment System/Famicom emulator + +* Nestopia - 任天堂娱乐系统/费米康模拟器 + +* PCSX - Sony PlayStation emulator + +*   PCSX - 索尼游戏平台模拟器(仿真器) +  +*   PlayOnLinux - Front-end for Wine + +*   PlayOnLinux - 前端生成 +  +* PPSSPP - PPSSPP is an open source PSP emulator available for Windows, MacOS, Linux and Android + +* PPSSPP - PPSSPP 是适用于 Windows,MacOS,Linux 和 Android 的开源 PSP 仿真器 + +* Steam - launcher for the Steam software distribution service - OnLine installer + +* Steam - Steam 软件分发服务的启动器 - 在线安装程序 + +* Stella - Atari 2600 Emulator for SDL and the X Window System + +* Stella -用于 SDL 和 X Window 系统的 Atari 2600 仿真器 + +* VisualBoyAdvance - Full featured Game Boy Advance emulator + +* VisualBoyAdvance - 全功能 Game Boy Advance 模拟器 + +* Virtual Jaguar - Cross-platform emulator for Atari's infamous Jaguar console + +* Virtual Jaguar - 用于 Atari infamous Jaguar 控制台的跨平台模拟器 + +* Wine - Windows implementation + +*   Wine - 窗口实现 +  +* Winetricks - a POSIX shell script 'package manager' for WINE to install some Windows software easily + +*   Winetricks - POSIX shell脚本的软件包管理器,能够很容易为 WINE 安装 Windows软件 + +* Yabause - Sega Saturn emulator + +*   Yabause - 世嘉土星32位游戏机模拟器(仿真器) +  +* ZSNES - Emulator for the Super Nintendo Entertainment System + +* ZSNES - 超级任天堂娱乐系统模拟器 + +The GamePack also includes Oracle Java and Adobe Flash which is needed by quite a few games. + +GamePack还包括被相当多的游戏平台所必须的 Oracle java 和 Adobe Flash。 + +If this seems to be an OS you are interested in then read on to find out how to download it. + +如果这是一个你感兴趣的操作系统,请继续阅读,看看如何下载它。 + +**Download** +  +**下载** + + +The main place to download the OS is from UALinux. The link from UALinux is [https://ualinux.com/en/download/category/25-ubuntu-gamepack][1]. Since the link is from a foreign country it is a slow download. Another option is to download the OS from a Torrent file. If you do not have a Torrent program you may want to download ‘Transmission’. Once you have a Torrent program go to [https://zooqle.com/ubuntu-gamepack-16-04-i386-amd64-январь-2017-pc-vkn99.html][2]. The Torrent will allow you to download both the 64-bit and 32-bit ISO files. + +下载此操作系统镜像的主要是来自 UALinux 。其下载链接是: [https://ualinux.com/en/download/category/25-ubuntu-gamepack][1]。 +由于此链接来自国外,所以下载速度很慢。另一种选择是利用种子文件下载此操作系统。如果没有你想要下载的“传输”种子下载程序。你可以通过[https://zooqle.com/ubuntu-gamepack-16-04-i386-amd64-январь-2017-pc-vkn99.html][2] +此链接获得。这个种子文件下载可以下载 64 位和 32 位 的 ISO 镜像文件。 +The file sizes vary depending on the architecture you need. The 64-bit OS ISO file is 2.27 GB, while the 32-bit OS ISO file is 2.13 GB. + +文件大小取决于您需要的架构。64 位操作系统 ISO 镜像文件大小是 2.27 GB,而 32 位的操作系统 ISO 镜像文件大小是 2.13 GB. +   +Once downloaded you can use the ISO file to create a bootable DVD to install the GamePack or you can use a program like ‘USB Image Writer’ to place the ISO on a USB stick to install it. +  +如果下载了你所用的 ISO 镜像文件,你可以利 ISO 文件创建一个可启动的 DVD 安装 Gamepack 或者你可以使用 ‘USB Image Writer’把 ISO 写入到优盘,并利用此优盘安装系统。 + +The requirements are the same as Ubuntu 16.04: +  +硬件需求和 Ubuntu 16.04 保持一致: +  +* 2 GHz dual core processor or better + +*   2 GHz 双核处理器或者更高 + +*   2 GB system memory + +*   2 GB 系统内存 +  +* 25 GB of free hard drive space + +*   25 GB 的磁盘空间 + +*   Either a DVD drive or a USB port for the installer media + +*   具有 DVD 驱动器或者具备 USB 端口,以便于安装 +  +* Internet access is required for online gaming systems such as Steam + +*   在线游戏系统(如Steam)需要互联网接入。 + +It goes without saying that for gaming you definitely want to have a system with more than these ‘minimum’ requirements. More memory would be a definite plus as well as a decent video card with a fair amount of Video RAM. + +不用说,对于游戏玩家来说,肯定希望拥有比这些“最低配置”要求更高的系统配置。更多的内存将是一个有把握的选择,也应该有一款正版的显存大一点的显卡。 + +Once you have a system and the specific ISO file for the system, 32- or 64-bit OS, then you are ready to install the Operating System. + +您如果有了硬件系统和系统的特定 32位 或者 64 位 ISO 文件,那么接下来就可以安装操作系统了。 + +**Installation** +  +**安装过程** + +Once you have the ISO file on a media from which you can boot your system you are ready to continue. + +在媒体上利用 ISO 镜像文件启动了系统,您就可以准备进行下一步了。 + +Boot from the Ubuntu GamePack media and you should see a screen similar to Figure 1. + +从 Ubuntu Gamepack 介质启动,你会看到一个类似图1的屏幕。 + +![Figure 01.png](https://www.linux.org/attachments/figure-01-png.671/) + +**FIGURE 1** +**图 1** + +Once everything is loaded the installer can proceed with the installation. Figure 2 shows the next screen which allows you to specify your language and whether you want to install or try the GamePack. If you wish, you can click ‘Try Ubuntu’ to simply load it into memory and try it out without making changes to your drive. + +一旦加载完毕,安装程序就可以继续安装了。图2显示下一屏,可以定制语言,接下来是安装或者体验 Gamepack。如果你愿意,你可以点击 “Try Ubuntu” 在不改变驱动器的情况下把它加载到内存中运行。 + +![Figure 02.png](https://www.linux.org/attachments/figure-02-png.672/) + +**FIGURE 2** +**图 2** + +Once you are ready to continue select ‘Install Ubuntu’. +  +接下来继续选择 ‘Install Ubuntu’ 进行安装了。 +  +The next screen, Figure 3, allows you to specify whether to download any updates for Ubuntu while installing it. You can also choose to install Third Party software for Graphics, WiFi, Flash, MP3 and other updates. + +下一个屏幕,如图3所示,你可以在安装 Ubuntu 时指定是否下载 Ubuntu 的任何更新。您还可以选择安装第三方的软件,如:Graphics, WiFi, Flash, MP3 和其他更新。 + +Once you have made your selections, press ‘Continue’. +  +当定制好你的系统后,就可以点击“Continue”  +  +![Figure 03.png](https://www.linux.org/attachments/figure-03-png.673/) + +**FIGURE 3** +**图 3** + +Next, you must specify how the drive will be configured for use as shown in Figure 4\. If you plan on using the whole drive, then it may be easier to leave the settings as they are and click ‘Install Now’. + +接下来,您必须指定驱动器将如何配置为使用,如图4所示。如果您计划使用整个驱动器,那么可以更容易地设置,选择此驱动器即可,然后单击“Install Now”。 + +![Figure 04.png](https://www.linux.org/attachments/figure-04-png.674/) + +**FIGURE 4** +**图 4** + +As shown in Figure 5 you will be prompted to verify your selection for configuring the hard drive. If you approve the changes then click ‘Continue’. +  +接下来在图5中可以根据提示确认所选择硬件配置。如果同意以上的更改,请单击“Continue”。  +  +![Figure 05.png](https://www.linux.org/attachments/figure-05-png.675/) + +**FIGURE 5** +**图 5** + +Next you will be prompted to choose your Time Zone as shown in Figure 6\. Click ‘Continue’ once you have set your Time Zone. + +接下来,如图6所示,你将按照提示选择时区,选择完毕后点击“Continue”。 + +![Figure 06.png](https://www.linux.org/attachments/figure-06-png.676/) + +**FIGURE 6** +**图 6** + +A window will appear, Figure 7, to allow you to set the default keyboard layout. Choose the correct layout and press ‘Continue’. + +接下来,如图7所示,需要您设置默认的键盘布局。选择适合您的正确的布局后并按“Continue”。 + +![Figure 07.png](https://www.linux.org/attachments/figure-07-png.677/) + +**FIGURE 7** +**图 7** + +The last configuration screen is for you to set up a User account as shown in Figure 8\. Type in your name, computer name, User name, password and select if you need to type the password to log onto the system. You can also set to encrypt the Home Folder for this User. + +最后一个配置屏幕是为您设置一个用户帐户,如图8所示。键入您的姓名、计算机名、用户名、密码和选择您需要键入密码登录系统的方式。您还可以为该用户设置加密主目录。 + +![Figure 08.png](https://www.linux.org/attachments/figure-08-png.678/) + +**FIGURE 8** +**图 8** + +The installation should proceed now by setting up the drive as specified. Files will be copied from the boot media to the hard drive as shown in Figure 9\. Once everything is copied to the drive and set up you will be prompted to remove the Boot Media to allow the system to restart. + +安装将按定制进行设置驱动器。安装文件将从引导媒体复制到硬盘驱动器,如图9所示。所有内容复制到驱动器并设置,您将被提示移除引导媒体并允许重新启动系统。 + +![Figure 09.png](https://www.linux.org/attachments/figure-09-png.679/) + +**FIGURE 9** +**图 9** + +After the restart, if you selected to require the User to log in, then you will be given a screen like Figure 10\. Here you enter the password you specified for the User and log onto Ubuntu GamePack. + +重新启动后,您需要选择用户登录,会得到类似于图10的屏幕\\。输入指定的用户密码登录到 Ubuntu Gamepack。 + +![Figure 10.png](https://www.linux.org/attachments/figure-10-png.680/) + +**FIGURE 10** +**图 10** + +After you log onto Ubuntu GamePack you should probably try to perform any software upgrades which may be necessary. Open a Terminal and enter the following two commands: + +当你登录到 Ubuntu Gamepack 你应该尝试执行可能需要的任何软件升级。打开一个终端并输入以下两个命令: + +sudo apt-get update && sudo apt-get upgrade + +Any updates which are not installed should be installed to bring the GamePack system up-to-date. + +更新会安装 GamePack 系统定制的软件更新。 + +Now, simply look through the menu and find the games you wish to play. Open the emulators or any of the game services like Steam. + +现在,只要看看菜单,找到你想玩的游戏就行了。打开模拟器或任何游戏服务如 Steam 。 + +Hope you enjoy the GamePack and have fun! + +希望你喜欢 Gamepack 并且玩得高兴! +-------------------------------------------------------------------------------- + +via: https://www.linux.org/threads/ubuntu-gamepack.4559/ + +作者:[Jarret B ][a] +译者:[stevenzdg988](https://github.com/stevenzdg988) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.linux.org/members/jarret-b.29858/ +[1]:https://ualinux.com/en/download/category/25-ubuntu-gamepack +[2]:https://zooqle.com/ubuntu-gamepack-16-04-i386-amd64-%D1%8F%D0%BD%D0%B2%D0%B0%D1%80%D1%8C-2017-pc-vkn99.html From f66b5b3087d44d02dbdc3543a86ec3a49322c3e6 Mon Sep 17 00:00:00 2001 From: VicYu Date: Tue, 11 Jul 2017 17:12:52 +0800 Subject: [PATCH 084/100] Delete 20170529 Ubuntu GamePack.md --- translated/20170529 Ubuntu GamePack.md | 350 ------------------------- 1 file changed, 350 deletions(-) delete mode 100644 translated/20170529 Ubuntu GamePack.md diff --git a/translated/20170529 Ubuntu GamePack.md b/translated/20170529 Ubuntu GamePack.md deleted file mode 100644 index fbda39385c..0000000000 --- a/translated/20170529 Ubuntu GamePack.md +++ /dev/null @@ -1,350 +0,0 @@ -Ubuntu GamePack -=============== - - -A lot of people who like to use their Linux system for gaming. There seems to be no shortage of gaming systems which can supply access to games. UALinux is a Ukrainian company which promotes the use of GNU/Linux. UALinux has created a Ubuntu version to fill the gap for gaming. The Operating System (OS) is called Ubuntu GamePack and is based off of Ubuntu 16.04. - - -很大一部分 Linux 爱好者喜欢用他们的系统玩游戏。现在看起来能够可以支持游戏的游戏系统很短缺。UALinux 是一家推广使用 GNU/Linux 的乌克兰公司。UALinux 开发了一个 Ubuntu 版本填补了这一空白。把这个基于 Ubuntu 16.04 的操作系统(OS)命名为 Ubuntu GamePack . - -**Contents** - -** 内容 ** - -The list of games would be quite extensive but the company claims there is access to over 22,381 games. - -游戏现在已经相当广泛,但是游戏公司已经宣称可以访问超过22,381款游戏。 - -The GamePack includes Lutris and Steam to allow you access to the specific gaming services the distributer provides. - -GamePack 包括 Lutris 和 Steam 两部分,允许您访问分发商提供的定制游戏服务。 - -For Windows-based games there is PlayOnLinux, WINE and CrossOver so the games will run on Linux. - -对于基于 Windows 的游戏,有 PlayOnLinux,WINE 和 CrossOver 转换到 Linux 上运行。 - -For DOS games you can run the games in DosBox which is a DOS emulator for Linux. - -对于 DOS 游戏,您可以在 DosBox 中运行游戏,这是一个 Linux 的 DOS 模拟器 - -Sparky APTus Gamer is also installed to allow access to numerous gaming console emulators. The emulators include: - -Sparky APTus Gamer 被安装应用允许访问众多游戏控制模拟器。 模拟器包括: - -*   AdvanceMENU – front-end for AdvanceMAME, AdvanceMESS, MAME, MESS, xmame, Raine and other emulators - -*  AdvanceMENU - 前端包括 AdvanceMAME, AdvanceMESS, MAME, MESS, xmame, Raine 以及其他的模拟器 - -*   Atari800 - emulator for Atari 8-bit systems, XE Game System and Atari 5200 SuperSystem - -*  Atari800 - Atari 8位系统的模拟器,XE 游戏系统和 Atari 5200 超级系统 - -*   DeSmuME - Nintendo DS emulator - -*   DeSmuME - Nintendo DS 模拟器 - -*   Desura - digital distribution platform for Windows, Linux and X systems - OnLine installer - -*   Desura - 为Windows数字化分发平台,Linux 和 x 系统 - 在线安装 - -* DOSBox - DOS emulator for BeOS, Linux, Mac X, OS2, and Windows - -* DOSBox - 为系统 BeOS, Linux, Mac X, OS2, 和 Windows 定制的 DOS 模拟器 - -* DOSEMU - DOS Emulator for Linux - -* DOSEMU - 为 Linux 系统定制的 DOS 模拟器 - -* ePSXe - enhanced PSX emulator - -* ePSXe - 增强的 PSX 模拟器(仿真器) - -* FCEUX - Nintendo Entertainment System (NES), Famicom and Famicom Disk System (FDS) emulator - -* FCEUX - 任天堂娱乐系统(NES),费米康和费米康磁盘系统(FDS)模拟器(仿真器) - -* FS-UAE - Cross-platform Amiga emulator - -* FS-UAE - 跨平台多媒体(Amiga)模拟器 - -* GNOME Video Arcade - Simple MAME frontend - -* GNOME Video Arcade - 简化 MAME 前端 - -* Hatari - Atari ST, STE, TT and Falcon emulator for Linux and other systems - -* Hatari - 用于Linux和其他系统的Atari ST,STE,TT和 Falcon 模拟器(仿真器) - -* Higan - Emulator for Nintendos SNES, NES, Gameboy, Gameboy Color and Gameboy Advance - -* Higan - 任天堂 SNES,NES,Gameboy,Gameboy Color 和 Gameboy Advance 的模拟器 - -* Kega_Fusion - Sega SG/SC/SF, Master System, Game Gear, Genesis/Megadrive, SVP, Pico, SegaCD/MegaCD emulator - -* Kega_Fusion - 世嘉 SG / SC / SF,主系统,游戏机,创世纪 / 麦加驱动,SVP,Pico,SegaCD / MegaCD 模拟器(仿真器) - -* MAME - Hardware emulator which faithfully reproduces the behavior of many arcade machines - -* MAME - 不折不扣地复制许多街机行为硬件模拟器(仿真器) - -* Mednafen - Atari Lynx, GameBoy, NES, SNES, PC-FX, Sega, Sony PlayStation and other systems - -* Mednafen - Atari Lynx,GameBoy,NES,SNES,PC-FX,世嘉,索尼游戏站等系统 - -* MESS - Emulator for various consoles and computing systems - -* MESS - 各种控制台和计算系统的模拟器(仿真器) - -* Nestopia - Nintendo Entertainment System/Famicom emulator - -* Nestopia - 任天堂娱乐系统/费米康模拟器 - -* PCSX - Sony PlayStation emulator - -*   PCSX - 索尼游戏平台模拟器(仿真器) -  -*   PlayOnLinux - Front-end for Wine - -*   PlayOnLinux - 前端生成 -  -* PPSSPP - PPSSPP is an open source PSP emulator available for Windows, MacOS, Linux and Android - -* PPSSPP - PPSSPP 是适用于 Windows,MacOS,Linux 和 Android 的开源 PSP 仿真器 - -* Steam - launcher for the Steam software distribution service - OnLine installer - -* Steam - Steam 软件分发服务的启动器 - 在线安装程序 - -* Stella - Atari 2600 Emulator for SDL and the X Window System - -* Stella -用于 SDL 和 X Window 系统的 Atari 2600 仿真器 - -* VisualBoyAdvance - Full featured Game Boy Advance emulator - -* VisualBoyAdvance - 全功能 Game Boy Advance 模拟器 - -* Virtual Jaguar - Cross-platform emulator for Atari's infamous Jaguar console - -* Virtual Jaguar - 用于 Atari infamous Jaguar 控制台的跨平台模拟器 - -* Wine - Windows implementation - -*   Wine - 窗口实现 -  -* Winetricks - a POSIX shell script 'package manager' for WINE to install some Windows software easily - -*   Winetricks - POSIX shell脚本的软件包管理器,能够很容易为 WINE 安装 Windows软件 - -* Yabause - Sega Saturn emulator - -*   Yabause - 世嘉土星32位游戏机模拟器(仿真器) -  -* ZSNES - Emulator for the Super Nintendo Entertainment System - -* ZSNES - 超级任天堂娱乐系统模拟器 - -The GamePack also includes Oracle Java and Adobe Flash which is needed by quite a few games. - -GamePack还包括被相当多的游戏平台所必须的 Oracle java 和 Adobe Flash。 - -If this seems to be an OS you are interested in then read on to find out how to download it. - -如果这是一个你感兴趣的操作系统,请继续阅读,看看如何下载它。 - -**Download** -  -**下载** - - -The main place to download the OS is from UALinux. The link from UALinux is [https://ualinux.com/en/download/category/25-ubuntu-gamepack][1]. Since the link is from a foreign country it is a slow download. Another option is to download the OS from a Torrent file. If you do not have a Torrent program you may want to download ‘Transmission’. Once you have a Torrent program go to [https://zooqle.com/ubuntu-gamepack-16-04-i386-amd64-январь-2017-pc-vkn99.html][2]. The Torrent will allow you to download both the 64-bit and 32-bit ISO files. - -下载此操作系统镜像的主要是来自 UALinux 。其下载链接是: [https://ualinux.com/en/download/category/25-ubuntu-gamepack][1]。 -由于此链接来自国外,所以下载速度很慢。另一种选择是利用种子文件下载此操作系统。如果没有你想要下载的“传输”种子下载程序。你可以通过[https://zooqle.com/ubuntu-gamepack-16-04-i386-amd64-январь-2017-pc-vkn99.html][2] -此链接获得。这个种子文件下载可以下载 64 位和 32 位 的 ISO 镜像文件。 - -The file sizes vary depending on the architecture you need. The 64-bit OS ISO file is 2.27 GB, while the 32-bit OS ISO file is 2.13 GB. - -文件大小取决于您需要的架构。64 位操作系统 ISO 镜像文件大小是 2.27 GB,而 32 位的操作系统 ISO 镜像文件大小是 2.13 GB. -   -Once downloaded you can use the ISO file to create a bootable DVD to install the GamePack or you can use a program like ‘USB Image Writer’ to place the ISO on a USB stick to install it. -  -如果下载了你所用的 ISO 镜像文件,你可以利 ISO 文件创建一个可启动的 DVD 安装 Gamepack 或者你可以使用 ‘USB Image Writer’把 ISO 写入到优盘,并利用此优盘安装系统。 - -The requirements are the same as Ubuntu 16.04: -  -硬件需求和 Ubuntu 16.04 保持一致: -  -* 2 GHz dual core processor or better - -*   2 GHz 双核处理器或者更高 - -*   2 GB system memory - -*   2 GB 系统内存 -  -* 25 GB of free hard drive space - -*   25 GB 的磁盘空间 - -*   Either a DVD drive or a USB port for the installer media - -*   具有 DVD 驱动器或者具备 USB 端口,以便于安装 -  -* Internet access is required for online gaming systems such as Steam - -*   在线游戏系统(如Steam)需要互联网接入。 - -It goes without saying that for gaming you definitely want to have a system with more than these ‘minimum’ requirements. More memory would be a definite plus as well as a decent video card with a fair amount of Video RAM. - -不用说,对于游戏玩家来说,肯定希望拥有比这些“最低配置”要求更高的系统配置。更多的内存将是一个有把握的选择,也应该有一款正版的显存大一点的显卡。 - -Once you have a system and the specific ISO file for the system, 32- or 64-bit OS, then you are ready to install the Operating System. - -您如果有了硬件系统和系统的特定 32位 或者 64 位 ISO 文件,那么接下来就可以安装操作系统了。 - -**Installation** -  -**安装过程** - -Once you have the ISO file on a media from which you can boot your system you are ready to continue. - -在媒体上利用 ISO 镜像文件启动了系统,您就可以准备进行下一步了。 - -Boot from the Ubuntu GamePack media and you should see a screen similar to Figure 1. - -从 Ubuntu Gamepack 介质启动,你会看到一个类似图1的屏幕。 - -![Figure 01.png](https://www.linux.org/attachments/figure-01-png.671/) - -**FIGURE 1** - -**图 1** - -Once everything is loaded the installer can proceed with the installation. Figure 2 shows the next screen which allows you to specify your language and whether you want to install or try the GamePack. If you wish, you can click ‘Try Ubuntu’ to simply load it into memory and try it out without making changes to your drive. - -一旦加载完毕,安装程序就可以继续安装了。图2显示下一屏,可以定制语言,接下来是安装或者体验 Gamepack。如果你愿意,你可以点击 “Try Ubuntu” 在不改变驱动器的情况下把它加载到内存中运行。 - -![Figure 02.png](https://www.linux.org/attachments/figure-02-png.672/) - -**FIGURE 2** - -**图 2** - -Once you are ready to continue select ‘Install Ubuntu’. -  -接下来继续选择 ‘Install Ubuntu’ 进行安装了。 -  -The next screen, Figure 3, allows you to specify whether to download any updates for Ubuntu while installing it. You can also choose to install Third Party software for Graphics, WiFi, Flash, MP3 and other updates. - -下一个屏幕,如图3所示,你可以在安装 Ubuntu 时指定是否下载 Ubuntu 的任何更新。您还可以选择安装第三方的软件,如:Graphics, WiFi, Flash, MP3 和其他更新。 - -Once you have made your selections, press ‘Continue’. -  -当定制好你的系统后,就可以点击“Continue”  -  -![Figure 03.png](https://www.linux.org/attachments/figure-03-png.673/) - -**FIGURE 3** - -**图 3** - -Next, you must specify how the drive will be configured for use as shown in Figure 4\. If you plan on using the whole drive, then it may be easier to leave the settings as they are and click ‘Install Now’. - -接下来,您必须指定驱动器将如何配置为使用,如图4所示。如果您计划使用整个驱动器,那么可以更容易地设置,选择此驱动器即可,然后单击“Install Now”。 - -![Figure 04.png](https://www.linux.org/attachments/figure-04-png.674/) - -**FIGURE 4** - -**图 4** - -As shown in Figure 5 you will be prompted to verify your selection for configuring the hard drive. If you approve the changes then click ‘Continue’. -  -接下来在图5中可以根据提示确认所选择硬件配置。如果同意以上的更改,请单击“Continue”。  -  -![Figure 05.png](https://www.linux.org/attachments/figure-05-png.675/) - -**FIGURE 5** - -**图 5** - -Next you will be prompted to choose your Time Zone as shown in Figure 6\. Click ‘Continue’ once you have set your Time Zone. - -接下来,如图6所示,你将按照提示选择时区,选择完毕后点击“Continue”。 - -![Figure 06.png](https://www.linux.org/attachments/figure-06-png.676/) - -**FIGURE 6** - -**图 6** - -A window will appear, Figure 7, to allow you to set the default keyboard layout. Choose the correct layout and press ‘Continue’. - -接下来,如图7所示,需要您设置默认的键盘布局。选择适合您的正确的布局后并按“Continue”。 - -![Figure 07.png](https://www.linux.org/attachments/figure-07-png.677/) - -**FIGURE 7** - -**图 7** - -The last configuration screen is for you to set up a User account as shown in Figure 8\. Type in your name, computer name, User name, password and select if you need to type the password to log onto the system. You can also set to encrypt the Home Folder for this User. - -最后一个配置屏幕是为您设置一个用户帐户,如图8所示。键入您的姓名、计算机名、用户名、密码和选择您需要键入密码登录系统的方式。您还可以为该用户设置加密主目录。 - -![Figure 08.png](https://www.linux.org/attachments/figure-08-png.678/) - -**FIGURE 8** - -**图 8** - -The installation should proceed now by setting up the drive as specified. Files will be copied from the boot media to the hard drive as shown in Figure 9\. Once everything is copied to the drive and set up you will be prompted to remove the Boot Media to allow the system to restart. - -安装将按定制进行设置驱动器。安装文件将从引导媒体复制到硬盘驱动器,如图9所示。所有内容复制到驱动器并设置,您将被提示移除引导媒体并允许重新启动系统。 - -![Figure 09.png](https://www.linux.org/attachments/figure-09-png.679/) - -**FIGURE 9** - -**图 9** - -After the restart, if you selected to require the User to log in, then you will be given a screen like Figure 10\. Here you enter the password you specified for the User and log onto Ubuntu GamePack. - -重新启动后,您需要选择用户登录,会得到类似于图10的屏幕\\。输入指定的用户密码登录到 Ubuntu Gamepack。 - -![Figure 10.png](https://www.linux.org/attachments/figure-10-png.680/) - -**FIGURE 10** - -**图 10** - -After you log onto Ubuntu GamePack you should probably try to perform any software upgrades which may be necessary. Open a Terminal and enter the following two commands: - -当你登录到 Ubuntu Gamepack 你应该尝试执行可能需要的任何软件升级。打开一个终端并输入以下两个命令: - -sudo apt-get update && sudo apt-get upgrade - -Any updates which are not installed should be installed to bring the GamePack system up-to-date. - -更新会安装 GamePack 系统定制的软件更新。 - -Now, simply look through the menu and find the games you wish to play. Open the emulators or any of the game services like Steam. - -现在,只要看看菜单,找到你想玩的游戏就行了。打开模拟器或任何游戏服务如 Steam 。 - -Hope you enjoy the GamePack and have fun! - -希望你喜欢 Gamepack 并且玩得高兴! --------------------------------------------------------------------------------- - -via: https://www.linux.org/threads/ubuntu-gamepack.4559/ - -作者:[Jarret B ][a] -译者:[stevenzdg988](https://github.com/stevenzdg988) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.linux.org/members/jarret-b.29858/ -[1]:https://ualinux.com/en/download/category/25-ubuntu-gamepack -[2]:https://zooqle.com/ubuntu-gamepack-16-04-i386-amd64-%D1%8F%D0%BD%D0%B2%D0%B0%D1%80%D1%8C-2017-pc-vkn99.html From 4e37bb7ce8bc2dab2b86a0e457afabb6b9c3b6d5 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 11 Jul 2017 18:14:35 +0800 Subject: [PATCH 085/100] PRF:20170529 Ubuntu GamePack.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @stevenzdg988 辛苦了。有几点小小建议: 1、翻译后不用留原来的英文 2、应该移动到 translated “对应”的子目录,即 tech 等 3、翻译后要通读一遍,这样你可以自己找到一些错误和前后不一致的地方 4、对于个别古怪和不熟悉的词汇,可以通过翻译软件和搜索引擎搜索一下,或许会有发现 最后,非常感谢你的贡献,加油! --- translated/tech/20170529 Ubuntu GamePack.md | 314 +++++--------------- 1 file changed, 70 insertions(+), 244 deletions(-) diff --git a/translated/tech/20170529 Ubuntu GamePack.md b/translated/tech/20170529 Ubuntu GamePack.md index 9607f442a9..2c700a567a 100644 --- a/translated/tech/20170529 Ubuntu GamePack.md +++ b/translated/tech/20170529 Ubuntu GamePack.md @@ -1,336 +1,162 @@ -Ubuntu GamePack +游戏版 Linux :Ubuntu GamePack =============== +很多 Linux 爱好者喜欢用他们的 Linux 系统玩游戏,看起来似乎并不需要一个可以玩游戏的操作系统。UALinux 是一家推广使用 GNU/Linux 的乌克兰公司。UALinux 开发了一个 Ubuntu 版本填补了这一空白,并把这个基于 Ubuntu 16.04 的操作系统(OS)命名为 Ubuntu GamePack . -A lot of people who like to use their Linux system for gaming. There seems to be no shortage of gaming systems which can supply access to games. UALinux is a Ukrainian company which promotes the use of GNU/Linux. UALinux has created a Ubuntu version to fill the gap for gaming. The Operating System (OS) is called Ubuntu GamePack and is based off of Ubuntu 16.04. +### 内容 +(Linux 上的)游戏现在已经相当丰富,而游戏公司宣称可以访问超过 22,381 款游戏。 -很大一部分 Linux 爱好者喜欢用他们的系统玩游戏。现在看起来能够可以支持游戏的游戏系统很短缺。UALinux 是一家推广使用 GNU/Linux 的乌克兰公司。UALinux 开发了一个 Ubuntu 版本填补了这一空白。把这个基于 Ubuntu 16.04 的操作系统(OS)命名为 Ubuntu GamePack . +这个 GamePack 包括 Lutris 和 Steam 两部分,允许您访问发行版厂商提供的特定游戏服务。 -**Contents** - -** 内容 ** - -The list of games would be quite extensive but the company claims there is access to over 22,381 games. - -游戏现在已经相当广泛,但是游戏公司已经宣称可以访问超过22,381款游戏。 - -The GamePack includes Lutris and Steam to allow you access to the specific gaming services the distributer provides. - -GamePack 包括 Lutris 和 Steam 两部分,允许您访问分发商提供的定制游戏服务。 - -For Windows-based games there is PlayOnLinux, WINE and CrossOver so the games will run on Linux. - -对于基于 Windows 的游戏,有 PlayOnLinux,WINE 和 CrossOver 转换到 Linux 上运行。 - -For DOS games you can run the games in DosBox which is a DOS emulator for Linux. +对于基于 Windows 的游戏,可以用 PlayOnLinux,WINE 和 CrossOver 转换到 Linux 上运行。 对于 DOS 游戏,您可以在 DosBox 中运行游戏,这是一个 Linux 的 DOS 模拟器 -Sparky APTus Gamer is also installed to allow access to numerous gaming console emulators. The emulators include: - -Sparky APTus Gamer 被安装应用允许访问众多游戏控制模拟器。 模拟器包括: - -*   AdvanceMENU – front-end for AdvanceMAME, AdvanceMESS, MAME, MESS, xmame, Raine and other emulators - -*  AdvanceMENU - 前端包括 AdvanceMAME, AdvanceMESS, MAME, MESS, xmame, Raine 以及其他的模拟器 - -*   Atari800 - emulator for Atari 8-bit systems, XE Game System and Atari 5200 SuperSystem - -*  Atari800 - Atari 8位系统的模拟器,XE 游戏系统和 Atari 5200 超级系统 - -*   DeSmuME - Nintendo DS emulator - -*   DeSmuME - Nintendo DS 模拟器 - -*   Desura - digital distribution platform for Windows, Linux and X systems - OnLine installer - -*   Desura - 为Windows数字化分发平台,Linux 和 x 系统 - 在线安装 - -* DOSBox - DOS emulator for BeOS, Linux, Mac X, OS2, and Windows - -* DOSBox - 为系统 BeOS, Linux, Mac X, OS2, 和 Windows 定制的 DOS 模拟器 - -* DOSEMU - DOS Emulator for Linux - -* DOSEMU - 为 Linux 系统定制的 DOS 模拟器 - -* ePSXe - enhanced PSX emulator - -* ePSXe - 增强的 PSX 模拟器(仿真器) - -* FCEUX - Nintendo Entertainment System (NES), Famicom and Famicom Disk System (FDS) emulator - -* FCEUX - 任天堂娱乐系统(NES),费米康和费米康磁盘系统(FDS)模拟器(仿真器) - -* FS-UAE - Cross-platform Amiga emulator - -* FS-UAE - 跨平台多媒体(Amiga)模拟器 - -* GNOME Video Arcade - Simple MAME frontend - -* GNOME Video Arcade - 简化 MAME 前端 - -* Hatari - Atari ST, STE, TT and Falcon emulator for Linux and other systems - -* Hatari - 用于Linux和其他系统的Atari ST,STE,TT和 Falcon 模拟器(仿真器) - -* Higan - Emulator for Nintendos SNES, NES, Gameboy, Gameboy Color and Gameboy Advance - -* Higan - 任天堂 SNES,NES,Gameboy,Gameboy Color 和 Gameboy Advance 的模拟器 - -* Kega_Fusion - Sega SG/SC/SF, Master System, Game Gear, Genesis/Megadrive, SVP, Pico, SegaCD/MegaCD emulator - -* Kega_Fusion - 世嘉 SG / SC / SF,主系统,游戏机,创世纪 / 麦加驱动,SVP,Pico,SegaCD / MegaCD 模拟器(仿真器) - -* MAME - Hardware emulator which faithfully reproduces the behavior of many arcade machines - -* MAME - 不折不扣地复制许多街机行为硬件模拟器(仿真器) - -* Mednafen - Atari Lynx, GameBoy, NES, SNES, PC-FX, Sega, Sony PlayStation and other systems - -* Mednafen - Atari Lynx,GameBoy,NES,SNES,PC-FX,世嘉,索尼游戏站等系统 - -* MESS - Emulator for various consoles and computing systems - -* MESS - 各种控制台和计算系统的模拟器(仿真器) - -* Nestopia - Nintendo Entertainment System/Famicom emulator - -* Nestopia - 任天堂娱乐系统/费米康模拟器 - -* PCSX - Sony PlayStation emulator - -*   PCSX - 索尼游戏平台模拟器(仿真器) -  -*   PlayOnLinux - Front-end for Wine - -*   PlayOnLinux - 前端生成 -  -* PPSSPP - PPSSPP is an open source PSP emulator available for Windows, MacOS, Linux and Android - -* PPSSPP - PPSSPP 是适用于 Windows,MacOS,Linux 和 Android 的开源 PSP 仿真器 - -* Steam - launcher for the Steam software distribution service - OnLine installer +也安装了 Sparky APTus Gamer ,可以访问众多主机游戏模拟器。 模拟器包括: +*  AdvanceMENU - AdvanceMAME、 AdvanceMESS、 MAME、 MESS、 xmame、 Raine 以及其他的模拟器的前端 +*  Atari800 - Atari 8 位系统、XE 游戏系统和 Atari 5200 超级系统的模拟器 +*   DeSmuME - 任天堂 DS 模拟器 +*   Desura - 支持 Windows、Linux 和 X 系统的数字化分发平台 - 在线安装器 +* DOSBox - 支持 BeOS、Linux、Mac X、OS2 和 Windows 的 DOS 模拟器 +* DOSEMU - 支持 Linux 的 DOS 模拟器 +* ePSXe - 增强的 PSX 模拟器 +* FCEUX - 任天堂娱乐系统(NES)、红白机(Famicom)和红白机磁盘系统(FDS)模拟器(仿真器) +* FS-UAE - 跨平台的 Amiga 模拟器 +* GNOME Video Arcade - 简化的 MAME 前端 +* Hatari - 支持 Linux 和其他系统的 Atari ST、STE、TT 和 Falcon 模拟器(仿真器) +* Higan - 任天堂 SNES、NES、Gameboy、Gameboy Color 和 Gameboy Advance 的模拟器 +* Kega_Fusion - 世嘉 SG/SC/SF,主系统、Master System、 Game Gear、 Genesis/Megadrive、 SVP、 Pico、 SegaCD/MegaCD 模拟器 +* MAME - 忠实重现了许多街机效果的硬件模拟器 +* Mednafen - Atari Lynx、GameBoy、NES、SNES、PC-FX、世嘉,索尼游戏站等系统 +* MESS - 各种主机和计算机游戏的模拟器 +* Nestopia - 任天堂娱乐系统/红白机模拟器 +*   PCSX - 索尼游戏站模拟器 +*   PlayOnLinux - Wine 前端 +* PPSSPP - PPSSPP 是支持 Windows、MacOS、Linux 和 Android 的开源 PSP 仿真器 * Steam - Steam 软件分发服务的启动器 - 在线安装程序 - -* Stella - Atari 2600 Emulator for SDL and the X Window System - * Stella -用于 SDL 和 X Window 系统的 Atari 2600 仿真器 - -* VisualBoyAdvance - Full featured Game Boy Advance emulator - -* VisualBoyAdvance - 全功能 Game Boy Advance 模拟器 - -* Virtual Jaguar - Cross-platform emulator for Atari's infamous Jaguar console - -* Virtual Jaguar - 用于 Atari infamous Jaguar 控制台的跨平台模拟器 - -* Wine - Windows implementation - -*   Wine - 窗口实现 -  -* Winetricks - a POSIX shell script 'package manager' for WINE to install some Windows software easily - -*   Winetricks - POSIX shell脚本的软件包管理器,能够很容易为 WINE 安装 Windows软件 - -* Yabause - Sega Saturn emulator - -*   Yabause - 世嘉土星32位游戏机模拟器(仿真器) -  -* ZSNES - Emulator for the Super Nintendo Entertainment System - +* VisualBoyAdvance - 全功能 Game Boy Advance 的模拟器 +* Virtual Jaguar - 用于 Atari 的 infamous Jaguar 主机游戏的跨平台模拟器 +*   Wine - Windows 二进制在 Linux 中运行 +*   Winetricks - 一个用于 WINE 的 POSIX shell 脚本的软件包管理器,能够很容易安装一些 Windows软件 +*   Yabause - 世嘉土星32位游戏机模拟器 * ZSNES - 超级任天堂娱乐系统模拟器 -The GamePack also includes Oracle Java and Adobe Flash which is needed by quite a few games. - -GamePack还包括被相当多的游戏平台所必须的 Oracle java 和 Adobe Flash。 - -If this seems to be an OS you are interested in then read on to find out how to download it. +GamePack 还包括被一些游戏所必须的 Oracle java 和 Adobe Flash。 如果这是一个你感兴趣的操作系统,请继续阅读,看看如何下载它。 -**Download** -  -**下载** +### 下载 +下载此操作系统镜像的主要地方是 UALinux 。其下载链接是: [https://ualinux.com/en/download/category/25-ubuntu-gamepack][1]。由于此链接来自国外,所以下载速度很慢。另一种选择是利用种子文件下载此操作系统。如果你没有种子下载程序,你可以下载“Transmission”。有了种子下载程序后,你可以通过 [https://zooqle.com/ubuntu-gamepack-16-04-i386-amd64-январь-2017-pc-vkn99.html][2]下载。这个种子文件下载可以下载 64 位和 32 位 的 ISO 镜像文件。 -The main place to download the OS is from UALinux. The link from UALinux is [https://ualinux.com/en/download/category/25-ubuntu-gamepack][1]. Since the link is from a foreign country it is a slow download. Another option is to download the OS from a Torrent file. If you do not have a Torrent program you may want to download ‘Transmission’. Once you have a Torrent program go to [https://zooqle.com/ubuntu-gamepack-16-04-i386-amd64-январь-2017-pc-vkn99.html][2]. The Torrent will allow you to download both the 64-bit and 32-bit ISO files. - -下载此操作系统镜像的主要是来自 UALinux 。其下载链接是: [https://ualinux.com/en/download/category/25-ubuntu-gamepack][1]。 -由于此链接来自国外,所以下载速度很慢。另一种选择是利用种子文件下载此操作系统。如果没有你想要下载的“传输”种子下载程序。你可以通过[https://zooqle.com/ubuntu-gamepack-16-04-i386-amd64-январь-2017-pc-vkn99.html][2] -此链接获得。这个种子文件下载可以下载 64 位和 32 位 的 ISO 镜像文件。 -The file sizes vary depending on the architecture you need. The 64-bit OS ISO file is 2.27 GB, while the 32-bit OS ISO file is 2.13 GB. - -文件大小取决于您需要的架构。64 位操作系统 ISO 镜像文件大小是 2.27 GB,而 32 位的操作系统 ISO 镜像文件大小是 2.13 GB. +(下载的)文件大小取决于您需要的架构。64 位操作系统 ISO 镜像文件大小是 2.27 GB,而 32 位的操作系统 ISO 镜像文件大小是 2.13 GB。   -Once downloaded you can use the ISO file to create a bootable DVD to install the GamePack or you can use a program like ‘USB Image Writer’ to place the ISO on a USB stick to install it. -  -如果下载了你所用的 ISO 镜像文件,你可以利 ISO 文件创建一个可启动的 DVD 安装 Gamepack 或者你可以使用 ‘USB Image Writer’把 ISO 写入到优盘,并利用此优盘安装系统。 - -The requirements are the same as Ubuntu 16.04: +如果下载了你所用的 ISO 镜像文件,你可以利 ISO 文件创建一个可启动的 DVD 安装 GamePack ,或者你可以使用 “USB Image Writer”把 ISO 写入到优盘,并利用此优盘安装系统。   硬件需求和 Ubuntu 16.04 保持一致:   -* 2 GHz dual core processor or better - *   2 GHz 双核处理器或者更高 - -*   2 GB system memory - *   2 GB 系统内存 -  -* 25 GB of free hard drive space - *   25 GB 的磁盘空间 +*   用于安装介质的 DVD 驱动器或者 USB 端口 +*   在线游戏系统(如 Steam)需要互联网接入。 -*   Either a DVD drive or a USB port for the installer media - -*   具有 DVD 驱动器或者具备 USB 端口,以便于安装 -  -* Internet access is required for online gaming systems such as Steam - -*   在线游戏系统(如Steam)需要互联网接入。 - -It goes without saying that for gaming you definitely want to have a system with more than these ‘minimum’ requirements. More memory would be a definite plus as well as a decent video card with a fair amount of Video RAM. - -不用说,对于游戏玩家来说,肯定希望拥有比这些“最低配置”要求更高的系统配置。更多的内存将是一个有把握的选择,也应该有一款正版的显存大一点的显卡。 - -Once you have a system and the specific ISO file for the system, 32- or 64-bit OS, then you are ready to install the Operating System. +不用说,对于游戏玩家来说,肯定希望拥有比这些“最低配置”要求更高的系统配置。更多的内存将是一个有把握的选择,也应该有一款显存大一点的正统显卡。 您如果有了硬件系统和系统的特定 32位 或者 64 位 ISO 文件,那么接下来就可以安装操作系统了。 - -**Installation**   -**安装过程** - -Once you have the ISO file on a media from which you can boot your system you are ready to continue. +###安装过程 -在媒体上利用 ISO 镜像文件启动了系统,您就可以准备进行下一步了。 +当你用安装介质的 ISO 镜像文件启动了系统,您就可以准备进行下一步了。 -Boot from the Ubuntu GamePack media and you should see a screen similar to Figure 1. - -从 Ubuntu Gamepack 介质启动,你会看到一个类似图1的屏幕。 +从 Ubuntu Gamepack 介质启动,你会看到一个类似图 1 的屏幕。 ![Figure 01.png](https://www.linux.org/attachments/figure-01-png.671/) -**FIGURE 1** -**图 1** +*图 1* -Once everything is loaded the installer can proceed with the installation. Figure 2 shows the next screen which allows you to specify your language and whether you want to install or try the GamePack. If you wish, you can click ‘Try Ubuntu’ to simply load it into memory and try it out without making changes to your drive. - -一旦加载完毕,安装程序就可以继续安装了。图2显示下一屏,可以定制语言,接下来是安装或者体验 Gamepack。如果你愿意,你可以点击 “Try Ubuntu” 在不改变驱动器的情况下把它加载到内存中运行。 +一旦加载完毕,安装程序就可以继续安装了。图 2 显示下一屏,可以定制语言,接下来是安装或者体验 Gamepack。如果你愿意,你可以点击 “Try Ubuntu” 在不改变硬盘内容的情况下把它加载到内存中来试试它。 ![Figure 02.png](https://www.linux.org/attachments/figure-02-png.672/) -**FIGURE 2** -**图 2** +*图 2* -Once you are ready to continue select ‘Install Ubuntu’. -  接下来继续选择 ‘Install Ubuntu’ 进行安装了。 -  -The next screen, Figure 3, allows you to specify whether to download any updates for Ubuntu while installing it. You can also choose to install Third Party software for Graphics, WiFi, Flash, MP3 and other updates. -下一个屏幕,如图3所示,你可以在安装 Ubuntu 时指定是否下载 Ubuntu 的任何更新。您还可以选择安装第三方的软件,如:Graphics, WiFi, Flash, MP3 和其他更新。 - -Once you have made your selections, press ‘Continue’. +下一个屏幕,如图 3 所示,你可以在安装 Ubuntu 时指定是否下载 Ubuntu 的任何更新。您还可以选择安装第三方的软件,如:图形、WiFi、Flash、 MP3 和其他更新。   当定制好你的系统后,就可以点击“Continue”    ![Figure 03.png](https://www.linux.org/attachments/figure-03-png.673/) -**FIGURE 3** -**图 3** +*图 3* -Next, you must specify how the drive will be configured for use as shown in Figure 4\. If you plan on using the whole drive, then it may be easier to leave the settings as they are and click ‘Install Now’. - -接下来,您必须指定驱动器将如何配置为使用,如图4所示。如果您计划使用整个驱动器,那么可以更容易地设置,选择此驱动器即可,然后单击“Install Now”。 +接下来,您必须指定驱动器将如何配置使用,如图 4 所示。如果您计划使用整个驱动器,那么可以更容易地设置,选择此驱动器即可,然后单击“Install Now”。 ![Figure 04.png](https://www.linux.org/attachments/figure-04-png.674/) -**FIGURE 4** -**图 4** +*图 4* -As shown in Figure 5 you will be prompted to verify your selection for configuring the hard drive. If you approve the changes then click ‘Continue’. -  -接下来在图5中可以根据提示确认所选择硬件配置。如果同意以上的更改,请单击“Continue”。  +接下来在图 5 中可以根据提示确认所选择硬件配置。如果同意以上的更改,请单击“Continue”。    ![Figure 05.png](https://www.linux.org/attachments/figure-05-png.675/) -**FIGURE 5** -**图 5** +*图 5* -Next you will be prompted to choose your Time Zone as shown in Figure 6\. Click ‘Continue’ once you have set your Time Zone. - -接下来,如图6所示,你将按照提示选择时区,选择完毕后点击“Continue”。 +接下来,如图 6 所示,你将按照提示选择时区,选择完毕后点击“Continue”。 ![Figure 06.png](https://www.linux.org/attachments/figure-06-png.676/) -**FIGURE 6** -**图 6** +*图 6* -A window will appear, Figure 7, to allow you to set the default keyboard layout. Choose the correct layout and press ‘Continue’. - -接下来,如图7所示,需要您设置默认的键盘布局。选择适合您的正确的布局后并按“Continue”。 +接下来,如图 7 所示一个窗口,需要您设置默认的键盘布局。选择适合您的正确的布局后并按“Continue”。 ![Figure 07.png](https://www.linux.org/attachments/figure-07-png.677/) -**FIGURE 7** -**图 7** +*图 7* -The last configuration screen is for you to set up a User account as shown in Figure 8\. Type in your name, computer name, User name, password and select if you need to type the password to log onto the system. You can also set to encrypt the Home Folder for this User. - -最后一个配置屏幕是为您设置一个用户帐户,如图8所示。键入您的姓名、计算机名、用户名、密码和选择您需要键入密码登录系统的方式。您还可以为该用户设置加密主目录。 +最后一个配置屏幕是为您设置一个用户帐户,如图 8 所示。键入您的姓名、计算机名、用户名、密码并选择您需要键入密码登录系统的方式。您还可以为该用户设置加密主目录。 ![Figure 08.png](https://www.linux.org/attachments/figure-08-png.678/) -**FIGURE 8** -**图 8** +*图 8* -The installation should proceed now by setting up the drive as specified. Files will be copied from the boot media to the hard drive as shown in Figure 9\. Once everything is copied to the drive and set up you will be prompted to remove the Boot Media to allow the system to restart. - -安装将按定制进行设置驱动器。安装文件将从引导媒体复制到硬盘驱动器,如图9所示。所有内容复制到驱动器并设置,您将被提示移除引导媒体并允许重新启动系统。 +安装将按指定来设置驱动器。安装文件将从引导媒体复制到硬盘驱动器,如图 9 所示。所有内容复制到硬盘并设置好,您将被提示移除引导介质并允许重新启动系统。 ![Figure 09.png](https://www.linux.org/attachments/figure-09-png.679/) -**FIGURE 9** -**图 9** +*图 9* -After the restart, if you selected to require the User to log in, then you will be given a screen like Figure 10\. Here you enter the password you specified for the User and log onto Ubuntu GamePack. - -重新启动后,您需要选择用户登录,会得到类似于图10的屏幕\\。输入指定的用户密码登录到 Ubuntu Gamepack。 +重新启动后,您需要选择要求用户登录,会得到类似于图 10 的屏幕。输入指定的用户密码登录到 Ubuntu Gamepack。 ![Figure 10.png](https://www.linux.org/attachments/figure-10-png.680/) -**FIGURE 10** -**图 10** +*图 10* -After you log onto Ubuntu GamePack you should probably try to perform any software upgrades which may be necessary. Open a Terminal and enter the following two commands: - -当你登录到 Ubuntu Gamepack 你应该尝试执行可能需要的任何软件升级。打开一个终端并输入以下两个命令: +当你登录到 Ubuntu Gamepack 你应该尝试执行可能需要的软件升级。打开一个终端并输入以下两个命令: +``` sudo apt-get update && sudo apt-get upgrade +``` Any updates which are not installed should be installed to bring the GamePack system up-to-date. -更新会安装 GamePack 系统定制的软件更新。 +任何没有安装的更新都应该安装,以便 GamePack 系统保持更新。 -Now, simply look through the menu and find the games you wish to play. Open the emulators or any of the game services like Steam. - -现在,只要看看菜单,找到你想玩的游戏就行了。打开模拟器或任何游戏服务如 Steam 。 - -Hope you enjoy the GamePack and have fun! +现在,只要看看菜单,找到你想玩的游戏就行了,打开模拟器或其它像 Steam 的游戏服务 。 希望你喜欢 Gamepack 并且玩得高兴! + -------------------------------------------------------------------------------- via: https://www.linux.org/threads/ubuntu-gamepack.4559/ -作者:[Jarret B ][a] +作者:[Jarret B][a] 译者:[stevenzdg988](https://github.com/stevenzdg988) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From a79f28e3f3f3c457dc5ceb9eae5919e6c27b3550 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 11 Jul 2017 18:24:23 +0800 Subject: [PATCH 086/100] PUB:20170529 Ubuntu GamePack.md @stevenzdg988 https://linux.cn/article-8686-1.html --- {translated/tech => published}/20170529 Ubuntu GamePack.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20170529 Ubuntu GamePack.md (100%) diff --git a/translated/tech/20170529 Ubuntu GamePack.md b/published/20170529 Ubuntu GamePack.md similarity index 100% rename from translated/tech/20170529 Ubuntu GamePack.md rename to published/20170529 Ubuntu GamePack.md From 69dbeb2f3b5392e331afe9fe313e6bfc4b3b92be Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 11 Jul 2017 22:37:54 +0800 Subject: [PATCH 087/100] PRF&PUB:20170620 How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 .md @geekpi --- ...k Clash Vulnerability CVE-2017-1000364 .md | 131 +++++++++--------- 1 file changed, 69 insertions(+), 62 deletions(-) rename {translated/tech => published}/20170620 How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 .md (83%) diff --git a/translated/tech/20170620 How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 .md b/published/20170620 How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 .md similarity index 83% rename from translated/tech/20170620 How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 .md rename to published/20170620 How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 .md index 61ee08ca50..5c93e5c8d0 100644 --- a/translated/tech/20170620 How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 .md +++ b/published/20170620 How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 .md @@ -1,79 +1,54 @@ -如何修补和保护 Linux 内核堆栈冲突漏洞 CVE-2017-1000364 [ 2017.6.19 ] +如何修补和保护 Linux 内核堆栈冲突漏洞 CVE-2017-1000364 ============================================================ - [![](https://www.cyberciti.biz/media/new/category/old/linux-logo.png)][12] 在 Linux 内核中发现了一个名为 “Stack Clash” 的严重安全问题,攻击者可能会利用它来破坏内存并执行任意代码。攻击者可以利用另一个漏洞来执行任意代码并获得管理/root 帐户权限。在 Linux 中该如何解决这个问题? +在 Linux 内核中发现了一个名为 “Stack Clash” 的严重安全问题,攻击者能够利用它来破坏内存数据并执行任意代码。攻击者可以利用这个及另一个漏洞来执行任意代码并获得管理帐户(root)权限。 + +在 Linux 中该如何解决这个问题? [![the-stack-clash-on-linux-openbsd-netbsd-freebsd-solaris](https://www.cyberciti.biz/media/new/faq/2017/06/the-stack-clash-on-linux-openbsd-netbsd-freebsd-solaris.jpeg)][22] -Qualys 研究实验室在 GNU C Library(CVE-2017-1000366)的动态链接器中发现了许多问题,它们通过与 Linux 内核的堆栈冲突来允许本地特权升级。这个 bug 在 i386 和 amd64 上影响 Linux、OpenBSD、NetBSD、FreeBSD 和 Solaris。攻击者可以利用它来破坏内存并执行任意代码。 + +Qualys 研究实验室在 GNU C Library(CVE-2017-1000366)的动态链接器中发现了许多问题,它们通过与 Linux 内核内的堆栈冲突来允许本地特权升级。这个 bug 影响到了 i386 和 amd64 上的 Linux、OpenBSD、NetBSD、FreeBSD 和 Solaris。攻击者可以利用它来破坏内存数据并执行任意代码。 ### 什么是 CVE-2017-1000364 bug? -[来自 RHN][13]: +[来自 RHN][13]: -> 在用户空间二进制文件的堆栈中分配内存的方式发现了一个缺陷。如果堆(或不同的内存区域)和堆栈内存区域彼此相邻,则攻击者可以使用此缺陷跳过堆栈保护区域,从而导致进程堆栈或相邻内存区域受到控制的内存损坏,从而增加其系统权限。有一个在内核中减轻这个漏洞的方法,将堆栈保护区域大小从一页增加到 1 MiB,从而使成功利用这个功能变得困难。 +> 在用户空间二进制文件的堆栈中分配内存的方式发现了一个缺陷。如果堆(或不同的内存区域)和堆栈内存区域彼此相邻,则攻击者可以使用此缺陷跳过堆栈保护区域,从而导致进程堆栈或相邻内存区域的受控内存损坏,从而增加其系统权限。有一个在内核中减轻这个漏洞的方法,将堆栈保护区域大小从一页增加到 1 MiB,从而使成功利用这个功能变得困难。 -[As per the original research post][14]: +[据原研究文章][14]: > 计算机上运行的每个程序都使用一个称为堆栈的特殊内存区域。这个内存区域是特别的,因为当程序需要更多的堆栈内存时,它会自动增长。但是,如果它增长太多,并且与另一个内存区域太接近,程序可能会将堆栈与其他内存区域混淆。攻击者可以利用这种混乱来覆盖其他内存区域的堆栈,或者反过来。 -### 收到影响的 Linux 发行版 +### 受到影响的 Linux 发行版 1. Red Hat Enterprise Linux Server 5.x - 2. Red Hat Enterprise Linux Server 6.x - 3. Red Hat Enterprise Linux Server 7.x - 4. CentOS Linux Server 5.x - 5. CentOS Linux Server 6.x - 6. CentOS Linux Server 7.x - 7. Oracle Enterprise Linux Server 5.x - 8. Oracle Enterprise Linux Server 6.x - 9. Oracle Enterprise Linux Server 7.x - 10. Ubuntu 17.10 - 11. Ubuntu 17.04 - 12. Ubuntu 16.10 - 13. Ubuntu 16.04 LTS - 14. Ubuntu 12.04 ESM (Precise Pangolin) - 15. Debian 9 stretch - 16. Debian 8 jessie - 17. Debian 7 wheezy - 18. Debian unstable - 19. SUSE Linux Enterprise Desktop 12 SP2 - 20. SUSE Linux Enterprise High Availability 12 SP2 - 21. SUSE Linux Enterprise Live Patching 12 - 22. SUSE Linux Enterprise Module for Public Cloud 12 - 23. SUSE Linux Enterprise Build System Kit 12 SP2 - 24. SUSE Openstack Cloud Magnum Orchestration 7 - 25. SUSE Linux Enterprise Server 11 SP3-LTSS - 26. SUSE Linux Enterprise Server 11 SP4 - 27. SUSE Linux Enterprise Server 12 SP1-LTSS - 28. SUSE Linux Enterprise Server 12 SP2 - 29. SUSE Linux Enterprise Server for Raspberry Pi 12 SP2 ### 我需要重启我的电脑么? @@ -82,9 +57,13 @@ Qualys 研究实验室在 GNU C Library(CVE-2017-1000366)的动态链接器 ### 我该如何在 Linux 中修复 CVE-2017-1000364? -根据你的 Linux 发行版输入命令。你需要重启电脑。在应用补丁之前,记下你当前内核的版本: -`$ uname -a -$ uname -mrs` +根据你的 Linux 发行版来输入命令。你需要重启电脑。在应用补丁之前,记下你当前内核的版本: + +``` +$ uname -a +$ uname -mrs +``` + 示例输出: ``` @@ -93,8 +72,12 @@ Linux 4.4.0-78-generic x86_64 ### Debian 或者 Ubuntu Linux -输入下面的[ apt 命令][15]/[apt-get 命令][16]来应用更新: -`$ sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade` +输入下面的 [apt 命令][15] / [apt-get 命令][16]来应用更新: + +``` +$ sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade +``` + 示例输出: ``` @@ -182,53 +165,77 @@ Setting up linux-headers-4.9.0-3-amd64 (4.9.30-2+deb9u1) ... Processing triggers for libc-bin (2.24-11+deb9u1) ... ``` -使用[ reboot 命令][17]重启桌面/服务器: -`$ sudo reboot` +使用 [reboot 命令][17]重启桌面/服务器: + +``` +$ sudo reboot +``` ### Oracle/RHEL/CentOS/Scientific Linux -输入下面的[ yum 命令][18]: -`$ sudo yum update -$ sudo reboot` +输入下面的 [yum 命令][18]: + +``` +$ sudo yum update +$ sudo reboot +``` ### Fedora Linux 输入下面的 dnf 命令: -`$ sudo dnf update -$ sudo reboot` + +``` +$ sudo dnf update +$ sudo reboot +``` ### Suse Enterprise Linux 或者 Opensuse Linux 输入下面的 zypper 命令: -`$ sudo zypper patch -$ sudo reboot` + +``` +$ sudo zypper patch +$ sudo reboot +``` ### SUSE OpenStack Cloud 6 -`$ sudo zypper in -t patch SUSE-OpenStack-Cloud-6-2017-996=1 -$ sudo reboot` +``` +$ sudo zypper in -t patch SUSE-OpenStack-Cloud-6-2017-996=1 +$ sudo reboot +``` ### SUSE Linux Enterprise Server for SAP 12-SP1 -`$ sudo zypper in -t patch SUSE-SLE-SAP-12-SP1-2017-996=1 -$ sudo reboot` +``` +$ sudo zypper in -t patch SUSE-SLE-SAP-12-SP1-2017-996=1 +$ sudo reboot +``` ### SUSE Linux Enterprise Server 12-SP1-LTSS -`$ sudo zypper in -t patch SUSE-SLE-SERVER-12-SP1-2017-996=1 -$ sudo reboot` +``` +$ sudo zypper in -t patch SUSE-SLE-SERVER-12-SP1-2017-996=1 +$ sudo reboot +``` ### SUSE Linux Enterprise Module for Public Cloud 12 -`$ sudo zypper in -t patch SUSE-SLE-Module-Public-Cloud-12-2017-996=1 -$ sudo reboot` +``` +$ sudo zypper in -t patch SUSE-SLE-Module-Public-Cloud-12-2017-996=1 +$ sudo reboot +``` ### 验证 你需要确认你的版本号在 [reboot 命令][19]之后改变了。 -`$ uname -a + +``` +$ uname -a $ uname -r -$ uname -mrs` +$ uname -mrs +``` + 示例输出: ``` @@ -252,15 +259,15 @@ Linux 4.4.0-81-generic x86_64 Vivek Gite -作者是 nixCraft 的创始人,对于 Linux 操作系统/Unix shell脚本有经验丰富的系统管理员和培训师。他曾与全球客户及各行各业,包括IT、教育、国防和空间研究以及非营利部门合作。在 [Twitter][1]、[Facebook] [2]、[Google +] [3] 上关注他。 +作者是 nixCraft 的创始人,对于 Linux 操作系统/Unix shell脚本有经验丰富的系统管理员和培训师。他曾与全球客户及各行各业,包括 IT、教育、国防和空间研究以及非营利部门合作。在 [Twitter][1]、[Facebook] [2]、[Google +] [3] 上关注他。 -------------------------------------------------------------------------------- via: https://www.cyberciti.biz/faq/howto-patch-linux-kernel-stack-clash-vulnerability-cve-2017-1000364/ -作者:[Vivek Gite ][a] +作者:[Vivek Gite][a] 译者:[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/) 荣誉推出 From 2308be3847f9e343f49cbb53e03863d9502cb163 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 12 Jul 2017 09:04:05 +0800 Subject: [PATCH 088/100] translated --- ...te to open source when you have no time.md | 97 ------------------- ...te to open source when you have no time.md | 95 ++++++++++++++++++ 2 files changed, 95 insertions(+), 97 deletions(-) delete mode 100644 sources/tech/20170622 8 ways to contribute to open source when you have no time.md create mode 100644 translated/tech/20170622 8 ways to contribute to open source when you have no time.md diff --git a/sources/tech/20170622 8 ways to contribute to open source when you have no time.md b/sources/tech/20170622 8 ways to contribute to open source when you have no time.md deleted file mode 100644 index ca41524d02..0000000000 --- a/sources/tech/20170622 8 ways to contribute to open source when you have no time.md +++ /dev/null @@ -1,97 +0,0 @@ -translating----geekpi - -8 ways to contribute to open source when you have no time -============================================================ - -### Find the time in your busy life to give back to the projects you care about. - -![8 ways to contribute to open source when you have no time](https://opensource.com/sites/default/files/styles/image-full-size/public/images/law/LAW-patent_reform_520x292_10136657_1012_dc.png?itok=zLMswcrw "8 ways to contribute to open source when you have no time") -Image by : opensource.com - -One of the [most common reasons][3] people give for not contributing (or not contributing more) to open source is a lack of time. I get it; life is challenging, and there are so many priorities vying for your limited attention. So how can you find the time in your busy life to contribute to the open source projects you care about? - -In the interest of full disclosure, I should warn you that I was late getting this article to the editors because I couldn't find the time to work on it. Take my advice at your own risk. - -### Figure out what you care about - -The first step in contributing is to figure out what exactly you're making time for. Do you have a project of your own that you want to work on? Is there a specific project that you use that you want to help with? Do you just want to do  _something_ ? Figuring out what you're making time for will help you decide where in your life's priorities it belongs. - -### Find alternate ways to contribute - -Writing a new feature can take many hours of design, coding, and testing. It's not always easy to work on that for a few minutes, step away, and then pick up where you left off. If you never get more than 30 minutes of uninterrupted effort, you might find yourself pretty frustrated if you try to take on a big task. - -But there are other ways to contribute that might satisfy your need to give back within the time you have available. Some of them can be done in quick spurts from a smartphone, which means you can take the time you used to spend avoiding people on your commute and put it toward your open source contributions. Here's a list of some things that can be done in small chunks: - -* **Bug triage:** Do all of the bug reports have the information necessary to diagnose and resolve them? Are they properly filed (to the right area, with the right severity, etc.)? - -* **Mailing list support:** Are users or other contributors asking questions on the mailing list? Maybe you can help. - -* **Documentation patches:** Documentation can often (but not always) be worked on in smaller chunks than code. Maybe there are a few places you can fill in. Or maybe it's time to run through the docs and make sure they're still accurate. - -* **Marketing:** Talk about your project or community on social media. Write a quick blog post. Vote and comment on news aggregators. - -### Talk to your boss - -You might think you can't work on open source projects during the workday, but have you  _asked_ ? Particularly if the project somehow relates to your day job, you might be able to sell your boss on letting you make contributions while at work. Note that there may be some intellectual property issues (e.g., who owns the rights to the code you contribute during working hours), so do your research first and get the conditions in writing. - -### Set deadlines - -The best time management advice I ever received can be summarized with two rules: - -1. If it's going to get done, it has to have a deadline - -2. It's okay to change a deadline - -This article had a deadline. There's no particular time sensitivity to it, but a deadline meant that I defined when I wanted to get it done and gave the editors a sense of when it might be submitted. And yes, as I said above, I missed the deadline. You know what happened? I set a new deadline (second time's a charm!). - -If something  _is_  time-sensitive, set the deadline well ahead to give yourself some space if you need to push it back a time or two. - -### Put it on your calendar - -If you use a calendar to schedule the rest of your life, scheduling some time to work on your open source project may be the only way to get it done. How much time you schedule is up to you, but even if you block off only one hour once a week as open source time, that still gives you an hour a week of open source time. - -And here's a secret: It's okay to cancel on yourself sometimes if you need the time to do something else—or do nothing at all. - -### Reclaim unused time - -Are you bored on your commute? Are you having trouble falling asleep at night? Maybe you can use that time to contribute. Now I happen to think the "work 169 hours a week at full tilt" lifestyle is a terrible, terrible thing. That said, some nights you just can't fall asleep. Instead of lying in bed, seeing what your Twitter friends on the other side of the world are up to (which I do), maybe you can work on that contribution you've been meaning to get around to. Just don't make a habit out of forgoing sleep. - -### Stop - -Sometimes the best way to contribute is to not contribute for a little bit. You're a busy person and no matter how awesome you are, you can't avoid your physiological and psychological needs. They will catch up to you. Taking a little time to refresh yourself might improve your productivity enough that you get stuff done faster, and suddenly there's time for you to make those open source contributions you've been meaning to get around to. - -### Say "no" - -I am bad at this. So very bad. But none of us can do everything we'd like to do. Sometimes the best thing you can do to contribute is to stop contributing in the same way you have been—or not contribute at all (see above). - -Several years ago, I led the Fedora documentation team. The team's tradition was that the leader would offer to step aside at the end of each release. I had done that a time or two and nobody stepped up, so I remained in the role. But after my second or third release, I made it clear that I would not be continuing as the team lead. I still enjoyed the work, but I was working full time, in graduate school half time, and my wife was pregnant with our first child. There was no way I could consistently give the level of effort that was required, so I stepped aside. I continued to contribute, but in a less-demanding capacity. - -If you're getting to the point where you struggle to find the time to meet your obligations (self-imposed or not), then perhaps it's time to reconsider your role. This can be especially hard with a project that you founded or have made a considerable investment in. But sometimes you have to—for your own good and that of the project. - -### What else? - -How do you find time to make your contributions? Let us know in the comments. - --------------------------------------------------------------------------------- - -作者简介: - -Ben Cotton - Ben Cotton is a meteorologist by training and a high-performance computing engineer by trade. Ben works as a technical evangelist at Cycle Computing. He is a Fedora user and contributor, co-founded a local open source meetup group, and is a member of the Open Source Initiative and a supporter of Software Freedom Conservancy. Find him on Twitter (@FunnelFiasco) or at - - ----------- - -via: https://opensource.com/article/17/6/find-time-contribute - -作者:[Ben Cotton ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/bcotton -[1]:https://opensource.com/article/17/6/find-time-contribute?rate=qWRgPXlhEZchh_vXEplj6jLXd7P0QCwzxZFWYkqawCc -[2]:https://opensource.com/user/30131/feed -[3]:http://naramore.net/blog/why-people-don-t-contribute-to-os-projects-and-what-we-can-do-about-it -[4]:https://opensource.com/users/bcotton -[5]:https://opensource.com/article/17/6/find-time-contribute#comments diff --git a/translated/tech/20170622 8 ways to contribute to open source when you have no time.md b/translated/tech/20170622 8 ways to contribute to open source when you have no time.md new file mode 100644 index 0000000000..8f67d79394 --- /dev/null +++ b/translated/tech/20170622 8 ways to contribute to open source when you have no time.md @@ -0,0 +1,95 @@ +当没有时间的时候,8种为开源做贡献的方式 +============================================================ + +### 在忙碌的生活中抽出时间回馈给你关心的项目。 + +![8 ways to contribute to open source when you have no time](https://opensource.com/sites/default/files/styles/image-full-size/public/images/law/LAW-patent_reform_520x292_10136657_1012_dc.png?itok=zLMswcrw "8 ways to contribute to open source when you have no time") +图片提供: opensource.com + +人们不给开源做贡献(或不贡献更多)的[常见原因][3]之一是缺乏时间。我了解生活是有挑战性的,有这么多的优先的事情争夺你有限的注意力。那么,如何才能在忙碌的生活中为你关心的开源项目抽出时间呢? + +为了充分说明,我应该警告你,我推迟了将这篇文章给编辑,因为我抽不出时间在这上面。请自行承担风险。 + +### 找出你关心的 + +贡献的第一步是弄清楚你正在做些什么。你有想要贡献的项目吗?有没有一个你想要帮助的具体项目?你只想做_一些_事情吗?弄清楚你正在做的事情将帮助你决定你的生活中的优先事项。 + +### 找出其他的方法贡献 + +编写新功能可能需要数小时的设计、编码和测试。离开之后在几分钟之内从原来的地方重新开始并不容易。如果你没有大于 30 分钟的无中断工作并且你承担的是一个大的任务,你或许会感到沮丧。 + +但还有其他方式可以帮助满足你在空闲的时间内回馈。其中一些可以通过智能手机快速完成,这意味着人们避免在通勤上浪费时间,并将其用于开源贡献。以下是可以在小块时间中完成的一些事情列表: + +* **Bug 分类:** 所有的 bug 报告都有必要的信息来诊断和解决它们么?它们是否妥善提交(给正确的范围,正确的严重程度等)了么? + +* **邮件列表支持:** 用户或其他贡献者在邮件列表中提出问题?也许你可以帮忙。 + +* **文档修补:** 文档可以经常(但不总是)比代码用更小块的时间来处理。也许有几个地方你可以填写,或者也许是时候浏览一下文档,并确保它们仍然准确。 + +* **营销:** 在社交媒体上谈论你的项目或者社区。写一篇快速入门博文。投票并评论新闻聚合。 + +### 与你的老板交谈 + +你可能会认为在工作日你不能在开源项目上工作,但是你有_问过么_? 特别是如果这个项目以某种方式与你的日常工作相关,那你可能可以卖掉你的老板,让你可在工作时做出贡献。请注意,可能存在一些知识产权问题(例如,谁拥有你在工作时间内提供的代码的权利),因此首先做你的研究并以书面形式获得授权。 + +### 设置最后期限 + +我得到的最佳时间管理建议可以归纳为两个规则: + +1. 如果要完成,它必须有一个截止日期 + +2. 可以更改最后期限 + +这篇文章有一个最后期限。它没有特别的时间敏感性,但最后期限意味着我定义了什么时候想完成它,并给编辑者一个什么时候可以提交的感觉。是的,如上所述,我错过了最后期限。你知道发生了什么事么?我设定了一个新的期限(第二次是个魅力!)。 + +如果有些事_是_时间敏感的,如果你需要返工一两次,设置最后期限可以给你一些空间。 + +### 将它放到你的日程上 + +如果你使用日历安排你的生活,那用它安排一些时间来开展你的开源项目,可能是完成此项工作的唯一方法。你计划多少时间取决于你自己,但即使你每周只用一小时作为开源时间,这仍会给你每周一小时的开源时间。 + +这有一个秘密:有时候,如果你需要时间去做别的事情,或者什么都不做,那么可以自己取消它。 + +### 开拓未使用的时间 + +你在通勤中感到无聊吗?你晚上睡觉困难么?也许你可以利用这个时间来贡献。现在我认为“每周完全投入工作 169 个小时”的生活方式是一件非常可怕的事情。也就是说,有些夜晚你不能入睡。也许你已经意识到了可以做贡献,而不是躺在床上看看你的 Twitter 上的朋友在世界的另一边做了什么(如我做的)。就是不要养成放弃睡眠的习惯。 + +### 停止 + +有时,贡献最好的方式是一点不贡献。你是一个忙碌的人,不管你是多么的棒,你不能避免你的生理和心理需要。它们会找上你。花点时间来休息,这可以提高你的生产力,使你的工作更快,突然间你就有时间去做那些你一直想做的开源贡献了。 + +### 说“不” + +我不擅长这个,所以这很糟糕。但是没有人能做任何想做的事情。有时候,你可以做的最好的事情是停止贡献,就像以前一样,或者没有贡献(参见上文)。 + +几年前,我领导了 Fedora 文档团队。团队的传统是,在每次发布结束时, 领导会主动提出靠边站。我已经做了一两次,没有人加强,所以我保持着这个角色。但是在我的第二或第三次发布之后,我明确表示,我不会继续担任团队领导。我还是很喜欢这份工作,但我正在全职工作,在研究生一半时,我的妻子怀了我们的第一个孩子。我没有办法做到始终如一的努力,所以我退出领导了。我继续做出贡献,但是在要求较低的能力的位置中。 + +如果你正在努力抽出时间来满足你的义务(自我强加或者不是),那么也许现在是重新考虑你的角色了。你建立的可能是一个特别困难的项目或者考虑让投资进入。但有时你不得不这么做-为了你自己好以及项目本身。 + +### 其他还有什么? + +你如何找到时间作出贡献? 让我们在评论中知道。 + +-------------------------------------------------------------------------------- + +作者简介: + +Ben Cotton - Ben Cotton 是一个培训过的气象学家和一个职业的高效计算机工程师。 Ben 在 Cycle Computing 做技术传教士。他是 Fedora 用户和贡献者,合作创办当地的一个开源集会,是一名开源倡议者和软件自由机构的支持者。他的推特 (@FunnelFiasco) + + +---------- + +via: https://opensource.com/article/17/6/find-time-contribute + +作者:[Ben Cotton ][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/bcotton +[1]:https://opensource.com/article/17/6/find-time-contribute?rate=qWRgPXlhEZchh_vXEplj6jLXd7P0QCwzxZFWYkqawCc +[2]:https://opensource.com/user/30131/feed +[3]:http://naramore.net/blog/why-people-don-t-contribute-to-os-projects-and-what-we-can-do-about-it +[4]:https://opensource.com/users/bcotton +[5]:https://opensource.com/article/17/6/find-time-contribute#comments From 358a186fac0a9698d5f57a07fffcfe2389bb778c Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 12 Jul 2017 09:43:51 +0800 Subject: [PATCH 089/100] translating --- sources/tech/20170209 Inside Real-Time Linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170209 Inside Real-Time Linux.md b/sources/tech/20170209 Inside Real-Time Linux.md index ddfe0812a5..b983d30c42 100644 --- a/sources/tech/20170209 Inside Real-Time Linux.md +++ b/sources/tech/20170209 Inside Real-Time Linux.md @@ -1,3 +1,5 @@ +translating---geekpi + Inside Real-Time Linux ============================================================ From 99a9f7a7a2bc0188bc15e972fed40ae3d4767dcf Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 13 Jul 2017 08:41:21 +0800 Subject: [PATCH 090/100] translated --- .../tech/20170209 Inside Real-Time Linux.md | 79 ------------------- .../tech/20170209 Inside Real-Time Linux.md | 77 ++++++++++++++++++ 2 files changed, 77 insertions(+), 79 deletions(-) delete mode 100644 sources/tech/20170209 Inside Real-Time Linux.md create mode 100644 translated/tech/20170209 Inside Real-Time Linux.md diff --git a/sources/tech/20170209 Inside Real-Time Linux.md b/sources/tech/20170209 Inside Real-Time Linux.md deleted file mode 100644 index b983d30c42..0000000000 --- a/sources/tech/20170209 Inside Real-Time Linux.md +++ /dev/null @@ -1,79 +0,0 @@ -translating---geekpi - -Inside Real-Time Linux -============================================================ - - - ![Jan Altenberg](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/jan-altenberg-elc.png?itok=mgQeKpEK "Jan Altenberg") - -Real-time Linux has come a long way in the past decade. Jan Altenberg of Linutronix provides an overview of the topic and offers new RTL performance benchmarks in this video from ELC Europe.[The Linux Foundation][1] - -Real-time Linux (RTL), a form of mainline Linux enabled with PREEMPT_RT, has come a long way in the past decade. Some 80 percent of the deterministic [PREEMPT_RT][3] patch is now available in the mainline kernel itself. Yet, backers of the strongest alternative to the single-kernel RTL on Linux -- the dual-kernel Xenomai -- continue to claim a vast superiority in reduced latency. In an [Embedded Linux Conference Europe][4] presentation in October, Jan Altenberg rebutted these claims while offering an overview of the real-time topic. - -Altenberg, of German embedded development firm [Linutronix][5], does not deny that dual-kernel approaches such as Xenomai and RTAI offer lower latency. However, he reveals new Linutronix benchmarks that purport to show that the differences are not as great as claimed, especially in real-world scenarios. Less controversially, he argues that RTL is much easier to develop for and maintain. - -Before we delve into the eternal Xenomai vs. RTL debate, note that in October 2015, the [Open Source Automation Development Lab][6] (OSADL) [handed control][7] of the RTL project over to The Linux Foundation, which hosts Linux.com. In addition, Linutronix is a key contributor to the RTL project and hosts its x86 maintainer. - -The advance of RTL is one of several reasons Linux has [stolen market share][8] from real-time operating systems (RTOSes) over the past decade. RTOSes appear more frequently on microcontrollers than applications processors, and it's easier to do real-time on single-purpose devices that lack advanced userland OSes such as Linux. - -Altenberg began his presentation by clearing up some common misconceptions about real-time (or realtime) deterministic kernel schemes. “Real-time is not about fast execution or performance,” Altenberg told his ELCE audience. “It’s basically about determinism and timing guarantees. Real-time gives you a guarantee that something will execute within a given time frame. You don’t want to be as fast as possible, but as fast as specified.” - -Developers tend to use real-time when a tardy response to a given execution time leads to a serious error condition, especially when it could lead to people getting hurt. That’s why real-time is still largely driven by the factory automation industry and is increasingly showing up in cars, trains, and planes. It’s not always a life-and-death situation, however -- financial services companies use RTL for high-frequency trading. - -Requirements for real-time include deterministic timing behavior, preemption, priority inheritance, and priority ceiling, said Altenberg. “The most important requirement is that a high-priority task always needs to be able to preempt a low-priority task.” - -Altenberg strongly recommended against using the term “soft real-time” to describe lightweight real-time solutions. “You can be deterministic or not, but there’s nothing in between.” - -### Dual-kernel Real-time - -Dual-kernel schemes like Xenomai and RTAI deploy a microkernel running in parallel with a separate Linux kernel, while single kernel schemes like RTL make Linux itself capable of real-time. “With dual-kernel, Linux can get some runtime when priority real-time applications aren’t running on the microkernel,” said Altenberg. “The problem is that someone needs to maintain the microkernel and support it on new hardware. This is a huge effort, and the development communities are not very big. Also, because Linux is not running directly on the hardware, you need a hardware abstraction layer (HAL). With two things to maintain, you’re usually a step behind mainline Linux development.” - -The challenge with RTL, and the reason it has taken so long to emerge, is that “to make Linux real-time you have to basically touch every file in the kernel,” said Altenberg. Yet, most of that work is already done and baked into mainline, and developers don’t need to maintain a microkernel or HAL. - -Altenberg went on to explain the differences between the RTAI and Xenomai. “With RTAI, you write a kernel module that is scheduled by a microkernel. It’s like kernel development -- really hard to get into it and hard to debug.” - -RTAI development can be further complicated because industrial customers often want to include closed source code along with GPL kernel code. “You have to decide which parts you can put into userland and which you put into the kernel with real-time approaches,” said Altenberg. - -RTAI also supports fewer hardware platforms than RTL, especially beyond x86\. The dual-kernel Xenomai, which has eclipsed RTAI as the dominant dual-kernel approach, has wider OS support than RTAI. More importantly, it offers “a proper solution for doing real-time in userspace,” said Altenberg. “To do this, they implemented the concept of skins -- an emulation layer for the APIs of different RTOSes, such as POSIX. This lets you reuse a subset of existing code from some RTOSes.” - -With Xenomai, however, you still need to maintain a separate microkernel and HAL. Limited development tools are another problem. “As with RTAI, you can’t use the standard C library,” said Altenberg. “You need special tools and libraries. Even for POSIX, you must link to the POSIX skin, which is much more complicated.” With either platform, he added, it’s hard to scale the microkernels beyond 8 to 16 CPUs to the big server clusters used in financial services. - -### Sleeping Spinlocks - -The dominant single-kernel solution is RTL, based on PREEMPT.RT, which was primarily developed by Thomas Gleixner and Ingo Molnár more than a decade ago. PREEMPT.RT reworks the kernel’s “spinlock” locking primitives to maximize the preemptible sections inside the Linux kernel. (PREEMPT.RT was originally called the Sleeping Spinlocks Patch.) - -Instead of running interrupt handlers in hard interrupt context, PREEMPT.RT runs them in kernel threads. “When an interrupt arrives, you don’t run the interrupt handler code,” said Altenberg. “You just wake up the corresponding kernel thread, which runs the handler. This has two advantages: The kernel thread becomes interruptible, and it shows up in the process list with a PID. So you can put a low priority on non-important interrupts and a higher priority on important userland tasks.” - -Because about 80 percent of PREEMPT.RT is already in mainline, any Linux developer can take advantage of PREEMPT.RT-originated kernel components such as timers, interrupt handlers, tracing infrastructure, and priority inheritance. “When they made Linux real-time, everything became preemptible, so we found a lot of race conditions and locking problems,” said Altenberg. “We fixed these and pushed them back into mainline to improve the stability of Linux in general.” - -Because RTL is primarily mainline Linux, “PREEMPT.RT is widely accepted and has a huge community,” said Altenberg. “If you write a real-time application, you don’t need to know much about PREEMPT.RT. You don’t need any special libraries or APIs, just a standard C library, a Linux driver, and POSIX app.” - -You still need to run a patch to use PREEMPT.RT, which is updated in every second Linux version. However, within two years, the remaining 20 percent of PREEMPT.RT should make it into Linux, so you “won’t need a patch.” - -Finally, Altenberg revealed the results of his Xenomai vs. RTL latency tests. “There are a lot of papers that claim that Xenomai and RTAI are way faster on latency than PREEMPT.RT,” said Altenberg. “But I figured out that most of the time PREEMPT.RT was poorly configured. So we brought in both a Xenomai expert and a PREEMPT.RT expert, and let them configure their own platforms.” - -While Xenomai performed better on most tests, and offered far less jitter, the differences were not as great as the 300 to 400 percent latency superiority claimed by some Xenomai boosters, said Altenberg. When tests were performed on userspace tasks -- which Altenberg says is the most real-world, and therefore the most important, test -- the worst-case reaction was about 90 to 95 microseconds for both Xenomai and RTL/PREEMPT.RT, he claimed. - -When they isolated a single CPU in the dual Cortex-A9 system for handling the interrupt in question, which Altenberg says is fairly common, PREEMPT.RT performed slightly better, coming in around 80 microseconds. (For more details, check out the video about 33 minutes in.) - -Altenberg acknowledges that his 12-hour test is the bare minimum, compared to OSADL’s two- to three-year tests, and that it is “not a mathematical proof.” In any case, he suggests that RTL deserves a handicap considering its easier development process. “In my opinion, it’s not fair to compare a full-featured Linux system with a microkernel,” he concluded. - --------------------------------------------------------------------------------- - -via: https://www.linux.com/news/event/open-source-summit-na/2017/2/inside-real-time-linux - -作者:[ERIC BROWN][a] -译者:[译者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/ericstephenbrown -[1]:https://www.linux.com/licenses/category/linux-foundation -[2]:https://www.linux.com/files/images/jan-altenberg-elcpng -[3]:https://www.linux.com/blog/intro-real-time-linux-embedded-developers -[4]:http://events.linuxfoundation.org/events/archive/2016/embedded-linux-conference-europe -[5]:https://linutronix.de/ -[6]:http://archive.linuxgizmos.com/celebrating-the-open-source-automation-development-labs-first-birthday/ -[7]:http://linuxgizmos.com/real-time-linux-shacks-up-with-the-linux-foundation/ -[8]:https://www.linux.com/news/embedded-linux-keeps-growing-amid-iot-disruption-says-study diff --git a/translated/tech/20170209 Inside Real-Time Linux.md b/translated/tech/20170209 Inside Real-Time Linux.md new file mode 100644 index 0000000000..400a48eb29 --- /dev/null +++ b/translated/tech/20170209 Inside Real-Time Linux.md @@ -0,0 +1,77 @@ +深入实时 Linux +============================================================ + + + ![Jan Altenberg](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/jan-altenberg-elc.png?itok=mgQeKpEK "Jan Altenberg") + +实时 Linux 在过去十年中已经走了很长的路。Linutronix 的 Jan Altenberg 提供了对该主题做了概述,并在 ELC Europe 的视频中提供了新的 RTL 性能基准。[Linux基金会] [1] + +实时 Linux(RTL)是一种启用 PREEMPT_RT 的主线 Linux,在过去十年中已经走了很长的路。大约 80% 的确定性 [PREEMPT_RT][3] 补丁现在可用于主线内核本身。然而, Linux 上单内核 RTL 的最强大的替代品-双内核 Xenomai-继续声称在减少延迟上有巨大的优势。在 10 月的 [欧洲嵌入式 Linux 会议][4]的演示中,Jan Altenberg 反驳了这些声明,同时对实时主题做了论述。 + +德国嵌入式开发公司 [Linutronix][5] 的 Altenberg 并不否认 Xenomai 和 RTAI 等双核方法提供较低的延迟。然而,他揭示了新的 Linutronix 基准,旨在表明差异不如所声称的那样大,特别是在现实世界中。更少争议地,他认为 RTL 更易于开发和维护。 + +在我们深入永恒的 Xenomai 对 RTL 的辩论之前,请注意,2015 年 10 月,RTL 项目的[开源自动化开发实验室][6](OSADL)[将控制权][7]转移给了管理 Linux.com 的 Linux 基金会。此外,Linutronix 是 RTL 项目的主要贡献者,并承担了 x86 的维护者。 + +RTL 的进步是过去十年中 Linux 从实时操作系统(RTOS)中[获得市场占有率][8]的几个原因之一。实时操作系统在微控制器上比应用处理器上更频繁出现,并且在缺乏高级用户级操作系统(如Linux)的单用途设备上实现实时很简单。 + +Altenberg 通过清除关于实时确定性内核方案的一些常见的误解开始他的演讲。Altenberg 告诉他的 ELCE 观众:“实时不是快速执行或性能,这基本上是决定论和定时保证。实时为你提供保证,某些内容将在给定的时间内执行。你不想要尽可能快,但是要尽块指定。” + +在给定的执行时间内的迟缓的反应会导致严重后果,特别是当它可能导致人们受到伤害时,开发人员往往会使用实时的方式。这就是为什么实时性仍然在很大程度上受到工厂自动化行业的驱动,并且越来越多地出现在汽车、火车和飞机上。然而,并不总是生死攸关的情况 - 金融服务公司使用 RTL 进行高频交易。 + +Altenberg 说:“实时需求包括确定性定时表现、抢占、优先级继承和优先级上限。最重要的要求是高优先级任务总是需要能够抢占低优先级的任务。” + +Altenberg 强烈建议不要使用术语“软实时”来描述轻量级实时解决方案。“你可以是确定性的或者不是,但两者之间什么也没有。” + +### 双内核实时 + +像 Xenomai 和 RTAI 这样的双内核方案部署了一个与单独的 Linux 内核并行运行的微内核,而像 RTL 这样的单内核方案使得 Linux 本身能够实时运行。Altenberg 说:“使用双内核,当优先级实时程序不在微内核上运行时,Linux 可以获得一些运行时间。 “问题是有人需要维护微内核并在新的硬件上支持它。这需要巨大的努力,并且它的开发社区不是很大。另外,由于 Linux 不直接在硬件上运行,所以你需要一个硬件抽象层(HAL)。有两件事要维护,你通常会落后主流内核一步。” + +Altenberg说:“RTL 的挑战以及花了这么久才出现的原因是,要使 Linux 实时,你基本要修改每个内核文件。” 然而,大部分工作已经完成并合并到主线,开发人员不需要维护一个微内核或 HAL。 + +Altenberg 继续解释了 RTAI 和 Xenomai 之间的差异。“使用 RTAI,你将编写一个由微内核调度的内核模块。这就像内核开发 - 真的很难深入,很难调试。” + +RTAI 的开发可能会更加复杂,因为工业用户通常希望包括封闭的源代码以及 GPL 内核代码。 Altenberg 说:“你必须决定哪些部分可以进入用户态,哪些部分可以通过实时的方式进入内核。” + +RTAI 还支持比 RTL 更少的硬件平台,特别是 x86 之外。双核内核 Xenomai 将 RTAI 作为主要的双内核方式,比 RTAI 具有更大的操作系统支持。更重要的是,Altenberg说:“它提供了“在用户空间中进行实时的合适解决方案。要做到这一点,他们实现了皮肤的概念 - 一个用于不同 RTOS 的 API 的仿真层,比如 POSIX。这使你可以重用一些 RTOS 中的现有代码的子集。” + +然而,使用 Xenomai,你仍然需要维护一个单独的微内核和 HAL。有限的开发工具是另一个问题。Altenberg说:“与 RTAI 一样,你不能使用标准的 C 库。你需要专门的工具和库。即使对于 POSIX 来说,你也必须链接到 POSIX 层,这更复杂。” 他补充说,任何一个平台,很难将超过 8 到 16 个 CPU 的微内核扩展到金融服务中使用的大型服务器集群。 + +### 睡眠自旋锁 + +主要的单内核解决方案是基于 PREEMPT.RT 的 RTL,它主要由 Thomas Gleixner 和 IngoMolnár 在十多年前开发。PREEMPT.RT 重新生成内核的 “spinlock” 锁定原语,以最大化 Linux 内核中的可抢占部分。(PREEMPT.RT 最初称为睡眠自旋锁补丁。) + +PREEMPT.RT 不是在硬中断环境中运行中断处理程序,而是在内核线程中运行它们。Altenberg 说:“当一个中断到达时,你不会运行中断处理程序代码。你只是唤醒相应的内核线程,它运行处理程序。这有两个优点:内核线程可以中断,并且它会显示在具有 PID 的进程列表中。所以你可以把低优先级的放在不重要的中断上,高优先级的放在重要的用户态任务上。” + +由于大约 80% 的 PREEMPT.RT 已经在主线上,任何 Linux 开发人员都可以使用 PREEMPT.RT 发起的内核组件,如定时器、中断处理程序、跟踪基础架构和优先级继承。Altenberg说:“当他们制作实时 Linux 时,一切都变得可以抢占,所以我们发现了很多竞争条件和锁定问题。我们修复了这些,并把它们推送到主线,以提高 Linux 的稳定性。” + +因为 RTL 主要在 Linux 主线上,Altenberg 说:“PREEMPT.RT 被广泛接受,拥有庞大的社区。如果你编写一个实时应用程序,你不需要知道很多关于 PREEMPT.RT 的知识。你不需要任何特殊的库或 API,只需要标准的 C 库、Linux 驱动程序和 POSIX 程序。” + +你仍然需要运行一个补丁来使用 PREEMPT.RT,它每隔两个 Linux 版本更新。然而,在两年内,剩下的 20% 的 PREEMPT.RT 应该会进入 Linux,所以你就“不再需要补丁”了。 + +最后,Altenberg 透露了他的 Xenomai 对 RTL 延迟测试的结果。Altenberg说:“有很多论文声称 Xenomai 和 RTAI 的延迟比 PREEMPT.RT 更小。但是我认为大部分时候是 PREEMPT.RT 配置不好。所以我们带来了一个 Xenomai 专家和一个 PREEMPT.RT 专家,让他们配置自己的平台。” + +Altenberg 称,虽然 Xenomai 在大多数测试中表现更好,并且有更少的抖动,但是差异不如一些 Xenomai 加速器称的高出 300% 至 400% 的延迟优势。当用户空间任务执行测试时,Altenberg 说这是最现实的、最重要的是测试,最糟糕的情况下 Xenomai和 RTL/PREEMPT.RT 都是 90 到 95 微秒的反应时间。 + +当他们在双 Cortex-A9 系统中隔离单个 CPU 来处理中断时,Altenberg 表示这相当普遍,PREEMPT.RT 执行得更好,大约80微秒。(有关详细信息,请查看大约 33 分钟的视频。) + +Altenberg 承认与 OSADL 的两到三年测试相比,他的 12 小时测试是最低标准,而且它不是一个“数学证明”。无论如何,考虑到 RTL 更简单的开发流程,它都值得一试。他总结说:“在我看来,将完整功能的 Linux 系统与微内核进行比较是不公平的。” + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/event/open-source-summit-na/2017/2/inside-real-time-linux + +作者:[ERIC BROWN][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.linux.com/users/ericstephenbrown +[1]:https://www.linux.com/licenses/category/linux-foundation +[2]:https://www.linux.com/files/images/jan-altenberg-elcpng +[3]:https://www.linux.com/blog/intro-real-time-linux-embedded-developers +[4]:http://events.linuxfoundation.org/events/archive/2016/embedded-linux-conference-europe +[5]:https://linutronix.de/ +[6]:http://archive.linuxgizmos.com/celebrating-the-open-source-automation-development-labs-first-birthday/ +[7]:http://linuxgizmos.com/real-time-linux-shacks-up-with-the-linux-foundation/ +[8]:https://www.linux.com/news/embedded-linux-keeps-growing-amid-iot-disruption-says-study From f1db839edaedf23a455d90f4521fe141857bca0b Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 13 Jul 2017 08:45:32 +0800 Subject: [PATCH 091/100] translating --- ...0616 Do you have what it takes to be a software developer.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/talk/20170616 Do you have what it takes to be a software developer.md b/sources/talk/20170616 Do you have what it takes to be a software developer.md index d93eade2f7..f97a5c6df5 100644 --- a/sources/talk/20170616 Do you have what it takes to be a software developer.md +++ b/sources/talk/20170616 Do you have what it takes to be a software developer.md @@ -1,3 +1,5 @@ +translating---geekpi + # Do you have what it takes to be a software developer? ![](https://www.linuxcareer.com/images/software_developer_skills.jpg) From b7a82d50fa1c4c1a5c1ef60a747f5ba053410bf5 Mon Sep 17 00:00:00 2001 From: WangYue <815420852@qq.com> Date: Thu, 13 Jul 2017 14:32:20 +0800 Subject: [PATCH 092/100] =?UTF-8?q?=E5=8E=9F=E8=AF=91=E6=96=87=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E6=9C=89=E9=97=AE=E9=A2=98=E5=B7=B2=E7=BB=8F=E6=9B=B4?= =?UTF-8?q?=E6=AD=A320170426=20How=20to=20get=20started=20learning=20to=20?= =?UTF-8?q?program.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原译文格式有问题已经更正20170426 How to get started learning to program.md --- ... How to get started learning to program.md | 313 +++++++++--------- 1 file changed, 151 insertions(+), 162 deletions(-) diff --git a/translated/talk/20170426 How to get started learning to program.md b/translated/talk/20170426 How to get started learning to program.md index 45fc37e662..989e1c82ca 100644 --- a/translated/talk/20170426 How to get started learning to program.md +++ b/translated/talk/20170426 How to get started learning to program.md @@ -1,177 +1,166 @@ - -如何开始学习编程? -====================================================== - -### 编程初学者可能都思考过这个问题,“我该怎么学编程?”这里我们提供些相关的参考指导来帮助你找到最适合自己学习情况和学习需要的方法。 - - -![Know thyself](https://opensource.com/sites/default/files/styles/image-full-size/public/u23316/roman-know-thyself-osdc-lead.png?itok=oWuH8hRr "Know thyself") - + +如何开始学习编程? +====================================================== + +### 编程初学者可能都思考过这个问题,“我该怎么学编程?”这里我们提供些相关的参考指导来帮助你找到最适合自己学习情况和学习需要的方法。 + + +![Know thyself](https://opensource.com/sites/default/files/styles/image-full-size/public/u23316/roman-know-thyself-osdc-lead.png?itok=oWuH8hRr "Know thyself") + >图片来源 : Opensource.com 修改自 [维基共享][20]里的某不知名艺术家的作品 - - -最近有很多关于学习编程的争论。不仅仅是因为与软件开发公司公开的待应聘的职位数量相比较[符合招聘要求的人远远无法满足缺口][21],编程也是[工资最高][22]和[工作满足感最强][23]的众多职业之一。也难怪越来越多的人都想进入这个行业。 - - -但是你要怎么做才能正确地入行呢?“**我应该怎么学习编程?**”是初学者常见的一个问题。尽管我没有这些问题的全部答案,但是我希望这篇文章能够给你提供相关指导来帮助你找到最适合你的需求和自身情况发展的解决办法。 - - -### 你的学习方式是什么? - -Before you start your learning process, consider not only your options, but also yourself. The ancient Greeks had a saying, [γνῶθι σεαυτόν][24] (gnothi seauton), meaning "know thyself". Undertaking a large learning program is difficult. Self awareness is necessary to make sure you are making the choices that will lead to the highest chance of success. Be honest with yourself when you answer the following questions: - - -在你开始学习编程之前,你需要考虑的不仅仅是你的方向选择,还要更多的考虑下你自己。古罗马人有句谚语,[γνῶθι σεαυτόν][24](gnothi seauton),意思是“认识你自己”。进行一个大型的编程学习难度不小。足够的自我认识是非常有必要的,这能够确保你做出的选择通向成功的机会非常大。你需要思考并诚实地回答接下来的这些问题: - - -* **你最喜欢什么样的学习方式?**怎么做你才能学到最好?是通过阅读的方式吗?还是听讲座?还是主要通过动手实践?你需要选择对你最有效的方法。不要仅仅因为这种学习方法流行或者有其他人说过这种方法对他们很有用就选择了这种方法。 -* **你的需要和要求是什么?**你为什么想学习如何编程?是因为你只是想换一份工作吗?如果是这样的话,你需要多次时间才能完成呢?你要牢记,这些是_需要的_ ,不是_想要的_ 。你可能_想要_下周就换份新工作,但是_需要_ 有人在接下来的一年里帮忙供养你的正在成长的家庭。当你在人生的道路上面临方向的抉择时,时间的安排特别重要。 +最近有很多关于学习编程的争论。不仅仅是因为与软件开发公司公开的待应聘的职位数量相比较[符合招聘要求的人远远无法满足缺口][21],编程也是[工资最高][22]和[工作满足感最强][23]的众多职业之一。也难怪越来越多的人都想进入这个行业。 + + +但是你要怎么做才能正确地入行呢?“**我应该怎么学习编程?**”是初学者常见的一个问题。尽管我没有这些问题的全部答案,但是我希望这篇文章能够给你提供相关指导来帮助你找到最适合你的需求和自身情况发展的解决办法。 + + +### 你的学习方式是什么? + + + + +在你开始学习编程之前,你需要考虑的不仅仅是你的方向选择,还要更多的考虑下你自己。古罗马人有句谚语,[γνῶθι σεαυτόν][24](gnothi seauton),意思是“认识你自己”。进行一个大型的编程学习难度不小。足够的自我认识是非常有必要的,这能够确保你做出的选择通向成功的机会非常大。你需要思考并诚实地回答接下来的这些问题: + + +* **你最喜欢什么样的学习方式?**怎么做你才能学到最好?是通过阅读的方式吗?还是听讲座?还是主要通过动手实践?你需要选择对你最有效的方法。不要仅仅因为这种学习方法流行或者有其他人说过这种方法对他们很有用就选择了这种方法。 + + +* **你的需要和要求是什么?**你为什么想学习如何编程?是因为你只是想换一份工作吗?如果是这样的话,你需要多次时间才能完成呢?你要牢记,这些是_需要的_ ,不是_想要的_ 。你可能_想要_下周就换份新工作,但是_需要_ 有人在接下来的一年里帮忙供养你的正在成长的家庭。当你在人生的道路上面临方向的抉择时,时间的安排特别重要。 * **你能获取的参考资料有哪些?**当然,重返大学并获得一份计算机科学专业的学位证书可能也不错,但是你必须对你自己实事求是面对现实。你的生活必须和你学习相适应。你能承受花费几个月的时间和不菲的费用去参加集训吗?你是否生活在一个提供学习机会的地方,比如提供技术性的聚会或者大学课程?你能获取到的参考资料会对你的学习过程产生巨大的影响。在打算学编程换工作前先调查好这些。 - - -### 选择一门编程语言 - - -当你打算开始你的编程学习之路和考虑你的选择的时候,请记住不管其他人说什么,选择哪门编程语言来开始你的编程学习 _关系不大_。是的,是有些编程语言比其他的更流行。比如,根据一份调查研究,目前 JavaScript,Java,PHP, 和 Python 处于 [最受欢迎最流行的编程][25] 中的前排。但是现在正流行的编程语言有可能过几年就过时了,所以不用太纠结编程语言的选择。像那些方法,类,函数,条件,控制流程和其他的编程的概念思想等等,不管你选的哪门编程语言,他们的底层原理基本保持一致。只有语法和社区的实例会变。因此你能够用 [Perl][26] 学习编程,也可以用 [Swift][27] 或者 [Rust][28]。作为一个程序员,你会在你的职业生涯里用很多不同的编程语言来工作。不要认为你被困在了编程语言的选择上。 - - - -### Test the waters - -### 市场测试 - - -除非你已经涉足过这个行业或者确信你愿意花费你生命的剩余时光来编程,我建议你最好还是潜水之前先用脚趾头来试试水温之类的来判断这水适不适合潜水。这种工作不是每个人都能做的。在把全部希望都压在学习编程之前,你可以先尝试花费少量时间金钱来学习一小部分知识点来了解自己是否会享受这种每周起码花费 40 个小时来编码工作的生活。如果你不喜欢这种工作,你不太可能完成编程项目的学习。即便你完成结束了编程的学习阶段,你也会在你以后的编程工作中感到无比痛苦。人生苦短就不要花费你人生三分之一的时间来做你不喜欢的事了。  - - -谢天谢地,软件开发不仅仅需要编程。熟悉编程概念和理解软件是怎么和他们结合在一起的是非常有用的,但是你不需要成为一个程序员也能在软件开发行业中找到一份报酬不菲的工作。在软件开发过程中,额外的重要角色有技术文档撰写人、项目经理、产品经理、测试人员、设计人员、用户体验设计者、运维/系统管理员和数据科学家等。软件成功的启动需要很多角色的人之间相互配合。不要觉得学习了编程就要求你成为一个程序员。你需要探索你的选择并确定哪个选择才是最适合你的。 - - -### 参考的学习资料 - - -你对学习参考资料的选择是什么?可能正如你已经发现的那样,可供选择的参考资料非常多,尽管在你的那片区域不是所有的资料都能够获得。 -* **训练营**:最近这几年像 [App Academy][5] 和 [Bloc][6] 这样的训练营越来越流行。训练营通常收费 $10K或者更多,他们宣称在几周内就能够把一个学生培训成一个称职的程序员。在参加编程集训营前,你需要研究下你将要学习的项目能确保正如它所承诺的那样,学生学完毕业后能够找到一个高薪的长期供职的职位。一方面花费了数目不小的钱财,而且时间也花费了不少—通常这些都是典型的全日制课程并且要求学生在接下来的连续几周里把其他的事先放在一边专心课程学习。然而时间金钱这两项不菲的消耗通常会使很多未来的程序员无法参加训练营。 - - -* **社区学院/职业培训中心**:社区学院常常被那些研究自己对学习编程的选择的人所忽视,不得不说这些人该为自己对社区学院的忽视感到羞愧。你在社区学院或者职业培训中心能够接受到的教育是和你选择其他方式学习编程的学习效果一样有效,而且费用也不高。 - - -* **国家/地方的培训项目**:许多地区都认识到在他们的地区增加技术投资的经济效益,并且已经制定了培训计划来培养受过良好教育和准备好的劳动力。培训项目的案例包括了[Code Oregon][7] 和 [Minneapolis TechHire][8]。检查下你的州、省或自治区是否提供这样的项目。 +### 选择一门编程语言 -* **在线训练**:许多公司和组织都提供在线技术培训项目。比如,[Linux Foundation][9]致力于通过开源技术使人们获得成功。其他的像[O'Reilly Media][10], [Lynda.com][11], 和 [Coursera][12]在软件开发涉及的许多方面提供培训。[Codecademy][13]提供对编程概念的在线介绍。每个项目的成本会有所不同,但大多数项目会允许你在你的日程安排中学习。 +当你打算开始你的编程学习之路和考虑你的选择的时候,请记住不管其他人说什么,选择哪门编程语言来开始你的编程学习 _关系不大_。是的,是有些编程语言比其他的更流行。比如,根据一份调查研究,目前 JavaScript,Java,PHP, 和 Python 处于 [最受欢迎最流行的编程][25] 中的前排。但是现在正流行的编程语言有可能过几年就过时了,所以不用太纠结编程语言的选择。像那些方法,类,函数,条件,控制流程和其他的编程的概念思想等等,不管你选的哪门编程语言,他们的底层原理基本保持一致。只有语法和社区的实例会变。因此你能够用 [Perl][26] 学习编程,也可以用 [Swift][27] 或者 [Rust][28]。作为一个程序员,你会在你的职业生涯里用很多不同的编程语言来工作。不要认为你被困在了编程语言的选择上。 -* **MOOCs**:在过去的几年里,moocs-大规模开放在线课程的发展势头已经很好了。像 [Harvard][14], [Stanford][15], [MIT][16] 和其他的一些世界一流大学他们一直在记录他们的课程,并免费提供在线课程。课程的自我指导性质可能并不适合所有人,但可利用的材料使这成为一个有价值的学习选择。 -* **专业书籍**:许多人喜欢用书自学。这是相当经济的,在初步学习阶段后提供了现成的参考资料。尽管你可以通过在线服务订购和访问图书像[Safari][17] 和 [Amazon][18],但是也不要忘了检查你本地的公共图书馆。 - - -### 网络支持 - - -无论你选择哪一种学习资源,有网络支持都将获得更大的成功。与他人分享你的经历和挑战可以帮助你保持动力,同时为你提供一个安全的地方去问那些你可能还没有足够自信到其他地方去问的问题。许多城镇都有当地的用户群聚在一起讨论和学习软件技术。通常你可以在 [Meetup.com][29] 这里找到。专门的兴趣小组,比如 [Women Who Code][30] 和 [Code2040][31],在大多数城市地区,经常举行会议和黑客马拉松活动,这是在你学习的时候,一个很好的方式来结识并建立一个支持网络。一些软件会议举办“黑客日”,在那里你可以遇到有经验的软件开发人员,他们能够帮助你解决你所困扰的一些问题。例如,每年的[PyCon][32]会议都会提供几天的时间来让人们聚集在一起工作、研讨。一些项目,比如[BeeWare][33],使用这些短暂的时间来帮助新程序员学习和对这些项目做贡献。 - - -你的网络支持不需要来自正式的聚会。一个小的学习小组可以有效地保持你的学习积极性,并且可以像在你最喜欢的社交网络上发布邀请一样容易形成。如果你生活在一个没有大量软件开发人员的社区来支持几个meetups和用户组,那么这一点特别有用。 - - -### 开始学习编程的几个步骤 - -In summary, to give yourself the best chance of success should you decide to learn to program, follow these steps: - -1. Gather your list of requirements/needs and resources - -2. Research the options available to you in your area - -3. Discard the options that do not meet your requirements and resources - -4. Select the option(s) that best suit your requirements, resources, and learning style - -5. Find a support network - -简单的来说,既然你决定学习编程,可以参考这几个方法给自己一个尽可能成功的机会: - -1. 将你的需要/需求和参考学习资料列出清单并进行收集 - -2. 搜寻在你的当地那里能够可用的选择 - -3. 放弃不能符合你的需求和参考学习资料的选择 - -4. 选择最符合你需求的和最适合你的学习参考资源 - -5. 找到一个能够得到支持的网络 - - -务必牢记:你的学习过程永远不会结束。高速发展的软件产业,会导致新技术和新进展几乎每天都会出现。一旦你学会了编程,你就必须花时间去学习适应这些新的进步。你不能依靠你的工作来为你提供这种培训。只有你自己负责自己的职业发展,所以如果你想保持最新的技术和工作能力,你必须紧跟行业最新的技术。 - - -祝你好运! - --------------------------------------------------------------------------------- - -作者简介: - - -VM (Vicky) Brasseur - VM (aka Vicky) 是一个技术人员,也是项目、工作进程、产品和企业的经理。在她的长达 18 年的科技行业里,她曾是一名分析师、程序员、产品经理、软件工程经理和软件工程总监。目前,她是惠普企业上游开源开发团队的高级工程经理。她的博客是 anonymoushash.vmbrasseur.com,推特是 @vmbrasseur。  - - - - - --------- - -via: https://opensource.com/article/17/4/how-get-started-learning-program - -作者:[VM (Vicky) Brasseur ][a] -译者:[WangYueScream](https://github.com/WangYueScream) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/vmbrasseur -[1]:https://opensource.com/tags/python?src=programming_resource_menu -[2]:https://opensource.com/tags/javascript?src=programming_resource_menu -[3]:https://opensource.com/tags/perl?src=programming_resource_menu -[4]:https://developers.redhat.com/?intcmp=7016000000127cYAAQ&src=programming_resource_menu -[5]:https://www.appacademy.io/ -[6]:https://www.bloc.io/ -[7]:http://codeoregon.org/ -[8]:http://www.minneapolismn.gov/cped/metp/TechHire#start -[9]:https://training.linuxfoundation.org/ -[10]:http://shop.oreilly.com/category/learning-path.do -[11]:https://www.lynda.com/ -[12]:https://www.coursera.org/ -[13]:https://www.codecademy.com/ -[14]:https://www.edx.org/school/harvardx -[15]:http://online.stanford.edu/courses -[16]:https://ocw.mit.edu/index.htm -[17]:https://www.safaribooksonline.com/ -[18]:https://amazon.com/ -[19]:https://opensource.com/article/17/4/how-get-started-learning-program?rate=txl_aE6F2oOUSgQDveWFtrPWIbA1ULFwfOp017zV35M -[20]:https://commons.wikimedia.org/wiki/File:Roman-mosaic-know-thyself.jpg -[21]:http://www.techrepublic.com/article/report-40-of-employers-worldwide-face-talent-shortages-driven-by-it/ -[22]:http://web.archive.org/web/20170328065655/http://www.businessinsider.com/highest-paying-jobs-in-america-2017-3/#-25 -[23]:https://stackoverflow.com/insights/survey/2017/#career-satisfaction -[24]:https://en.wikipedia.org/wiki/Know_thyself -[25]:https://stackoverflow.com/insights/survey/2017/#most-popular-technologies -[26]:https://learn.perl.org/tutorials/ -[27]:http://shop.oreilly.com/product/0636920045946.do -[28]:https://doc.rust-lang.org/book/ -[29]:https://www.meetup.com/ -[30]:https://www.womenwhocode.com/ -[31]:http://www.code2040.org/ -[32]:https://us.pycon.org/ -[33]:http://pybee.org/ -[34]:https://opensource.com/user/10683/feed -[35]:https://opensource.com/article/17/4/how-get-started-learning-program#comments -[36]:https://opensource.com/users/vmbrasseur +### 市场测试 + + +除非你已经涉足过这个行业或者确信你愿意花费你生命的剩余时光来编程,我建议你最好还是潜水之前先用脚趾头来试试水温之类的来判断这水适不适合潜水。这种工作不是每个人都能做的。在把全部希望都压在学习编程之前,你可以先尝试花费少量时间金钱来学习一小部分知识点来了解自己是否会享受这种每周起码花费 40 个小时来编码工作的生活。如果你不喜欢这种工作,你不太可能完成编程项目的学习。即便你完成结束了编程的学习阶段,你也会在你以后的编程工作中感到无比痛苦。人生苦短就不要花费你人生三分之一的时间来做你不喜欢的事了。  + + +谢天谢地,软件开发不仅仅需要编程。熟悉编程概念和理解软件是怎么和他们结合在一起的是非常有用的,但是你不需要成为一个程序员也能在软件开发行业中找到一份报酬不菲的工作。在软件开发过程中,额外的重要角色有技术文档撰写人、项目经理、产品经理、测试人员、设计人员、用户体验设计者、运维/系统管理员和数据科学家等。软件成功的启动需要很多角色的人之间相互配合。不要觉得学习了编程就要求你成为一个程序员。你需要探索你的选择并确定哪个选择才是最适合你的。 + + +### 参考的学习资料 + + +你对学习参考资料的选择是什么?可能正如你已经发现的那样,可供选择的参考资料非常多,尽管在你的那片区域不是所有的资料都能够获得。 + + +* **训练营**:最近这几年像 [App Academy][5] 和 [Bloc][6] 这样的训练营越来越流行。训练营通常收费 $10K或者更多,他们宣称在几周内就能够把一个学生培训成一个称职的程序员。在参加编程集训营前,你需要研究下你将要学习的项目能确保正如它所承诺的那样,学生学完毕业后能够找到一个高薪的长期供职的职位。一方面花费了数目不小的钱财,而且时间也花费了不少—通常这些都是典型的全日制课程并且要求学生在接下来的连续几周里把其他的事先放在一边专心课程学习。然而时间金钱这两项不菲的消耗通常会使很多未来的程序员无法参加训练营。 + + +* **社区学院/职业培训中心**:社区学院常常被那些研究自己对学习编程的选择的人所忽视,不得不说这些人该为自己对社区学院的忽视感到羞愧。你在社区学院或者职业培训中心能够接受到的教育是和你选择其他方式学习编程的学习效果一样有效,而且费用也不高。 + + +* **国家/地方的培训项目**:许多地区都认识到在他们的地区增加技术投资的经济效益,并且已经制定了培训计划来培养受过良好教育和准备好的劳动力。培训项目的案例包括了[Code Oregon][7] 和 [Minneapolis TechHire][8]。检查下你的州、省或自治区是否提供这样的项目。 + + +* **在线训练**:许多公司和组织都提供在线技术培训项目。比如,[Linux Foundation][9]致力于通过开源技术使人们获得成功。其他的像[O'Reilly Media][10], [Lynda.com][11], 和 [Coursera][12]在软件开发涉及的许多方面提供培训。[Codecademy][13]提供对编程概念的在线介绍。每个项目的成本会有所不同,但大多数项目会允许你在你的日程安排中学习。 + + +* **MOOCs**:在过去的几年里,moocs-大规模开放在线课程的发展势头已经很好了。像 [Harvard][14], [Stanford][15], [MIT][16] 和其他的一些世界一流大学他们一直在记录他们的课程,并免费提供在线课程。课程的自我指导性质可能并不适合所有人,但可利用的材料使这成为一个有价值的学习选择。 + + +* **专业书籍**:许多人喜欢用书自学。这是相当经济的,在初步学习阶段后提供了现成的参考资料。尽管你可以通过在线服务订购和访问图书像[Safari][17] 和 [Amazon][18],但是也不要忘了检查你本地的公共图书馆。 + + +### 网络支持 + + +无论你选择哪一种学习资源,有网络支持都将获得更大的成功。与他人分享你的经历和挑战可以帮助你保持动力,同时为你提供一个安全的地方去问那些你可能还没有足够自信到其他地方去问的问题。许多城镇都有当地的用户群聚在一起讨论和学习软件技术。通常你可以在 [Meetup.com][29] 这里找到。专门的兴趣小组,比如 [Women Who Code][30] 和 [Code2040][31],在大多数城市地区,经常举行会议和黑客马拉松活动,这是在你学习的时候,一个很好的方式来结识并建立一个支持网络。一些软件会议举办“黑客日”,在那里你可以遇到有经验的软件开发人员,他们能够帮助你解决你所困扰的一些问题。例如,每年的[PyCon][32]会议都会提供几天的时间来让人们聚集在一起工作、研讨。一些项目,比如[BeeWare][33],使用这些短暂的时间来帮助新程序员学习和对这些项目做贡献。 + + +你的网络支持不需要来自正式的聚会。一个小的学习小组可以有效地保持你的学习积极性,并且可以像在你最喜欢的社交网络上发布邀请一样容易形成。如果你生活在一个没有大量软件开发人员的社区来支持几个meetups和用户组,那么这一点特别有用。 + + +### 开始学习编程的几个步骤 + + + +简单的来说,既然你决定学习编程,可以参考这几个方法给自己一个尽可能成功的机会: + +1. 将你的需要/需求和参考学习资料列出清单并进行收集 + +2. 搜寻在你的当地那里能够可用的选择 + +3. 放弃不能符合你的需求和参考学习资料的选择 + +4. 选择最符合你需求的和最适合你的学习参考资源 + +5. 找到一个能够得到支持的网络 + + +务必牢记:你的学习过程永远不会结束。高速发展的软件产业,会导致新技术和新进展几乎每天都会出现。一旦你学会了编程,你就必须花时间去学习适应这些新的进步。你不能依靠你的工作来为你提供这种培训。只有你自己负责自己的职业发展,所以如果你想保持最新的技术和工作能力,你必须紧跟行业最新的技术。 + + +祝你好运! + +-------------------------------------------------------------------------------- + +作者简介: + + +VM (Vicky) Brasseur - VM (aka Vicky) 是一个技术人员,也是项目、工作进程、产品和企业的经理。在她的长达 18 年的科技行业里,她曾是一名分析师、程序员、产品经理、软件工程经理和软件工程总监。目前,她是惠普企业上游开源开发团队的高级工程经理。她的博客是 anonymoushash.vmbrasseur.com,推特是 @vmbrasseur。  + + + + + +-------- + +via: https://opensource.com/article/17/4/how-get-started-learning-program + +作者:[VM (Vicky) Brasseur ][a] +译者:[WangYueScream](https://github.com/WangYueScream) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/vmbrasseur +[1]:https://opensource.com/tags/python?src=programming_resource_menu +[2]:https://opensource.com/tags/javascript?src=programming_resource_menu +[3]:https://opensource.com/tags/perl?src=programming_resource_menu +[4]:https://developers.redhat.com/?intcmp=7016000000127cYAAQ&src=programming_resource_menu +[5]:https://www.appacademy.io/ +[6]:https://www.bloc.io/ +[7]:http://codeoregon.org/ +[8]:http://www.minneapolismn.gov/cped/metp/TechHire#start +[9]:https://training.linuxfoundation.org/ +[10]:http://shop.oreilly.com/category/learning-path.do +[11]:https://www.lynda.com/ +[12]:https://www.coursera.org/ +[13]:https://www.codecademy.com/ +[14]:https://www.edx.org/school/harvardx +[15]:http://online.stanford.edu/courses +[16]:https://ocw.mit.edu/index.htm +[17]:https://www.safaribooksonline.com/ +[18]:https://amazon.com/ +[19]:https://opensource.com/article/17/4/how-get-started-learning-program?rate=txl_aE6F2oOUSgQDveWFtrPWIbA1ULFwfOp017zV35M +[20]:https://commons.wikimedia.org/wiki/File:Roman-mosaic-know-thyself.jpg +[21]:http://www.techrepublic.com/article/report-40-of-employers-worldwide-face-talent-shortages-driven-by-it/ +[22]:http://web.archive.org/web/20170328065655/http://www.businessinsider.com/highest-paying-jobs-in-america-2017-3/#-25 +[23]:https://stackoverflow.com/insights/survey/2017/#career-satisfaction +[24]:https://en.wikipedia.org/wiki/Know_thyself +[25]:https://stackoverflow.com/insights/survey/2017/#most-popular-technologies +[26]:https://learn.perl.org/tutorials/ +[27]:http://shop.oreilly.com/product/0636920045946.do +[28]:https://doc.rust-lang.org/book/ +[29]:https://www.meetup.com/ +[30]:https://www.womenwhocode.com/ +[31]:http://www.code2040.org/ +[32]:https://us.pycon.org/ +[33]:http://pybee.org/ +[34]:https://opensource.com/user/10683/feed +[35]:https://opensource.com/article/17/4/how-get-started-learning-program#comments +[36]:https://opensource.com/users/vmbrasseur From 24380aeeacd5aec82f5f3b31524425f59a30ec5b Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 13 Jul 2017 22:30:23 +0800 Subject: [PATCH 093/100] PRF&PUB:20170617 Installing Fedora 26 Beta on a MacBook Air.md @cycoe --- ...talling Fedora 26 Beta on a MacBook Air.md | 42 ++++++++----------- 1 file changed, 17 insertions(+), 25 deletions(-) rename {translated/tech => published}/20170617 Installing Fedora 26 Beta on a MacBook Air.md (66%) diff --git a/translated/tech/20170617 Installing Fedora 26 Beta on a MacBook Air.md b/published/20170617 Installing Fedora 26 Beta on a MacBook Air.md similarity index 66% rename from translated/tech/20170617 Installing Fedora 26 Beta on a MacBook Air.md rename to published/20170617 Installing Fedora 26 Beta on a MacBook Air.md index 95f7c6a574..7cac5d7915 100644 --- a/translated/tech/20170617 Installing Fedora 26 Beta on a MacBook Air.md +++ b/published/20170617 Installing Fedora 26 Beta on a MacBook Air.md @@ -1,67 +1,59 @@ -Translated by cycoe - -在 MacBook Air 上安装 Fedora 26 测试版 +在 MacBook Air 上安装 Fedora 26 ====================== +(写本文时)距离 Fedora 26 测试版发布已有几天,我认为是时候把它安装在我的 13 寸 MacBook Air 上了。 -距离 Fedora 26 测试版发布已有几天,我认为是时候把它安装在我的 13 寸 MacBook Air 上了。 - -这代 MacBook Air 的型号为 A1466 EMC 2925,拥有 8gb 内存,2.2GHz i7 处理器,512gb ssd,以及与 2015ish 相似的外观。 +我这个 MacBook Air 的型号为 A1466 EMC 2925,拥有 8gb 内存,2.2GHz i7 处理器,512gb SSD,以及与 2015 款相似的外观。 首先我下载了 beta 版镜像,你能够从 [GetFedora][1] 网站获取。一旦你下载完成,就可将它安装在 USB 闪存驱动器上。在 Linux 上,你可以用 `dd` 命令方便的完成这个操作。 将 USB 驱动器插入到你的电脑上,并使用 `tail` 命令读取 `/var/log/syslog` 或 `/var/log/messages` 文件的最后几行。你也可以使用 `df -h` 命令查看存储设备从而找到正确的 /dev/sdX。 -在下面的例子中,我们假设 USB 闪存驱动器为 /dev/sdc +在下面的例子中,我们假设 USB 闪存驱动器为 `/dev/sdc`: + -代码: ``` dd if=/home/rob/Downloads/Fedora-Workstation-Live-x86_64-26_Beta-1.4.iso of=/dev/sdc bs=8M status=progress oflag=direct ``` -这将花费一点点时间... 让我们耐心等待。 +这将花费一点点时间……让我们耐心等待。 -接下来,我关掉 MacBook,等待 5 s 后将它重新启动。在按下电源键后,我按住 'option' 键来呼出启动选项。我的选择如下图: +接下来,我关掉 MacBook,等待 5 秒后将它重新启动。在按下电源键后,我按住 “option” 键来呼出启动选项。我的选择如下图: ![macbook-air-fedora.jpg](https://www.linux.org/attachments/macbook-air-fedora-jpg.2763/) -点击 'fedora' 下面的箭头进入安装过程。 +点击 “fedora” 下面的箭头进入安装过程。 -在进入安装过程后我注意到我没有 wifi 网络。幸运的是我有个雷电口转以太网的转接器,因为这个笔记本实际上没有以太网接口。我寄希望于谷歌并于 [此处][2] 找到了一些很棒的指导。 +在进入安装过程后我注意到我没有 wifi 网络。幸运的是我有个雷电口转以太网的转接器,因为这个笔记本实际上没有以太网接口。我寄希望于谷歌搜索,并于 [此处][2] 找到了一些很棒的指导。 -设置 wifi 前先更新内核 +设置 wifi 前先更新内核: -代码: ``` sudo dnf update kernel ``` (然后重启) -安装 rpmfusion 仓库 +安装 rpmfusion 仓库: -代码: ``` su -c 'dnf install -y http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm' ``` -安装 akmods 和 kernel-devel 包 +安装 akmods 和 kernel-devel 包: -代码: ``` sudo dnf install -y akmods "kernel-devel-uname-r == $(uname -r)" ``` -从 rpmfusion 仓库安装 broadcom-wl 包 +从 rpmfusion 仓库安装 broadcom-wl 包: -代码: ``` sudo dnf install -y broadcom-wl ``` -重构内核扩展 +重构内核扩展: -代码: ``` sudo akmods ``` @@ -70,7 +62,7 @@ sudo akmods 到目前为止我们已经解决,这使我印象非常深刻!所有我关心的功能键都能够正常工作,如屏幕亮度、键盘背光、音量。 -接下来,等 7 月份发布非测试版时,我将马上使用 dnf 升级! +接下来,等 7 月份发布非测试版时,我将马上使用 dnf 升级!(LCTT 译注:Fedora 26 正式版已经发布) 感谢你,Fedora! @@ -78,9 +70,9 @@ sudo akmods via: https://www.linux.org/threads/installing-fedora-26-beta-on-a-macbook-air.12464/ -作者:[Rob ][a] +作者:[Rob][a] 译者:[cycoe](https://github.com/cycoe) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From eefd25b7b8e51083c74a089f6baa11a1a6475e12 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 14 Jul 2017 08:46:12 +0800 Subject: [PATCH 094/100] translated --- ...hat it takes to be a software developer.md | 25 ++++++-------- ...hat it takes to be a software developer.md | 34 +++++++++++++++++++ 2 files changed, 44 insertions(+), 15 deletions(-) create mode 100644 translated/talk/20170616 Do you have what it takes to be a software developer.md diff --git a/sources/talk/20170616 Do you have what it takes to be a software developer.md b/sources/talk/20170616 Do you have what it takes to be a software developer.md index f97a5c6df5..3dec6cc692 100644 --- a/sources/talk/20170616 Do you have what it takes to be a software developer.md +++ b/sources/talk/20170616 Do you have what it takes to be a software developer.md @@ -1,35 +1,30 @@ -translating---geekpi - -# Do you have what it takes to be a software developer? +# 成为一名软件开发者需要些什么? ![](https://www.linuxcareer.com/images/software_developer_skills.jpg) -The application space is the place to be. A lot of work has been done in the low-level Linux arena, and it continues, but the growth over the last few years has been in the application space. With that being the case, which language are developers utilizing to build these apps? In short, it depends, which I know does not come as a huge surprise. But, with the data that we have, we are able to determine which languages are leading the way.  +应用程序是在应用领域。底层的 Linux 做了很多工作,而且还在继续,但是在过去几年里,应用程序领域开始增长。在这种情况下,开发人员使用哪种语言构建这些应用程序?简而言之,要看情况,我所了解的并不是一个巨大的惊喜。但是,随着我们逐渐拥有的数据,我们可以确定哪些语言领先。 -The language that finds itself on the top of the mountain is Java. Being around open source software for over 15 years, this was not always the case. Early on, we did not see a lot of interest in Java developers, but boy has that changed. It is the definitive leader in the application space currently. While the numbers have not grown in the last six quarters, the sheer overall number is impressive. On average, companies are asking for Java skills in over 1 in 3 job postings focused on FLOSS. Quite a feat for a language that did not register on the radar years ago. And, based on its heavy use with Android, it would not be a surprise to see this number increase in the future.  +发现自己在领先的语言是 Java。它已经围绕开源软件15年以上,但情况并不总是如此。在早期,我们没有看到很多对 java 开发者的兴趣,但这个男孩已经改变了。它是目前应用领域的权威领导者。虽然数字在过去六个季度没有增长,但整体数量却令人印象深刻。平均而言,在 FLOSS 上公司发布的职位中有超过 1/3 的职位要求 Java 技能。这对几年前没有在榜单上出现的语言而言是一个壮举。而且,由于它与 Android 的大量使用,未来这个数字增加也并不奇怪。 -Another language that is used prominently in the application space is C++. While its numbers can't quite compete with that of Java, it still commands a large marketshare in this arena. Whereas Java is asked for in 1 of 3 postings, C++ is required in 1 of 4\. Much like that of Java, its numbers have remained relatively stable over the last six quarters. C++ has always been heavily utilized, and even though Java has superseded it, it remains a highly relevant language. +在应用程序领域中使用的另一种语言是 C++。虽然它的数量不能与 Java 竞争,但它仍然在这个领域占据了很大的市场份额。而且 3 个招聘中有一个要求 Java,C++ 是 4 个中有一个要求。与 Java 类似,其数字在过去六个季度中保持相对稳定。C++一直被大量使用,即使 Java 已经取代它,它仍然是一种高度相关的语言。 +进入到网络应用领域,多年来一直在改变领导者。在早期,大多数 Web 程序明确选择使用 PHP 开发。正如之前关于脚本的文章所讨论的,这几年来已经发生了变化。在过去几年中,PHP 的使用似乎有所恶化。在过去一年半的时间里,已经急剧下降了 30% 以上。这是一个令人震惊的数字,只有时间才能确定趋势是否持续。 -Moving toward the web application space, there has been a changing of the guard over the years. Early on, the clear choice was to develop most web applications utilizing PHP. As was discussed in the previous article on scripting, this has changed over the years. There appears to have been some deterioration in the usage of PHP in the last couple of years. In the last year and a half alone, there has been a precipitous decline of over 30%. That is an alarming number, and only time will tell if the trend continues.  +最初打破 PHP 领导的最初是 Ruby on Rails。多年来,我看到公司和开发商进行了这一转型。Ruby on Rails 经历了一段时间,在这个时期它是这个领域的首选语言。然而,从我们收集的数字来看,它的光泽似乎已经失去了一点优势。虽然没有像 PHP 这样的衰退,但其数量一直保持相对平稳,所以它曾经经历的增长似乎停滞不前。 -Claiming some of PHP's thunder initially was that of Ruby on Rails. For a number of years, I watched companies and developers make that transition. Ruby on Rails went through a period of time where it was “the” language of choice in this space. However, from the numbers we have gathered, it appears that its luster has lost a little of its edge. While it is not experiencing any kind of decline like that of PHP, its numbers have been remained relatively flat, so the growth that it once experienced appears to have stagnated. +目前在网络应用程序领域的王者似乎是 Javascript。它获得了最大的总数。虽然它的数量保持平坦,这很像 Ruby on Rails,但它已经吸引了更多的观众。平均来说,过去六个季度,公司在分析的 10,000 份工作清单中有 1,500 份需要 Javascript 技能。这比 PHP 或 Ruby on Rails 多了 70%。 +随着 PHP 的衰落以及 Ruby on Rails 和 Javascript 停滞不前,有什么在 Web 程序领域增长的么?这个群体的突出者似乎是 Golang。它在 2007 年由 Google 内的几位开发人员创建,似乎这种语言开始获得更广泛的受众群体。虽然与其他三个讨论的总体数字相比,总体看起来比去年同期增长了 50%。如果这种趋势继续下去,那将是非常有趣的。在我看来,我预计我们会继续以牺牲其他三个的群体来获得 Golang 的增长。 -The king of the hill, at the moment, in the web application space appears to be Javascript. It garners the largest overall numbers. While its numbers have remained flat, much like Ruby on Rails, it has amassed a larger audience. On average over the last six quarters, companies are requiring Javascript skills in 1,500 of the 10,000 job listings analyzed. That is nearly 70% more than either PHP or Ruby on Rails.  - -With PHP in decline and Ruby on Rails and Javascript stagnate, is anyone in the web application space growing? The outlier in this group seems to be Golang. Created by a couple of developers inside Google in 2007, it appears that this language is starting to gain a wider audience. While the overall numbers pale in comparison to the other three discussed, it has seen a 50% increase in the last year and a half. It will be very interesting to watch if this trend continues. In my opinion, I expect that we will continue to see gains in Golang at the expense of the other three. - - -As always, we will monitor each of these languages moving forward to watch trends in the marketplace. And, a keen eye will be kept on any new entrants that enter the radar. It is an exciting and dynamic area of development; one that will provide results that are ever-changing over time. +如往常一样,我们会监测这些语言的各种前进方向,以观察市场趋势。而且,榜单的任何新进入者都会被密切关注。这是一个令人兴奋和动态的发展领域。一个会提供随时间不断变化的结果。 -------------------------------------------------------------------------------- via: https://www.linuxcareer.com/do-you-have-what-it-takes-to-be-a-software-developer 作者:[Brent Marinaccio ][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/talk/20170616 Do you have what it takes to be a software developer.md b/translated/talk/20170616 Do you have what it takes to be a software developer.md new file mode 100644 index 0000000000..3dec6cc692 --- /dev/null +++ b/translated/talk/20170616 Do you have what it takes to be a software developer.md @@ -0,0 +1,34 @@ +# 成为一名软件开发者需要些什么? + +![](https://www.linuxcareer.com/images/software_developer_skills.jpg) + +应用程序是在应用领域。底层的 Linux 做了很多工作,而且还在继续,但是在过去几年里,应用程序领域开始增长。在这种情况下,开发人员使用哪种语言构建这些应用程序?简而言之,要看情况,我所了解的并不是一个巨大的惊喜。但是,随着我们逐渐拥有的数据,我们可以确定哪些语言领先。 + +发现自己在领先的语言是 Java。它已经围绕开源软件15年以上,但情况并不总是如此。在早期,我们没有看到很多对 java 开发者的兴趣,但这个男孩已经改变了。它是目前应用领域的权威领导者。虽然数字在过去六个季度没有增长,但整体数量却令人印象深刻。平均而言,在 FLOSS 上公司发布的职位中有超过 1/3 的职位要求 Java 技能。这对几年前没有在榜单上出现的语言而言是一个壮举。而且,由于它与 Android 的大量使用,未来这个数字增加也并不奇怪。 + +在应用程序领域中使用的另一种语言是 C++。虽然它的数量不能与 Java 竞争,但它仍然在这个领域占据了很大的市场份额。而且 3 个招聘中有一个要求 Java,C++ 是 4 个中有一个要求。与 Java 类似,其数字在过去六个季度中保持相对稳定。C++一直被大量使用,即使 Java 已经取代它,它仍然是一种高度相关的语言。 + + +进入到网络应用领域,多年来一直在改变领导者。在早期,大多数 Web 程序明确选择使用 PHP 开发。正如之前关于脚本的文章所讨论的,这几年来已经发生了变化。在过去几年中,PHP 的使用似乎有所恶化。在过去一年半的时间里,已经急剧下降了 30% 以上。这是一个令人震惊的数字,只有时间才能确定趋势是否持续。 + +最初打破 PHP 领导的最初是 Ruby on Rails。多年来,我看到公司和开发商进行了这一转型。Ruby on Rails 经历了一段时间,在这个时期它是这个领域的首选语言。然而,从我们收集的数字来看,它的光泽似乎已经失去了一点优势。虽然没有像 PHP 这样的衰退,但其数量一直保持相对平稳,所以它曾经经历的增长似乎停滞不前。 + +目前在网络应用程序领域的王者似乎是 Javascript。它获得了最大的总数。虽然它的数量保持平坦,这很像 Ruby on Rails,但它已经吸引了更多的观众。平均来说,过去六个季度,公司在分析的 10,000 份工作清单中有 1,500 份需要 Javascript 技能。这比 PHP 或 Ruby on Rails 多了 70%。 + +随着 PHP 的衰落以及 Ruby on Rails 和 Javascript 停滞不前,有什么在 Web 程序领域增长的么?这个群体的突出者似乎是 Golang。它在 2007 年由 Google 内的几位开发人员创建,似乎这种语言开始获得更广泛的受众群体。虽然与其他三个讨论的总体数字相比,总体看起来比去年同期增长了 50%。如果这种趋势继续下去,那将是非常有趣的。在我看来,我预计我们会继续以牺牲其他三个的群体来获得 Golang 的增长。 + +如往常一样,我们会监测这些语言的各种前进方向,以观察市场趋势。而且,榜单的任何新进入者都会被密切关注。这是一个令人兴奋和动态的发展领域。一个会提供随时间不断变化的结果。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxcareer.com/do-you-have-what-it-takes-to-be-a-software-developer + +作者:[Brent Marinaccio ][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.linuxcareer.com/do-you-have-what-it-takes-to-be-a-software-developer +[1]:https://www.linuxcareer.com/skills-watch +[2]:https://www.linuxcareer.com/do-you-have-what-it-takes-to-be-a-software-developer# From 818bf146ffd99c14f0e353b5fd7c5ddc7d2aa93b Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 14 Jul 2017 08:47:19 +0800 Subject: [PATCH 095/100] translated --- ...hat it takes to be a software developer.md | 34 ------------------- 1 file changed, 34 deletions(-) delete mode 100644 sources/talk/20170616 Do you have what it takes to be a software developer.md diff --git a/sources/talk/20170616 Do you have what it takes to be a software developer.md b/sources/talk/20170616 Do you have what it takes to be a software developer.md deleted file mode 100644 index 3dec6cc692..0000000000 --- a/sources/talk/20170616 Do you have what it takes to be a software developer.md +++ /dev/null @@ -1,34 +0,0 @@ -# 成为一名软件开发者需要些什么? - -![](https://www.linuxcareer.com/images/software_developer_skills.jpg) - -应用程序是在应用领域。底层的 Linux 做了很多工作,而且还在继续,但是在过去几年里,应用程序领域开始增长。在这种情况下,开发人员使用哪种语言构建这些应用程序?简而言之,要看情况,我所了解的并不是一个巨大的惊喜。但是,随着我们逐渐拥有的数据,我们可以确定哪些语言领先。 - -发现自己在领先的语言是 Java。它已经围绕开源软件15年以上,但情况并不总是如此。在早期,我们没有看到很多对 java 开发者的兴趣,但这个男孩已经改变了。它是目前应用领域的权威领导者。虽然数字在过去六个季度没有增长,但整体数量却令人印象深刻。平均而言,在 FLOSS 上公司发布的职位中有超过 1/3 的职位要求 Java 技能。这对几年前没有在榜单上出现的语言而言是一个壮举。而且,由于它与 Android 的大量使用,未来这个数字增加也并不奇怪。 - -在应用程序领域中使用的另一种语言是 C++。虽然它的数量不能与 Java 竞争,但它仍然在这个领域占据了很大的市场份额。而且 3 个招聘中有一个要求 Java,C++ 是 4 个中有一个要求。与 Java 类似,其数字在过去六个季度中保持相对稳定。C++一直被大量使用,即使 Java 已经取代它,它仍然是一种高度相关的语言。 - - -进入到网络应用领域,多年来一直在改变领导者。在早期,大多数 Web 程序明确选择使用 PHP 开发。正如之前关于脚本的文章所讨论的,这几年来已经发生了变化。在过去几年中,PHP 的使用似乎有所恶化。在过去一年半的时间里,已经急剧下降了 30% 以上。这是一个令人震惊的数字,只有时间才能确定趋势是否持续。 - -最初打破 PHP 领导的最初是 Ruby on Rails。多年来,我看到公司和开发商进行了这一转型。Ruby on Rails 经历了一段时间,在这个时期它是这个领域的首选语言。然而,从我们收集的数字来看,它的光泽似乎已经失去了一点优势。虽然没有像 PHP 这样的衰退,但其数量一直保持相对平稳,所以它曾经经历的增长似乎停滞不前。 - -目前在网络应用程序领域的王者似乎是 Javascript。它获得了最大的总数。虽然它的数量保持平坦,这很像 Ruby on Rails,但它已经吸引了更多的观众。平均来说,过去六个季度,公司在分析的 10,000 份工作清单中有 1,500 份需要 Javascript 技能。这比 PHP 或 Ruby on Rails 多了 70%。 - -随着 PHP 的衰落以及 Ruby on Rails 和 Javascript 停滞不前,有什么在 Web 程序领域增长的么?这个群体的突出者似乎是 Golang。它在 2007 年由 Google 内的几位开发人员创建,似乎这种语言开始获得更广泛的受众群体。虽然与其他三个讨论的总体数字相比,总体看起来比去年同期增长了 50%。如果这种趋势继续下去,那将是非常有趣的。在我看来,我预计我们会继续以牺牲其他三个的群体来获得 Golang 的增长。 - -如往常一样,我们会监测这些语言的各种前进方向,以观察市场趋势。而且,榜单的任何新进入者都会被密切关注。这是一个令人兴奋和动态的发展领域。一个会提供随时间不断变化的结果。 - --------------------------------------------------------------------------------- - -via: https://www.linuxcareer.com/do-you-have-what-it-takes-to-be-a-software-developer - -作者:[Brent Marinaccio ][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.linuxcareer.com/do-you-have-what-it-takes-to-be-a-software-developer -[1]:https://www.linuxcareer.com/skills-watch -[2]:https://www.linuxcareer.com/do-you-have-what-it-takes-to-be-a-software-developer# From eb62969af7aaf2b757543256bfb8529dc49dc73e Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 14 Jul 2017 08:52:04 +0800 Subject: [PATCH 096/100] translating --- ...shit. Shut up and get the work done – says Linus Torvalds.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/talk/20170215 Talk of tech innovation is bullshit. Shut up and get the work done – says Linus Torvalds.md b/sources/talk/20170215 Talk of tech innovation is bullshit. Shut up and get the work done – says Linus Torvalds.md index 422a2872d9..f8c8033476 100644 --- a/sources/talk/20170215 Talk of tech innovation is bullshit. Shut up and get the work done – says Linus Torvalds.md +++ b/sources/talk/20170215 Talk of tech innovation is bullshit. Shut up and get the work done – says Linus Torvalds.md @@ -1,3 +1,5 @@ +translating----geekpi + Talk of tech innovation is bullsh*t. Shut up and get the work done – says Linus Torvalds ============================================================ From 52d7411f2a9d3452354923176a514ac35da12b97 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 14 Jul 2017 15:29:03 +0800 Subject: [PATCH 097/100] PRF:20170622 8 ways to contribute to open source when you have no time.md @geekpi --- ...te to open source when you have no time.md | 45 +++++++++---------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/translated/tech/20170622 8 ways to contribute to open source when you have no time.md b/translated/tech/20170622 8 ways to contribute to open source when you have no time.md index 8f67d79394..e6b52f07af 100644 --- a/translated/tech/20170622 8 ways to contribute to open source when you have no time.md +++ b/translated/tech/20170622 8 ways to contribute to open source when you have no time.md @@ -1,48 +1,43 @@ -当没有时间的时候,8种为开源做贡献的方式 +在你没有时间的时候,8 种为开源做贡献的方式 ============================================================ -### 在忙碌的生活中抽出时间回馈给你关心的项目。 +> 在忙碌的生活中抽出时间回馈给你关心的项目。 ![8 ways to contribute to open source when you have no time](https://opensource.com/sites/default/files/styles/image-full-size/public/images/law/LAW-patent_reform_520x292_10136657_1012_dc.png?itok=zLMswcrw "8 ways to contribute to open source when you have no time") -图片提供: opensource.com -人们不给开源做贡献(或不贡献更多)的[常见原因][3]之一是缺乏时间。我了解生活是有挑战性的,有这么多的优先的事情争夺你有限的注意力。那么,如何才能在忙碌的生活中为你关心的开源项目抽出时间呢? +人们不给开源做贡献(或不能做更多贡献)的[最常见的原因][3]之一是缺乏时间。我了解生活是有挑战性的,有这么多的优先的事情争夺你有限的注意力。那么,如何才能在忙碌的生活中为你关心的开源项目抽出时间呢? -为了充分说明,我应该警告你,我推迟了将这篇文章给编辑,因为我抽不出时间在这上面。请自行承担风险。 +为了充分披露,我需要提醒你,我延误了把这篇文章给编辑的时间,因为我抽不出时间写它,所以是否接受我的建议,请自行承担风险。 ### 找出你关心的 -贡献的第一步是弄清楚你正在做些什么。你有想要贡献的项目吗?有没有一个你想要帮助的具体项目?你只想做_一些_事情吗?弄清楚你正在做的事情将帮助你决定你的生活中的优先事项。 +贡献的第一步是弄清楚你正在做些什么。你有一个想要贡献的自己的项目吗?有没有一个你想要帮助的具体项目?或者你只是想做_某个事情_?弄清楚你正在做的事情将帮助你决定你的生活中的优先事项。 ### 找出其他的方法贡献 -编写新功能可能需要数小时的设计、编码和测试。离开之后在几分钟之内从原来的地方重新开始并不容易。如果你没有大于 30 分钟的无中断工作并且你承担的是一个大的任务,你或许会感到沮丧。 +编写新功能可能需要数小时的设计、编码和测试。这对于那种只有几分钟时间就得离开,然后从原来的地方重新开始的情况下并不容易。如果你没有办法进行长于 30 分钟的无中断工作,当你试着完成一个大的任务时,你或许会感到沮丧。 -但还有其他方式可以帮助满足你在空闲的时间内回馈。其中一些可以通过智能手机快速完成,这意味着人们避免在通勤上浪费时间,并将其用于开源贡献。以下是可以在小块时间中完成的一些事情列表: - -* **Bug 分类:** 所有的 bug 报告都有必要的信息来诊断和解决它们么?它们是否妥善提交(给正确的范围,正确的严重程度等)了么? +但还有其它的或许可以满足你的需求的贡献方式,可以让你利用起来空闲的时间。其中一些可以通过智能手机快速完成,这意味着人们避免在通勤上浪费时间,并将其用于开源贡献。以下是可以在小块时间中完成的一些事情列表: +* **Bug 分类:** 所有的 bug 报告都有必要的信息来诊断和解决它们么?它们是否妥善提交(给出正确的范围,正确的严重程度等)了么? * **邮件列表支持:** 用户或其他贡献者在邮件列表中提出问题?也许你可以帮忙。 - -* **文档修补:** 文档可以经常(但不总是)比代码用更小块的时间来处理。也许有几个地方你可以填写,或者也许是时候浏览一下文档,并确保它们仍然准确。 - -* **营销:** 在社交媒体上谈论你的项目或者社区。写一篇快速入门博文。投票并评论新闻聚合。 +* **文档修补:** 文档可以经常(但不总是)比代码用更小块的时间来处理。也许有几个地方你可以补充,或者也许是时候浏览一下文档,并确保它们仍然准确。 +* **营销:** 在社交媒体上谈论你的项目或者社区。写一篇快速入门博文。在新闻聚合里投票和评论。 ### 与你的老板交谈 -你可能会认为在工作日你不能在开源项目上工作,但是你有_问过么_? 特别是如果这个项目以某种方式与你的日常工作相关,那你可能可以卖掉你的老板,让你可在工作时做出贡献。请注意,可能存在一些知识产权问题(例如,谁拥有你在工作时间内提供的代码的权利),因此首先做你的研究并以书面形式获得授权。 +你可能会认为在上班时间里你不能在开源项目上工作,但是你有_问过么_? 特别是如果这个项目以某种方式与你的日常工作相关,那你或许可以和你的老板沟通,让你可在工作时做出贡献。请注意,这可能存在一些知识产权问题(例如,谁拥有你在工作时间内提供的代码的权利),因此首先做你的研究并以书面形式获得授权。 ### 设置最后期限 -我得到的最佳时间管理建议可以归纳为两个规则: +我所学到的最佳时间管理建议可以归纳为两个规则: 1. 如果要完成,它必须有一个截止日期 - 2. 可以更改最后期限 -这篇文章有一个最后期限。它没有特别的时间敏感性,但最后期限意味着我定义了什么时候想完成它,并给编辑者一个什么时候可以提交的感觉。是的,如上所述,我错过了最后期限。你知道发生了什么事么?我设定了一个新的期限(第二次是个魅力!)。 +这篇文章有一个最后期限。它没有特别的时间敏感性,但最后期限意味着我定义了什么时候想完成它,并给编辑一个什么时候可以提交的感觉。是的,如上所述,我错过了最后期限。你知道发生了什么事么?我设定了一个新的期限(二手才棒!)。 -如果有些事_是_时间敏感的,如果你需要返工一两次,设置最后期限可以给你一些空间。 +如果有些事_是_时间敏感的,在你需要返工一两次时,设置最后期限可以给你一些空间。 ### 将它放到你的日程上 @@ -56,20 +51,22 @@ ### 停止 -有时,贡献最好的方式是一点不贡献。你是一个忙碌的人,不管你是多么的棒,你不能避免你的生理和心理需要。它们会找上你。花点时间来休息,这可以提高你的生产力,使你的工作更快,突然间你就有时间去做那些你一直想做的开源贡献了。 +有时,贡献最好的方式是一点不贡献。你是一个忙碌的人,不管你是多么的棒,你不能避免你的生理和心理需要,它们会找上你。花点时间来休息,这可以提高你的生产力,使你的工作更快,突然间你就有时间去做那些你一直想做的开源贡献了。 ### 说“不” 我不擅长这个,所以这很糟糕。但是没有人能做任何想做的事情。有时候,你可以做的最好的事情是停止贡献,就像以前一样,或者没有贡献(参见上文)。 -几年前,我领导了 Fedora 文档团队。团队的传统是,在每次发布结束时, 领导会主动提出靠边站。我已经做了一两次,没有人加强,所以我保持着这个角色。但是在我的第二或第三次发布之后,我明确表示,我不会继续担任团队领导。我还是很喜欢这份工作,但我正在全职工作,在研究生一半时,我的妻子怀了我们的第一个孩子。我没有办法做到始终如一的努力,所以我退出领导了。我继续做出贡献,但是在要求较低的能力的位置中。 +几年前,我领导了 Fedora 文档团队。团队的传统是,在每次发布结束时, 领导会主动提出靠边站。我已经做了一两次,没有人加强其作用替代我,所以我保持着这个角色。但是在我的第二或第三次发布之后,我明确表示,我不会继续担任团队领导。我还是很喜欢这份工作,但我正在全职工作,在研究生读到一半时,我的妻子怀了我们的第一个孩子。我没有办法做到始终如一的努力,所以我退出领导了。我继续做出贡献,但是在要求较低的能力的位置中。 -如果你正在努力抽出时间来满足你的义务(自我强加或者不是),那么也许现在是重新考虑你的角色了。你建立的可能是一个特别困难的项目或者考虑让投资进入。但有时你不得不这么做-为了你自己好以及项目本身。 +如果你正在努力抽出时间来满足你的义务(自我强加的或者不是),那么也许现在是重新考虑你的角色了。你建立的可能是一个特别困难的项目或者考虑让投资进入。但有时你不得不这么做-为了你自己好以及项目本身。 ### 其他还有什么? 你如何找到时间作出贡献? 让我们在评论中知道。 +(题图: opensource.com) + -------------------------------------------------------------------------------- 作者简介: @@ -81,9 +78,9 @@ Ben Cotton - Ben Cotton 是一个培训过的气象学家和一个职业的高 via: https://opensource.com/article/17/6/find-time-contribute -作者:[Ben Cotton ][a] +作者:[Ben Cotton][a] 译者:[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/) 荣誉推出 From f20f1bb0016746218e7093fd62089438911b84a2 Mon Sep 17 00:00:00 2001 From: feng lv Date: Fri, 14 Jul 2017 17:03:40 +0800 Subject: [PATCH 098/100] ucasFL translating --- .../20170330 Study Ruby Programming with Open-Source Books.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170330 Study Ruby Programming with Open-Source Books.md b/sources/tech/20170330 Study Ruby Programming with Open-Source Books.md index 20ac5cf826..1a70fec73a 100644 --- a/sources/tech/20170330 Study Ruby Programming with Open-Source Books.md +++ b/sources/tech/20170330 Study Ruby Programming with Open-Source Books.md @@ -1,3 +1,5 @@ +ucasFL translating + STUDY RUBY PROGRAMMING WITH OPEN-SOURCE BOOKS ============================================================ From dee92affceeee3e1f4c928a2fccdfd1e66ce11ea Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 15 Jul 2017 00:21:01 +0800 Subject: [PATCH 099/100] PUB:20170622 8 ways to contribute to open source when you have no time.md @geekpi --- ...te to open source when you have no time.md | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) rename {translated/tech => published}/20170622 8 ways to contribute to open source when you have no time.md (60%) diff --git a/translated/tech/20170622 8 ways to contribute to open source when you have no time.md b/published/20170622 8 ways to contribute to open source when you have no time.md similarity index 60% rename from translated/tech/20170622 8 ways to contribute to open source when you have no time.md rename to published/20170622 8 ways to contribute to open source when you have no time.md index e6b52f07af..920a2b60b1 100644 --- a/translated/tech/20170622 8 ways to contribute to open source when you have no time.md +++ b/published/20170622 8 ways to contribute to open source when you have no time.md @@ -1,32 +1,32 @@ -在你没有时间的时候,8 种为开源做贡献的方式 +8 种在你没有时间的时候为开源做贡献的方式 ============================================================ > 在忙碌的生活中抽出时间回馈给你关心的项目。 ![8 ways to contribute to open source when you have no time](https://opensource.com/sites/default/files/styles/image-full-size/public/images/law/LAW-patent_reform_520x292_10136657_1012_dc.png?itok=zLMswcrw "8 ways to contribute to open source when you have no time") -人们不给开源做贡献(或不能做更多贡献)的[最常见的原因][3]之一是缺乏时间。我了解生活是有挑战性的,有这么多的优先的事情争夺你有限的注意力。那么,如何才能在忙碌的生活中为你关心的开源项目抽出时间呢? +人们不给开源做贡献(或不能做更多贡献)的[最常见的原因][3]之一是缺乏时间。人艰不拆,有这么多的优先的事情争夺你有限的注意力。那么,如何才能在忙碌的生活中为你关心的开源项目抽出时间呢? 为了充分披露,我需要提醒你,我延误了把这篇文章给编辑的时间,因为我抽不出时间写它,所以是否接受我的建议,请自行承担风险。 -### 找出你关心的 +### 找出你所关心的 -贡献的第一步是弄清楚你正在做些什么。你有一个想要贡献的自己的项目吗?有没有一个你想要帮助的具体项目?或者你只是想做_某个事情_?弄清楚你正在做的事情将帮助你决定你的生活中的优先事项。 +贡献的第一步是弄清楚你正在做些什么。你有一个你自己的为之努力的项目吗?有没有一个你想要帮助的具体项目?或者你只是想做_某个事情_?弄清楚你正在做的事情将帮助你决定你的生活中的优先事项。 ### 找出其他的方法贡献 -编写新功能可能需要数小时的设计、编码和测试。这对于那种只有几分钟时间就得离开,然后从原来的地方重新开始的情况下并不容易。如果你没有办法进行长于 30 分钟的无中断工作,当你试着完成一个大的任务时,你或许会感到沮丧。 +编写新功能可能需要数小时的设计、编码和测试。这对于那种只有几分钟时间就得离开,然后再从原来的地方重新开始的情况下并不容易。如果你没有办法进行长于 30 分钟的无中断工作,当你试着完成一个大的任务时,你或许会感到沮丧。 -但还有其它的或许可以满足你的需求的贡献方式,可以让你利用起来空闲的时间。其中一些可以通过智能手机快速完成,这意味着人们避免在通勤上浪费时间,并将其用于开源贡献。以下是可以在小块时间中完成的一些事情列表: +但还有或许可以满足你的需求的其它贡献方式,可以让你利用起来空闲的时间。其中一些可以通过智能手机快速完成,这意味着人们可以避免在通勤上浪费时间,并将其用于开源贡献。以下是可以在小块时间中完成的一些事情列表: * **Bug 分类:** 所有的 bug 报告都有必要的信息来诊断和解决它们么?它们是否妥善提交(给出正确的范围,正确的严重程度等)了么? -* **邮件列表支持:** 用户或其他贡献者在邮件列表中提出问题?也许你可以帮忙。 -* **文档修补:** 文档可以经常(但不总是)比代码用更小块的时间来处理。也许有几个地方你可以补充,或者也许是时候浏览一下文档,并确保它们仍然准确。 +* **邮件列表支持:** 用户或其他贡献者在邮件列表中提出了问题?也许你可以帮忙。 +* **文档修补:** 文档经常(但不总是)可以比代码用更小块的时间来处理。也许有几个地方你可以补充一下,或者也许是时候浏览一下文档并确保它们仍然准确了。 * **营销:** 在社交媒体上谈论你的项目或者社区。写一篇快速入门博文。在新闻聚合里投票和评论。 ### 与你的老板交谈 -你可能会认为在上班时间里你不能在开源项目上工作,但是你有_问过么_? 特别是如果这个项目以某种方式与你的日常工作相关,那你或许可以和你的老板沟通,让你可在工作时做出贡献。请注意,这可能存在一些知识产权问题(例如,谁拥有你在工作时间内提供的代码的权利),因此首先做你的研究并以书面形式获得授权。 +你可能会认为在上班时间里你不能在开源项目上工作,但是你有_问过么_? 特别是如果这个项目以某种方式与你的日常工作相关,那你或许可以和你的老板谈谈,让你可在工作时做出贡献。请注意,这可能存在一些知识产权问题(例如,谁拥有你在工作时间内提供的代码的权利),因此首先做一下研究并以书面形式获得授权。 ### 设置最后期限 @@ -35,31 +35,31 @@ 1. 如果要完成,它必须有一个截止日期 2. 可以更改最后期限 -这篇文章有一个最后期限。它没有特别的时间敏感性,但最后期限意味着我定义了什么时候想完成它,并给编辑一个什么时候可以提交的感觉。是的,如上所述,我错过了最后期限。你知道发生了什么事么?我设定了一个新的期限(二手才棒!)。 +这篇文章有一个最后期限。它没有特别的时间敏感性,但最后期限意味着我定义了什么时候想完成它,并给编辑一个什么时候可以提交的感觉。是的,如上所述,我错过了最后期限。但你知道发生了什么事么?我设定了一个新的期限(二手才最棒!)。 -如果有些事_是_时间敏感的,在你需要返工一两次时,设置最后期限可以给你一些空间。 +如果有些事_是_时间敏感的,在你需要返工一两次时,设置最后期限也可以给你一些空间。 ### 将它放到你的日程上 如果你使用日历安排你的生活,那用它安排一些时间来开展你的开源项目,可能是完成此项工作的唯一方法。你计划多少时间取决于你自己,但即使你每周只用一小时作为开源时间,这仍会给你每周一小时的开源时间。 -这有一个秘密:有时候,如果你需要时间去做别的事情,或者什么都不做,那么可以自己取消它。 +这有一个秘密:有时候,如果你需要时间去做别的事情,或者什么都不想做,那么可以自己取消它。 ### 开拓未使用的时间 -你在通勤中感到无聊吗?你晚上睡觉困难么?也许你可以利用这个时间来贡献。现在我认为“每周完全投入工作 169 个小时”的生活方式是一件非常可怕的事情。也就是说,有些夜晚你不能入睡。也许你已经意识到了可以做贡献,而不是躺在床上看看你的 Twitter 上的朋友在世界的另一边做了什么(如我做的)。就是不要养成放弃睡眠的习惯。 +你在通勤中感到无聊吗?你晚上睡觉困难么?也许你可以利用这个时间来贡献。现在我认为“每周完全投入工作 169 个小时”的生活方式是一件非常可怕的事情。也就是说,有些夜晚你不能入睡。也许你已经意识到了可以做贡献,而不是躺在床上看看你的 Twitter 上的朋友在世界的另一边做了什么(如我做的)。但是不要养成放弃睡眠的习惯。 ### 停止 -有时,贡献最好的方式是一点不贡献。你是一个忙碌的人,不管你是多么的棒,你不能避免你的生理和心理需要,它们会找上你。花点时间来休息,这可以提高你的生产力,使你的工作更快,突然间你就有时间去做那些你一直想做的开源贡献了。 +有时,贡献最好的方式是一点不贡献。你是一个忙碌的人,不管你是多么的棒,你不能避开你的生理和心理的需要,它们会找上你。花点时间来休息,这也许可以提高你的生产力,使你的工作更快,突然间你就有时间去做那些你一直想做的开源贡献了。 ### 说“不” -我不擅长这个,所以这很糟糕。但是没有人能做任何想做的事情。有时候,你可以做的最好的事情是停止贡献,就像以前一样,或者没有贡献(参见上文)。 +我不擅长这个,所以我做的并不好。但是没有人能做到任何想做的事情。有时候,你可以做的最好的事情是停止贡献,就像以前一样,或者没有贡献(参见上文)。 -几年前,我领导了 Fedora 文档团队。团队的传统是,在每次发布结束时, 领导会主动提出靠边站。我已经做了一两次,没有人加强其作用替代我,所以我保持着这个角色。但是在我的第二或第三次发布之后,我明确表示,我不会继续担任团队领导。我还是很喜欢这份工作,但我正在全职工作,在研究生读到一半时,我的妻子怀了我们的第一个孩子。我没有办法做到始终如一的努力,所以我退出领导了。我继续做出贡献,但是在要求较低的能力的位置中。 +几年前,我领导了 Fedora 文档团队。团队的传统是,在每次发布结束时, 领导会主动提出下台。我已经做了一两次,没有人想要替代我,所以我继续保持着这个角色。但是在我的第二或第三次发布之后,我明确表示,我不会继续担任团队领导了。我还是很喜欢这份工作,但我有一份全职的工作,而且在研究生读到一半时,我的妻子怀了我们的第一个孩子。我没有办法做到始终如一的努力,所以我退出领导了。我继续做出贡献,但是在要求较低的能力的位置中。 -如果你正在努力抽出时间来满足你的义务(自我强加的或者不是),那么也许现在是重新考虑你的角色了。你建立的可能是一个特别困难的项目或者考虑让投资进入。但有时你不得不这么做-为了你自己好以及项目本身。 +如果你正在努力抽出时间来满足你的义务(自我强加的或者不是),那么也许现在是重新考虑你的角色了。这对于你自己创建的或者已经大量投资的项目来说很困难,但有时你不得不这么做——为了你自己好以及项目本身。 ### 其他还有什么? From fd063e005a784c1dfd169fdf6554598be32fa3f6 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 15 Jul 2017 09:14:11 +0800 Subject: [PATCH 100/100] PRF&PUB:20170426 How to get started learning to program.md @WangYueScream --- ... How to get started learning to program.md | 92 +++++-------------- 1 file changed, 22 insertions(+), 70 deletions(-) rename {translated/talk => published}/20170426 How to get started learning to program.md (52%) diff --git a/translated/talk/20170426 How to get started learning to program.md b/published/20170426 How to get started learning to program.md similarity index 52% rename from translated/talk/20170426 How to get started learning to program.md rename to published/20170426 How to get started learning to program.md index 989e1c82ca..4398dc76a2 100644 --- a/translated/talk/20170426 How to get started learning to program.md +++ b/published/20170426 How to get started learning to program.md @@ -1,110 +1,66 @@ - 如何开始学习编程? ====================================================== -### 编程初学者可能都思考过这个问题,“我该怎么学编程?”这里我们提供些相关的参考指导来帮助你找到最适合自己学习情况和学习需要的方法。 - +> 编程初学者可能都思考过这个问题,“我该怎么学编程?”这里我们提供些相关的参考指导来帮助你找到最适合自己学习情况和学习需要的方法。 ![Know thyself](https://opensource.com/sites/default/files/styles/image-full-size/public/u23316/roman-know-thyself-osdc-lead.png?itok=oWuH8hRr "Know thyself") ->图片来源 : Opensource.com 修改自 [维基共享][20]里的某不知名艺术家的作品 - - 最近有很多关于学习编程的争论。不仅仅是因为与软件开发公司公开的待应聘的职位数量相比较[符合招聘要求的人远远无法满足缺口][21],编程也是[工资最高][22]和[工作满足感最强][23]的众多职业之一。也难怪越来越多的人都想进入这个行业。 - 但是你要怎么做才能正确地入行呢?“**我应该怎么学习编程?**”是初学者常见的一个问题。尽管我没有这些问题的全部答案,但是我希望这篇文章能够给你提供相关指导来帮助你找到最适合你的需求和自身情况发展的解决办法。 - ### 你的学习方式是什么? +在你开始学习编程之前,你需要考虑的不仅仅是你的方向选择,还要更多的考虑下你自己。古罗马人有句谚语,[γνῶθι σεαυτόν][24](gnothi seauton),意思是“认识你自己”。投入到一个大型的编程学习过程中难度不小。足够的自我认识是非常有必要的,这能够确保你做出的选择通向成功的机会非常大。你需要思考并诚实地回答接下来的这些问题: - - -在你开始学习编程之前,你需要考虑的不仅仅是你的方向选择,还要更多的考虑下你自己。古罗马人有句谚语,[γνῶθι σεαυτόν][24](gnothi seauton),意思是“认识你自己”。进行一个大型的编程学习难度不小。足够的自我认识是非常有必要的,这能够确保你做出的选择通向成功的机会非常大。你需要思考并诚实地回答接下来的这些问题: - - -* **你最喜欢什么样的学习方式?**怎么做你才能学到最好?是通过阅读的方式吗?还是听讲座?还是主要通过动手实践?你需要选择对你最有效的方法。不要仅仅因为这种学习方法流行或者有其他人说过这种方法对他们很有用就选择了这种方法。 - - -* **你的需要和要求是什么?**你为什么想学习如何编程?是因为你只是想换一份工作吗?如果是这样的话,你需要多次时间才能完成呢?你要牢记,这些是_需要的_ ,不是_想要的_ 。你可能_想要_下周就换份新工作,但是_需要_ 有人在接下来的一年里帮忙供养你的正在成长的家庭。当你在人生的道路上面临方向的抉择时,时间的安排特别重要。 - - -* **你能获取的参考资料有哪些?**当然,重返大学并获得一份计算机科学专业的学位证书可能也不错,但是你必须对你自己实事求是面对现实。你的生活必须和你学习相适应。你能承受花费几个月的时间和不菲的费用去参加集训吗?你是否生活在一个提供学习机会的地方,比如提供技术性的聚会或者大学课程?你能获取到的参考资料会对你的学习过程产生巨大的影响。在打算学编程换工作前先调查好这些。 - +* **你最喜欢什么样的学习方式?**怎么做你才能学到最好?是通过阅读的方式吗?还是听讲座?还是主要通过动手实践?你需要选择对你最有效的方法。不要仅仅因为这种学习方法流行或者有其他人说过这种方法对他们很有用就选择了这种方法。 +* **你的需要和要求是什么?**你为什么想学习如何编程?是因为你只是想换一份工作吗?如果是这样的话,你需要多次时间才能完成呢?你要牢记,这些是_需要的_ ,不是_想要的_ 。你可能_想要_下周就换份新工作,但是_需要_在接下来的一年里供养你正在成长的家庭。当你在人生的道路上面临方向的抉择时,时间的安排特别重要。 +* **你能获取的参考资料有哪些?**当然,重返大学并获得一份计算机科学专业的学位证书可能也不错,但是你必须对你自己实事求是面对现实。你的生活必须和你学习相适应。你能承受花费几个月的时间和不菲的费用去参加集训吗?你是否生活在一个可以提供学习机会的地方,比如提供技术性的聚会或者大学课程?你能获取到的参考资料会对你的学习过程产生巨大的影响。在打算学编程换工作前先调查好这些。 ### 选择一门编程语言 +当你打算开始你的编程学习之路和考虑你的选择的时候,请记住不管其他人说什么,选择哪门编程语言来开始你的编程学习_关系不大_。是的,是有些编程语言比其他的更流行。比如,根据一份调查研究,目前 JavaScript,Java,PHP, 和 Python 处于 [最受欢迎最流行的编程][25] 中的前排。但是现在正流行的编程语言有可能过几年就过时了,所以不用太纠结编程语言的选择。像那些方法,类,函数,条件,控制流程和其他的编程的概念思想等等,不管你选的哪门编程语言,它们的底层原理基本是一致的。只有语法和社区的最佳实践会变。因此你能够用 [Perl][26] 学习编程,也可以用 [Swift][27] 或者 [Rust][28]。作为一个程序员,你会在你的职业生涯里用很多不同的编程语言来工作。不要认为你被困在了编程语言的选择上。 -当你打算开始你的编程学习之路和考虑你的选择的时候,请记住不管其他人说什么,选择哪门编程语言来开始你的编程学习 _关系不大_。是的,是有些编程语言比其他的更流行。比如,根据一份调查研究,目前 JavaScript,Java,PHP, 和 Python 处于 [最受欢迎最流行的编程][25] 中的前排。但是现在正流行的编程语言有可能过几年就过时了,所以不用太纠结编程语言的选择。像那些方法,类,函数,条件,控制流程和其他的编程的概念思想等等,不管你选的哪门编程语言,他们的底层原理基本保持一致。只有语法和社区的实例会变。因此你能够用 [Perl][26] 学习编程,也可以用 [Swift][27] 或者 [Rust][28]。作为一个程序员,你会在你的职业生涯里用很多不同的编程语言来工作。不要认为你被困在了编程语言的选择上。 +### 试水 +除非你已经涉足过这个行业或者确信你愿意花费你生命的剩余时光来编程,我建议你最好还是下水之前先用脚趾头来试试水温之类的来判断这水适不适合。这种工作不是每个人都能做的。在把全部希望都压在学习编程之前,你可以先尝试花费少量时间金钱来学习一小部分知识点来了解自己是否会享受这种每周起码花费 40 个小时来编码工作的生活。如果你不喜欢这种工作,你不太可能完成编程项目的学习。即便你完成结束了编程的学习阶段,你也会在你以后的编程工作中感到无比痛苦。人生苦短就不要花费你人生三分之一的时间来做你不喜欢的事了。  - - -### 市场测试 - - -除非你已经涉足过这个行业或者确信你愿意花费你生命的剩余时光来编程,我建议你最好还是潜水之前先用脚趾头来试试水温之类的来判断这水适不适合潜水。这种工作不是每个人都能做的。在把全部希望都压在学习编程之前,你可以先尝试花费少量时间金钱来学习一小部分知识点来了解自己是否会享受这种每周起码花费 40 个小时来编码工作的生活。如果你不喜欢这种工作,你不太可能完成编程项目的学习。即便你完成结束了编程的学习阶段,你也会在你以后的编程工作中感到无比痛苦。人生苦短就不要花费你人生三分之一的时间来做你不喜欢的事了。  - - -谢天谢地,软件开发不仅仅需要编程。熟悉编程概念和理解软件是怎么和他们结合在一起的是非常有用的,但是你不需要成为一个程序员也能在软件开发行业中找到一份报酬不菲的工作。在软件开发过程中,额外的重要角色有技术文档撰写人、项目经理、产品经理、测试人员、设计人员、用户体验设计者、运维/系统管理员和数据科学家等。软件成功的启动需要很多角色的人之间相互配合。不要觉得学习了编程就要求你成为一个程序员。你需要探索你的选择并确定哪个选择才是最适合你的。 - +谢天谢地,软件开发不仅仅需要编程。熟悉编程概念和理解软件是怎么和他们结合在一起的是非常有用的,但是你不需要成为一个程序员也能在软件开发行业中找到一份报酬不菲的工作。在软件开发过程中,另外的重要角色有技术文档撰写人、项目经理、产品经理、测试人员、设计人员、用户体验设计者、运维/系统管理员和数据科学家等。软件成功的启动需要很多角色之间相互配合。不要觉得学习了编程就要求你成为一个程序员。你需要探索你的选择并确定哪个选择才是最适合你的。 ### 参考的学习资料 - 你对学习参考资料的选择是什么?可能正如你已经发现的那样,可供选择的参考资料非常多,尽管在你的那片区域不是所有的资料都能够获得。 - -* **训练营**:最近这几年像 [App Academy][5] 和 [Bloc][6] 这样的训练营越来越流行。训练营通常收费 $10K或者更多,他们宣称在几周内就能够把一个学生培训成一个称职的程序员。在参加编程集训营前,你需要研究下你将要学习的项目能确保正如它所承诺的那样,学生学完毕业后能够找到一个高薪的长期供职的职位。一方面花费了数目不小的钱财,而且时间也花费了不少—通常这些都是典型的全日制课程并且要求学生在接下来的连续几周里把其他的事先放在一边专心课程学习。然而时间金钱这两项不菲的消耗通常会使很多未来的程序员无法参加训练营。 - - -* **社区学院/职业培训中心**:社区学院常常被那些研究自己对学习编程的选择的人所忽视,不得不说这些人该为自己对社区学院的忽视感到羞愧。你在社区学院或者职业培训中心能够接受到的教育是和你选择其他方式学习编程的学习效果一样有效,而且费用也不高。 - - -* **国家/地方的培训项目**:许多地区都认识到在他们的地区增加技术投资的经济效益,并且已经制定了培训计划来培养受过良好教育和准备好的劳动力。培训项目的案例包括了[Code Oregon][7] 和 [Minneapolis TechHire][8]。检查下你的州、省或自治区是否提供这样的项目。 - - -* **在线训练**:许多公司和组织都提供在线技术培训项目。比如,[Linux Foundation][9]致力于通过开源技术使人们获得成功。其他的像[O'Reilly Media][10], [Lynda.com][11], 和 [Coursera][12]在软件开发涉及的许多方面提供培训。[Codecademy][13]提供对编程概念的在线介绍。每个项目的成本会有所不同,但大多数项目会允许你在你的日程安排中学习。 - - -* **MOOCs**:在过去的几年里,moocs-大规模开放在线课程的发展势头已经很好了。像 [Harvard][14], [Stanford][15], [MIT][16] 和其他的一些世界一流大学他们一直在记录他们的课程,并免费提供在线课程。课程的自我指导性质可能并不适合所有人,但可利用的材料使这成为一个有价值的学习选择。 - - -* **专业书籍**:许多人喜欢用书自学。这是相当经济的,在初步学习阶段后提供了现成的参考资料。尽管你可以通过在线服务订购和访问图书像[Safari][17] 和 [Amazon][18],但是也不要忘了检查你本地的公共图书馆。 - +* **训练营**:最近这几年像 [App Academy][5] 和 [Bloc][6] 这样的训练营越来越流行。训练营通常收费 $10K 或者更多,他们宣称在几周内就能够把一个学生培训成一个称职的程序员。在参加编程集训营前,你需要研究下你将要学习的项目能确保正如它所承诺的那样,在学生学完毕业后能够找到一个高薪的长期供职的职位。一方面花费了数目不小的钱财,而且时间也花费了不少——通常这些都是典型的全日制课程并且要求学生在接下来的连续几周里把其它的事先放在一边专心课程学习。然而时间金钱这两项不菲的消耗通常会使很多未来的程序员无法参加训练营。 +* **社区学院/职业培训中心**:社区学院常常被那些调研自己学习编程的方式的人所忽视,不得不说这些人该为自己对社区学院的忽视感到羞愧。你在社区学院或者职业培训中心能够接受到的教育是和你选择其他方式学习编程的学习效果一样有效,而且费用也不高。 +* **国家/地方的培训项目**:许多地区都认识到在他们的地区增加技术投资的经济效益,并且已经制定了培训计划来培养受过良好教育和准备好的劳动力。培训项目的案例包括了 [Code Oregon][7] 和 [Minneapolis TechHire][8]。检查下你的州、省或自治区是否提供这样的项目。 +* **在线训练**:许多公司和组织都提供在线技术培训项目。比如,[Linux 基金会][9]致力于通过开源技术使人们获得成功。其他的像 [O'Reilly Media][10]、[Lynda.com][11] 和 [Coursera][12] 在软件开发涉及的许多方面提供培训。[Codecademy][13] 提供对编程概念的在线介绍。每个项目的成本会有所不同,但大多数项目会允许你在你的日程安排中学习。 +* **MOOC**:在过去的几年里,大规模开放在线课程的发展势头已经很好了。像 [哈佛][14]、[斯坦福][15]、[MIT][16] 和其他的一些世界一流大学他们一直在记录他们的课程,并免费提供在线课程。课程的自我指导性质可能并不适合所有人,但可利用的材料使这成为一个有价值的学习选择。 +* **专业书籍**:许多人喜欢用书自学。这是相当经济的,在初步学习阶段后提供了现成的参考资料。尽管你可以通过像 [Safari][17] 和 [Amazon][18] 这样的在线服务订购和访问图书,但是也不要忘了检查你本地的公共图书馆。 ### 网络支持 +无论你选择哪一种学习资源,有网络支持都将获得更大的成功。与他人分享你的经历和挑战可以帮助你保持动力,同时为你提供一个放心的地方去问那些你可能还没有足够自信到其他地方去问的问题。许多城镇都有当地的用户群聚在一起讨论和学习软件技术。通常你可以在 [Meetup.com][29] 这里找到。专门的兴趣小组,比如 [Women Who Code][30] 和 [Code2040][31],在大多数城市地区经常举行会议和黑客马拉松活动,这是在你学习的时候结识并建立一个支持网络的很好的方式。一些软件会议举办“黑客日”,在那里你可以遇到有经验的软件开发人员,他们能够帮助你解决你所困扰的一些问题。例如,每年的 [PyCon][32] 会议都会提供几天的时间来让人们聚集在一起工作、研讨。一些项目,比如 [BeeWare][33],使用这些短暂的时间来帮助新程序员学习和对这些项目做贡献。 -无论你选择哪一种学习资源,有网络支持都将获得更大的成功。与他人分享你的经历和挑战可以帮助你保持动力,同时为你提供一个安全的地方去问那些你可能还没有足够自信到其他地方去问的问题。许多城镇都有当地的用户群聚在一起讨论和学习软件技术。通常你可以在 [Meetup.com][29] 这里找到。专门的兴趣小组,比如 [Women Who Code][30] 和 [Code2040][31],在大多数城市地区,经常举行会议和黑客马拉松活动,这是在你学习的时候,一个很好的方式来结识并建立一个支持网络。一些软件会议举办“黑客日”,在那里你可以遇到有经验的软件开发人员,他们能够帮助你解决你所困扰的一些问题。例如,每年的[PyCon][32]会议都会提供几天的时间来让人们聚集在一起工作、研讨。一些项目,比如[BeeWare][33],使用这些短暂的时间来帮助新程序员学习和对这些项目做贡献。 - - -你的网络支持不需要来自正式的聚会。一个小的学习小组可以有效地保持你的学习积极性,并且可以像在你最喜欢的社交网络上发布邀请一样容易形成。如果你生活在一个没有大量软件开发人员的社区来支持几个meetups和用户组,那么这一点特别有用。 - +你的网络支持不需要来自正式的聚会。一个小的学习小组可以有效地保持你的学习积极性,并且可以像在你最喜欢的社交网络上发布邀请一样容易形成。如果你生活在一个没有大量软件开发人员社区所支持的聚会和用户组的地区,那么这一点特别有用。 ### 开始学习编程的几个步骤 - - 简单的来说,既然你决定学习编程,可以参考这几个方法给自己一个尽可能成功的机会: 1. 将你的需要/需求和参考学习资料列出清单并进行收集 - 2. 搜寻在你的当地那里能够可用的选择 - 3. 放弃不能符合你的需求和参考学习资料的选择 - 4. 选择最符合你需求的和最适合你的学习参考资源 - 5. 找到一个能够得到支持的网络 - 务必牢记:你的学习过程永远不会结束。高速发展的软件产业,会导致新技术和新进展几乎每天都会出现。一旦你学会了编程,你就必须花时间去学习适应这些新的进步。你不能依靠你的工作来为你提供这种培训。只有你自己负责自己的职业发展,所以如果你想保持最新的技术和工作能力,你必须紧跟行业最新的技术。 -祝你好运! +祝你好运! + +(题图 : Opensource.com 修改自 [维基共享][20]里的某不知名艺术家的作品 ) -------------------------------------------------------------------------------- @@ -113,17 +69,13 @@ VM (Vicky) Brasseur - VM (aka Vicky) 是一个技术人员,也是项目、工作进程、产品和企业的经理。在她的长达 18 年的科技行业里,她曾是一名分析师、程序员、产品经理、软件工程经理和软件工程总监。目前,她是惠普企业上游开源开发团队的高级工程经理。她的博客是 anonymoushash.vmbrasseur.com,推特是 @vmbrasseur。  - - - - -------- via: https://opensource.com/article/17/4/how-get-started-learning-program -作者:[VM (Vicky) Brasseur ][a] +作者:[VM (Vicky) Brasseur][a] 译者:[WangYueScream](https://github.com/WangYueScream) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出