From 993fdc129e92bc67ae7ac5cc6f130a83f96255f0 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 6 Sep 2015 01:34:22 +0800 Subject: [PATCH 01/31] PUB:RHCSA Series--Part 02--How to Perform File and Directory Management @xiqingongzi --- ...o Perform File and Directory Management.md | 173 ++++++++---------- 1 file changed, 80 insertions(+), 93 deletions(-) rename {translated/tech/RHCSA => published}/RHCSA Series--Part 02--How to Perform File and Directory Management.md (59%) diff --git a/translated/tech/RHCSA/RHCSA Series--Part 02--How to Perform File and Directory Management.md b/published/RHCSA Series--Part 02--How to Perform File and Directory Management.md similarity index 59% rename from translated/tech/RHCSA/RHCSA Series--Part 02--How to Perform File and Directory Management.md rename to published/RHCSA Series--Part 02--How to Perform File and Directory Management.md index f46fd93321..8751949b40 100644 --- a/translated/tech/RHCSA/RHCSA Series--Part 02--How to Perform File and Directory Management.md +++ b/published/RHCSA Series--Part 02--How to Perform File and Directory Management.md @@ -1,68 +1,63 @@ -RHCSA 系列: 如何执行文件并进行文件管理 – Part 2 +RHCSA 系列(二): 如何进行文件和目录管理 ================================================================================ -在本篇(RHCSA 第二篇:文件和目录管理)中,我们江回顾一些系统管理员日常任务需要的技能 +在本篇中,我们将回顾一些系统管理员日常任务需要的技能。 ![RHCSA: Perform File and Directory Management – Part 2](http://www.tecmint.com/wp-content/uploads/2015/03/RHCSA-Part2.png) +*RHCSA: 运行文件以及进行文件夹管理 - 第二部分* -RHCSA : 运行文件以及进行文件夹管理 - 第二章 -### 创建,删除,复制和移动文件及目录 ### +### 创建、删除、复制和移动文件及目录 ### -文件和目录管理是每一个系统管理员都应该掌握的必要的技能.它包括了从头开始的创建、删除文本文件(每个程序的核心配置)以及目录(你用来组织文件和其他目录),以及识别存在的文件的类型 +文件和目录管理是每一个系统管理员都应该掌握的必备技能。它包括了从头开始的创建、删除文本文件(每个程序的核心配置)以及目录(你用来组织文件和其它目录),以及识别已有文件的类型。 - [touch 命令][1] 不仅仅能用来创建空文件,还能用来更新已存在的文件的权限和时间表 +[`touch` 命令][1] 不仅仅能用来创建空文件,还能用来更新已有文件的访问时间和修改时间。 ![touch command example](http://www.tecmint.com/wp-content/uploads/2015/03/touch-command-example.png) -touch 命令示例 +*touch 命令示例* -你可以使用 `file [filename]`来判断一个文件的类型 (在你用文本编辑器编辑之前,判断类型将会更方便编辑). +你可以使用 `file [filename]`来判断一个文件的类型 (在你用文本编辑器编辑之前,判断类型将会更方便编辑)。 ![file command example](http://www.tecmint.com/wp-content/uploads/2015/03/file-command-example.png) -file 命令示例 +*file 命令示例* -使用`rm [filename]` 可以删除文件 +使用`rm [filename]` 可以删除文件。 ![Linux rm command examples](http://www.tecmint.com/wp-content/uploads/2015/03/rm-command-examples.png) -rm 命令示例 - -对于目录,你可以使用`mkdir [directory]`在已经存在的路径中创建目录,或者使用 `mkdir -p [/full/path/to/directory].`带全路径创建文件夹 +*rm 命令示例* +对于目录,你可以使用`mkdir [directory]`在已经存在的路径中创建目录,或者使用 `mkdir -p [/full/path/to/directory]`带全路径创建文件夹。 ![mkdir command example](http://www.tecmint.com/wp-content/uploads/2015/03/mkdir-command-example.png) -mkdir 命令示例 +*mkdir 命令示例* -当你想要去删除目录时,在你使用`rmdir [directory]` 前,你需要先确保目录是空的,或者使用更加强力的命令(小心使用它)`rm -rf [directory]`.后者会强制删除`[directory]`以及他的内容.所以使用这个命令存在一定的风险 +当你想要去删除目录时,在你使用`rmdir [directory]` 前,你需要先确保目录是空的,或者使用更加强力的命令(小心使用它!)`rm -rf [directory]`。后者会强制删除`[directory]`以及它的内容,所以使用这个命令存在一定的风险。 ### 输入输出重定向以及管道 ### -命令行环境提供了两个非常有用的功能:允许命令重定向的输入和输出到文件和发送到另一个文件,分别称为重定向和管道 +命令行环境提供了两个非常有用的功能:允许重定向命令的输入和输出为另一个文件,以及发送命令的输出到另一个命令,这分别称为重定向和管道。 -To understand those two important concepts, we must first understand the three most important types of I/O (Input and Output) streams (or sequences) of characters, which are in fact special files, in the *nix sense of the word. -为了理解这两个重要概念,我们首先需要理解通常情况下三个重要的输入输出流的形式 +为了理解这两个重要概念,我们首先需要理解三个最重要的字符输入输出流类型,以 *nix 的话来说,它们实际上是特殊的文件。 -- 标准输入 (aka stdin) 是指默认使用键盘链接. 换句话说,键盘是输入命令到命令行的标准输入设备。 -- 标准输出 (aka stdout) 是指默认展示再屏幕上, 显示器接受输出命令,并且展示在屏幕上。 -- 标准错误 (aka stderr), 是指命令的状态默认输出, 同时也会展示在屏幕上 +- 标准输入 (即 stdin),默认连接到键盘。 换句话说,键盘是输入命令到命令行的标准输入设备。 +- 标准输出 (即 stdout),默认连接到屏幕。 找个设备“接受”命令的输出,并展示到屏幕上。 +- 标准错误 (即 stderr),默认是命令的状态消息出现的地方,它也是屏幕。 -In the following example, the output of `ls /var` is sent to stdout (the screen), as well as the result of ls /tecmint. But in the latter case, it is stderr that is shown. -在下面的例子中,`ls /var`的结果被发送到stdout(屏幕展示),就像ls /tecmint 的结果。但在后一种情况下,它是标准错误输出。 +在下面的例子中,`ls /var`的结果被发送到stdout(屏幕展示),ls /tecmint 的结果也一样。但在后一种情况下,它显示在标准错误输出上。 ![Linux input output redirect](http://www.tecmint.com/wp-content/uploads/2015/03/Linux-input-output-redirect.png) -输入和输出命令实例 -为了更容易识别这些特殊文件,每个文件都被分配有一个文件描述符(用于控制他们的抽象标识)。主要要理解的是,这些文件就像其他人一样,可以被重定向。这就意味着你可以从一个文件或脚本中捕获输出,并将它传送到另一个文件、命令或脚本中。你就可以在在磁盘上存储命令的输出结果,用于稍后的分析 +*输入和输出命令实例* -To redirect stdin (fd 0), stdout (fd 1), or stderr (fd 2), the following operators are available. +为了更容易识别这些特殊文件,每个文件都被分配有一个文件描述符,这是用于访问它们的抽象标识。主要要理解的是,这些文件就像其它的一样,可以被重定向。这就意味着你可以从一个文件或脚本中捕获输出,并将它传送到另一个文件、命令或脚本中。这样你就可以在磁盘上存储命令的输出结果,用于稍后的分析。 -注:表格 - - - +要重定向 stdin (fd 0)、 stdout (fd 1) 或 stderr (fd 2),可以使用如下操作符。 + +
@@ -70,102 +65,98 @@ To redirect stdin (fd 0), stdout (fd 1), or stderr (fd 2), the following operato - + - + - + - + - + - + - +
转向操作
>标准输出到一个文件。如果目标文件存在,内容就会被重写重定向标准输出到一个文件。如果目标文件存在,内容就会被重写。
>>添加标准输出到文件尾部添加标准输出到文件尾部。
2>标准错误输出到一个文件。如果目标文件存在,内容就会被重写重定向标准错误输出到一个文件。如果目标文件存在,内容就会被重写。
2>>添加标准错误输出到文件尾部.添加标准错误输出到文件尾部。
&>标准错误和标准输出都到一个文件。如果目标文件存在,内容就会被重写重定向标准错误和标准输出到一个文件。如果目标文件存在,内容就会被重写。
<使用特定的文件做标准输出使用特定的文件做标准输入。
<>使用特定的文件做标准输出和标准错误使用特定的文件做标准输入和标准输出。
- -相比与重定向,管道是通过在命令后添加一个竖杠`(|)`再添加另一个命令 . +与重定向相比,管道是通过在命令后和另外一个命令前之间添加一个竖杠`(|)`。 记得: -- 重定向是用来定向命令的输出到一个文件,或定向一个文件作为输入到一个命令。 -- 管道是用来将命令的输出转发到另一个命令作为输入。 +- *重定向*是用来定向命令的输出到一个文件,或把一个文件发送作为到一个命令的输入。 +- *管道*是用来将命令的输出转发到另一个命令作为其输入。 #### 重定向和管道的使用实例 #### -** 例1:将一个命令的输出到文件 ** +**例1:将一个命令的输出到文件** -有些时候,你需要遍历一个文件列表。要做到这样,你可以先将该列表保存到文件中,然后再按行读取该文件。虽然你可以遍历直接ls的输出,不过这个例子是用来说明重定向。 +有些时候,你需要遍历一个文件列表。要做到这样,你可以先将该列表保存到文件中,然后再按行读取该文件。虽然你可以直接遍历ls的输出,不过这个例子是用来说明重定向。 # ls -1 /var/mail > mail.txt ![Redirect output of command tot a file](http://www.tecmint.com/wp-content/uploads/2015/03/Redirect-output-to-a-file.png) -将一个命令的输出到文件 +*将一个命令的输出重定向到文件* -** 例2:重定向stdout和stderr到/dev/null ** +**例2:重定向stdout和stderr到/dev/null** -如果不想让标准输出和标准错误展示在屏幕上,我们可以把文件描述符重定向到 `/dev/null` 请注意在执行这个命令时该如何更改输出 +如果不想让标准输出和标准错误展示在屏幕上,我们可以把这两个文件描述符重定向到 `/dev/null`。请注意对于同样的命令,重定向是如何改变了输出。 # ls /var /tecmint # ls /var/ /tecmint &> /dev/null ![Redirecting stdout and stderr ouput to /dev/null](http://www.tecmint.com/wp-content/uploads/2015/03/Redirecting-stdout-stderr-ouput.png) -重定向stdout和stderr到/dev/null +*重定向stdout和stderr到/dev/null* -#### 例3:使用一个文件作为命令的输入 #### +**例3:使用一个文件作为命令的输入** -当官方的[cat 命令][2]的语法如下时 +[cat 命令][2]的经典用法如下 # cat [file(s)] -您还可以使用正确的重定向操作符传送一个文件作为输入。 +您还可以使用正确的重定向操作符发送一个文件作为输入。 # cat < mail.txt ![Linux cat command examples](http://www.tecmint.com/wp-content/uploads/2015/03/cat-command-examples.png) -cat 命令实例 +*cat 命令实例* -#### 例4:发送一个命令的输出作为另一个命令的输入 #### +**例4:发送一个命令的输出作为另一个命令的输入** -如果你有一个较大的目录或进程列表,并且想快速定位,你或许需要将列表通过管道传送给grep +如果你有一个较大的目录或进程列表,并且想快速定位,你或许需要将列表通过管道传送给grep。 -接下来我们使用管道在下面的命令中,第一个是查找所需的关键词,第二个是除去产生的 `grep command`.这个例子列举了所有与apache用户有关的进程 +接下来我们会在下面的命令中使用管道,第一个管道是查找所需的关键词,第二个管道是除去产生的 `grep command`。这个例子列举了所有与apache用户有关的进程: # ps -ef | grep apache | grep -v grep ![Send output of command as input to another](http://www.tecmint.com/wp-content/uploads/2015/03/Send-output-of-command-as-input-to-another1.png) -发送一个命令的输出作为另一个命令的输入 +*发送一个命令的输出作为另一个命令的输入* ### 归档,压缩,解包,解压文件 ### -如果你需要传输,备份,或者通过邮件发送一组文件,你可以使用一个存档(或文件夹)如 [tar][3]工具,通常使用gzip,bzip2,或XZ压缩工具. +如果你需要传输、备份、或者通过邮件发送一组文件,你可以使用一个存档(或打包)工具,如 [tar][3],通常与gzip,bzip2,或 xz 等压缩工具配合使用。 -您选择的压缩工具每一个都有自己的定义的压缩速度和速率的。这三种压缩工具,gzip是最古老和提供最小压缩的工具,bzip2提供经过改进的压缩,以及XZ提供最信和最好的压缩。通常情况下,这些文件都是被压缩的如.gz .bz2或.xz -注:表格 - - - - +您选择的压缩工具每一个都有自己不同的压缩速度和压缩率。这三种压缩工具,gzip是最古老和可以较小压缩的工具,bzip2提供经过改进的压缩,以及xz是最新的而且压缩最大。通常情况下,使用这些压缩工具压缩的文件的扩展名依次是.gz、.bz2或.xz。 + +
@@ -180,12 +171,12 @@ cat 命令实例 - + - + @@ -195,26 +186,22 @@ cat 命令实例 - + - + - +
命令
–concatenate A向归档中添加tar文件添加tar归档到另外一个归档中
–append r向归档中添加非tar文件添加非tar归档到另外一个归档中
–update
–diff or –compare d将归档和硬盘的文件夹进行对比将归档中的文件和硬盘的文件进行对比
–list t列举一个tar的压缩包列举一个tar压缩包的内容
–extract or –get x从归档中解压文件从归档中提取文件
-注:表格 - - - - +
@@ -234,34 +221,34 @@ cat 命令实例 - + - + - + - + - +
操作参数
–verbose v列举所有文件用于读取或提取,这里包含列表,并显示文件的大小、所有权和时间戳列举所有读取或提取的文件,如果和 --list 参数一起使用,也会显示文件的大小、所有权和时间戳
exclude file 排除存档文件。在这种情况下,文件可以是一个实际的文件或目录。从存档中排除文件。在这种情况下,文件可以是一个实际的文件或匹配模式。
gzip or gunzip z使用gzip压缩文件使用gzip压缩归档
–bzip2 j使用bzip2压缩文件使用bzip2压缩归档
–xz J使用xz压缩文件使用xz压缩归档
-#### 例5:创建一个文件,然后使用三种压缩工具压缩#### +**例5:创建一个tar文件,然后使用三种压缩工具压缩** -在决定使用一个或另一个工具之前,您可能想比较每个工具的压缩效率。请注意压缩小文件或几个文件,结果可能不会有太大的差异,但可能会给你看出他们的差异 +在决定使用这个还是那个工具之前,您可能想比较每个工具的压缩效率。请注意压缩小文件或几个文件,结果可能不会有太大的差异,但可能会给你看出它们的差异。 # tar cf ApacheLogs-$(date +%Y%m%d).tar /var/log/httpd/* # Create an ordinary tarball # tar czf ApacheLogs-$(date +%Y%m%d).tar.gz /var/log/httpd/* # Create a tarball and compress with gzip @@ -270,42 +257,42 @@ cat 命令实例 ![Linux tar command examples](http://www.tecmint.com/wp-content/uploads/2015/03/tar-command-examples.png) -tar 命令实例 +*tar 命令实例* -#### 例6:归档时同时保存原始权限和所有权 #### +**例6:归档时同时保存原始权限和所有权** -如果你创建的是用户的主目录的备份,你需要要存储的个人文件与原始权限和所有权,而不是通过改变他们的用户帐户或守护进程来执行备份。下面的命令可以在归档时保留文件属性 +如果你正在从用户的主目录创建备份,你需要要存储的个人文件与原始权限和所有权,而不是通过改变它们的用户帐户或守护进程来执行备份。下面的命令可以在归档时保留文件属性。 # tar cJf ApacheLogs-$(date +%Y%m%d).tar.xz /var/log/httpd/* --same-permissions --same-owner ### 创建软连接和硬链接 ### -在Linux中,有2种类型的链接文件:硬链接和软(也称为符号)链接。因为硬链接文件代表另一个名称是由同一点确定,然后链接到实际的数据;符号链接指向的文件名,而不是实际的数据 +在Linux中,有2种类型的链接文件:硬链接和软(也称为符号)链接。因为硬链接文件只是现存文件的另一个名字,使用相同的 inode 号,它指向实际的数据;而符号链接只是指向的文件名。 -此外,硬链接不占用磁盘上的空间,而符号链接做占用少量的空间来存储的链接本身的文本。硬链接的缺点就是要求他们必须在同一个innode内。而符号链接没有这个限制,符号链接因为只保存了文件名和目录名,所以可以跨文件系统. +此外,硬链接不占用磁盘上的空间,而符号链接则占用少量的空间来存储的链接本身的文本。硬链接的缺点就是要求它们必须在同一个文件系统内,因为 inode 在一个文件系统内是唯一的。而符号链接没有这个限制,它们通过文件名而不是 inode 指向其它文件或目录,所以可以跨文件系统。 创建链接的基本语法看起来是相似的: # ln TARGET LINK_NAME #从Link_NAME到Target的硬链接 # ln -s TARGET LINK_NAME #从Link_NAME到Target的软链接 -#### 例7:创建硬链接和软链接 #### +**例7:创建硬链接和软链接** -没有更好的方式来形象的说明一个文件和一个指向它的符号链接的关系,而不是创建这些链接。在下面的截图中你会看到文件的硬链接指向它共享相同的节点都是由466个字节的磁盘使用情况确定。 +没有更好的方式来形象的说明一个文件和一个指向它的硬链接或符号链接的关系,而不是创建这些链接。在下面的截图中你会看到文件和指向它的硬链接共享相同的inode,都是使用了相同的466个字节的磁盘。 -另一方面,在别的磁盘创建一个硬链接将占用5个字节,并不是说你将耗尽存储容量,而是这个例子足以说明一个硬链接和软链接之间的区别。 +另一方面,在别的磁盘创建一个硬链接将占用5个字节,这并不是说你将耗尽存储容量,而是这个例子足以说明一个硬链接和软链接之间的区别。 ![Difference between a hard link and a soft link](http://www.tecmint.com/wp-content/uploads/2015/03/hard-soft-link.png) -软连接和硬链接之间的不同 +*软连接和硬链接之间的不同* -符号链接的典型用法是在Linux系统的版本文件参考。假设有需要一个访问文件foo X.Y 想图书馆一样经常被访问,你想更新一个就可以而不是更新所有的foo X.Y,这时使用软连接更为明智和安全。有文件被看成foo X.Y的链接符号,从而找到foo X.Y +在Linux系统上符号链接的典型用法是指向一个带版本的文件。假设有几个程序需要访问文件fooX.Y,但麻烦是版本经常变化(像图书馆一样)。每次版本更新时我们都需要更新指向 fooX.Y 的单一引用,而更安全、更快捷的方式是,我们可以让程序寻找名为 foo 的符号链接,它实际上指向 fooX.Y。 -这样的话,当你的X和Y发生变化后,你只需更新一个文件,而不是更新每个文件。 +这样的话,当你的X和Y发生变化后,你只需更新符号链接 foo 到新的目标文件,而不用跟踪每个对目标文件的使用并更新。 ### 总结 ### -在这篇文章中,我们回顾了一些基本的文件和目录管理技能,这是每个系统管理员的工具集的一部分。请确保阅读了本系列的其他部分,以及复习并将这些主题与本教程所涵盖的内容相结合。 +在这篇文章中,我们回顾了一些基本的文件和目录管理技能,这是每个系统管理员的工具集的一部分。请确保阅读了本系列的其它部分,并将这些主题与本教程所涵盖的内容相结合。 如果你有任何问题或意见,请随时告诉我们。我们总是很高兴从读者那获取反馈. @@ -315,11 +302,11 @@ via: http://www.tecmint.com/file-and-directory-management-in-linux/ 作者:[Gabriel Cánepa][a] 译者:[xiqingongzi](https://github.com/xiqingongzi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/gacanepa/ -[1]:http://www.tecmint.com/8-pratical-examples-of-linux-touch-command/ +[1]:https://linux.cn/article-2740-1.html [2]:http://www.tecmint.com/13-basic-cat-command-examples-in-linux/ [3]:http://www.tecmint.com/18-tar-command-examples-in-linux/ From eb242db8397aee293edf7c2ae2251a2fcd9c6782 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Sun, 6 Sep 2015 10:51:55 +0800 Subject: [PATCH 02/31] =?UTF-8?q?20150906-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...og Files With Logrotate On Ubuntu 12.10.md | 116 ++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 sources/tech/20150906 How To Manage Log Files With Logrotate On Ubuntu 12.10.md diff --git a/sources/tech/20150906 How To Manage Log Files With Logrotate On Ubuntu 12.10.md b/sources/tech/20150906 How To Manage Log Files With Logrotate On Ubuntu 12.10.md new file mode 100644 index 0000000000..2968dc113e --- /dev/null +++ b/sources/tech/20150906 How To Manage Log Files With Logrotate On Ubuntu 12.10.md @@ -0,0 +1,116 @@ +How To Manage Log Files With Logrotate On Ubuntu 12.10 +================================================================================ +#### About Logrotate #### + +Logrotate is a utility/tool that manages activities like automatic rotation, removal and compression of log files in a system. This is an excellent tool to manage your logs conserve precious disk space. By having a simple yet powerful configuration file, different parameters of logrotation can be controlled. This gives complete control over the way logs can be automatically managed and need not necessitate manual intervention. + +### Prerequisites ### + +As a prerequisite, we are assuming that you have gone through the article on how to set up your droplet or VPS. If not, you can find the article [here][1]. This tutorial requires you to have a VPS up and running and have you log into it. + +#### Setup Logrotate #### + +### Step 1—Update System and System Packages ### + +Run the following command to update the package lists from apt-get and get the information on the newest versions of packages and their dependencies. + + sudo apt-get update + +### Step 2—Install Logrotate ### + +If logrotate is not already on your VPS, install it now through apt-get. + + sudo apt-get install logrotate + +### Step 3 — Confirmation ### + +To verify that logrotate was successfully installed, run this in the command prompt. + + logrotate + +Since the logrotate utility is based on configuration files, the above command will not rotate any files and will show you a brief overview of the usage and the switch options available. + +### Step 4—Configure Logrotate ### + +Configurations and default options for the logrotate utility are present in: + + /etc/logrotate.conf + +Some of the important configuration settings are : rotation-interval, log-file-size, rotation-count and compression. + +Application-specific log file information (to override the defaults) are kept at: + + /etc/logrotate.d/ + +We will have a look at a few examples to understand the concept better. + +### Step 5—Example ### + +An example application configuration setting would be the dpkg (Debian package management system), that is stored in /etc/logrotate.d/dpkg. One of the entries in this file would be: + + /var/log/dpkg.log { + monthly + rotate 12 + compress + delaycompress + missingok + notifempty + create 644 root root + } + +What this means is that: + +- the logrotation for dpkg monitors the /var/log/dpkg.log file and does this on a monthly basis this is the rotation interval. +- 'rotate 12' signifies that 12 days worth of logs would be kept. +- logfiles can be compressed using the gzip format by specifying 'compress' and 'delaycompress' delays the compression process till the next log rotation. 'delaycompress' will work only if 'compress' option is specified. +- 'missingok' avoids halting on any error and carries on with the next log file. +- 'notifempty' avoid log rotation if the logfile is empty. +- 'create ' creates a new empty file with the specified properties after log-rotation. + +Though missing in the above example, 'size' is also an important setting if you want to control the sizing of the logs growing in the system. + +A configuration setting of around 100MB would look like: + + size 100M + +Note that If both size and rotation interval are set, then size is taken as a higher priority. That is, if a configuration file has the following settings: + + monthly + size 100M + +then the logs are rotated once the file size reaches 100M and this need not wait for the monthly cycle. + +### Step 6—Cron Job ### + +You can also set the logrotation as a cron so that the manual process can be avoided and this is taken care of automatically. By specifying an entry in /etc/cron.daily/logrotate , the rotation is triggered daily. + +### Step 7—Status Check and Verification ### + +To verify if a particular log is indeed rotating or not and to check the last date and time of its rotation, check the /var/lib/logrotate/status file. This is a neatly formatted file that contains the log file name and the date on which it was last rotated. + + cat /var/lib/logrotate/status + +A few entries from this file, for example: + + "/var/log/lpr.log" 2013-4-11 + "/var/log/dpkg.log" 2013-4-11 + "/var/log/pm-suspend.log" 2013-4-11 + "/var/log/syslog" 2013-4-11 + "/var/log/mail.info" 2013-4-11 + "/var/log/daemon.log" 2013-4-11 + "/var/log/apport.log" 2013-4-11 + +Congratulations! You have logrotate installed in your system. Now, change the configuration settings as per your requirements. + +Try 'man logrotate' or 'logrotate -?' for more details. + +-------------------------------------------------------------------------------- + +via: https://www.digitalocean.com/community/tutorials/how-to-manage-log-files-with-logrotate-on-ubuntu-12-10 + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://www.digitalocean.com/community/articles/initial-server-setup-with-ubuntu-12-04 \ No newline at end of file From 0985333bb0b25055c9b88e9134e90c0ff68f5a31 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Sun, 6 Sep 2015 10:54:07 +0800 Subject: [PATCH 03/31] =?UTF-8?q?20150906-2=20=E9=80=89=E9=A2=98=20struggl?= =?UTF-8?q?ing=20=E6=8E=A8=E8=8D=90=E5=B9=B6=E8=AE=A4=E9=A2=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...lling NGINX and NGINX Plus With Ansible.md | 450 ++++++++++++++++++ 1 file changed, 450 insertions(+) create mode 100644 sources/tech/20150906 Installing NGINX and NGINX Plus With Ansible.md diff --git a/sources/tech/20150906 Installing NGINX and NGINX Plus With Ansible.md b/sources/tech/20150906 Installing NGINX and NGINX Plus With Ansible.md new file mode 100644 index 0000000000..42ebe26e1b --- /dev/null +++ b/sources/tech/20150906 Installing NGINX and NGINX Plus With Ansible.md @@ -0,0 +1,450 @@ +Installing NGINX and NGINX Plus With Ansible +================================================================================ +Coming from a production operations background, I have learned to love all things related to automation. Why do something by hand if a computer can do it for you? But creating and implementing automation can be a difficult task given an ever-changing infrastructure and the various technologies surrounding your environments. This is why I love [Ansible][1]. Ansible is an open source tool for IT configuration management, deployment, and orchestration that is extremely easy to use. + +One of my favorite features of Ansible is that it is completely clientless. To manage a system, a connection is made over SSH, using either [Paramiko][2] (a Python library) or native [OpenSSH][3]. Another attractive feature of Ansible is its extensive selection of modules. These modules can be used to perform some of the common tasks of a system administrator. In particular, they make Ansible a powerful tool for installing and configuring any application across multiple servers, environments, and operating systems, all from one central location. + +In this tutorial I will walk you through the steps for using Ansible to install and deploy the open source [NGINX][4] software and [NGINX Plus][5], our commercial product. I’m showing deployment onto a [CentOS][6] server, but I have included details about deploying on Ubuntu servers in [Creating an Ansible Playbook for Installing NGINX and NGINX Plus on Ubuntu][7] below. + +For this tutorial I will be using Ansible version 1.9.2 and performing the deployment from a server running CentOS 7.1. + + $ ansible --version + ansible 1.9.2 + + $ cat /etc/redhat-release + CentOS Linux release 7.1.1503 (Core) + +If you don’t already have Ansible, you can get instructions for installing it [at the Ansible site][8]. + +If you are using CentOS, installing Ansible is easy as typing the following command. If you want to compile from source or for other distributions, see the instructions at the Ansible link provided just above. + + $ sudo yum install -y epel-release && sudo yum install -y ansible + +Depending on your environment, some of the commands in this tutorial might require sudo privileges. The path to the files, usernames, and destination servers are all values that will be specific to your environment. + +### Creating an Ansible Playbook for Installing NGINX (CentOS) ### + +First we create a working directory for our NGINX deployment, along with subdirectories and deployment configuration files. I usually recommend creating the directory in your home directory and show that in all examples in this tutorial. + + $ cd $HOME + $ mkdir -p ansible-nginx/tasks/ + $ touch ansible-nginx/deploy.yml + $ touch ansible-nginx/tasks/install_nginx.yml + +The directory structure now looks like this. You can check by using the tree command. + + $ tree $HOME/ansible-nginx/ + /home/kjones/ansible-nginx/ + ├── deploy.yml + └── tasks + └── install_nginx.yml + + 1 directory, 2 files + +If you do not have tree installed, you can do so using the following command. + + $ sudo yum install -y tree + +#### Creating the Main Deployment File #### + +Next we open **deploy.yml** in a text editor. I prefer vim for editing configuration files on the command line, and will use it throughout the tutorial. + + $ vim $HOME/ansible-nginx/deploy.yml + +The **deploy.yml** file is our main Ansible deployment file, which we’ll reference when we run the ansible‑playbook command in [Running Ansible to Deploy NGINX][9]. Within this file we specify the inventory for Ansible to use along with any other configuration files to include at runtime. + +In my example I use the [include][10] module to specify a configuration file that has the steps for installing NGINX. While it is possible to create a playbook in one very large file, I recommend that you separate the steps into smaller included files to keep things organized. Sample use cases for an include are copying static content, copying configuration files, or assigning variables for a more advanced deployment with configuration logic. + +Type the following lines into the file. I include the filename at the top in a comment for reference. + + # ./ansible-nginx/deploy.yml + + - hosts: nginx + tasks: + - include: 'tasks/install_nginx.yml' + +The hosts statement tells Ansible to deploy to all servers in the **nginx** group, which is defined in **/etc/ansible/hosts**. We’ll edit this file in [Creating the List of NGINX Servers below][11]. + +The include statement tells Ansible to read in and execute the contents of the **install_nginx.yml** file from the **tasks** directory during deployment. The file includes the steps for downloading, installing, and starting NGINX. We’ll create this file in the next section. + +#### Creating the Deployment File for NGINX #### + +Now let’s save our work to **deploy.yml** and open up **install_nginx.yml** in the editor. + + $ vim $HOME/ansible-nginx/tasks/install_nginx.yml + +The file is going to contain the instructions – written in [YAML][12] format – for Ansible to follow when installing and configuring our NGINX deployment. Each section (step in the process) starts with a name statement (preceded by hyphen) that describes the step. The string following name: is written to stdout during the Ansible deployment and can be changed as you wish. The next line of a section in the YAML file is the module that will be used during that deployment step. In the configuration below, both the [yum][13] and [service][14] modules are used. The yum module is used to install packages on CentOS. The service module is used to manage UNIX services. The final line or lines in a section specify any parameters for the module (in the example, these lines start with name and state). + +Type the following lines into the file. As with **deploy.yml**, the first line in our file is a comment that names the file for reference. The first section tells Ansible to install the **.rpm** file for CentOS 7 from the NGINX repository. This directs the package manager to install the most recent stable version of NGINX directly from NGINX. Modify the pathname as necessary for your CentOS version. A list of available packages can be found on the [open source NGINX website][15]. The next two sections tell Ansible to install the latest NGINX version using the yum module and then start NGINX using the service module. + +**Note:** In the first section, the pathname to the CentOS package appears on two lines only for space reasons. Type the entire path on a single line. + + # ./ansible-nginx/tasks/install_nginx.yml + + - name: NGINX | Installing NGINX repo rpm + yum: + name: http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm + + - name: NGINX | Installing NGINX + yum: + name: nginx + state: latest + + - name: NGINX | Starting NGINX + service: + name: nginx + state: started + +#### Creating the List of NGINX Servers #### + +Now that we have our Ansible deployment configuration files all set up, we need to tell Ansible exactly which servers to deploy to. We specify this in the Ansible **hosts** file I mentioned earlier. Let’s make a backup of the existing file and create a new one just for our deployment. + + $ sudo mv /etc/ansible/hosts /etc/ansible/hosts.backup + $ sudo vim /etc/ansible/hosts + +Type (or edit) the following lines in the file to create a group called **nginx** and list the servers to install NGINX on. You can designate servers by hostname, IP address, or in an array such as **server[1-3].domain.com**. Here I designate one server by its IP address. + + # /etc/ansible/hosts + + [nginx] + 172.16.239.140 + +#### Setting Up Security #### + +We are almost all set, but before deployment we need to ensure that Ansible has authorization to access our destination server over SSH. + +The preferred and most secure method is to add the Ansible deployment server’s RSA SSH key to the destination server’s **authorized_keys** file, which gives Ansible unrestricted SSH permissions on the destination server. To learn more about this configuration, see [Securing OpenSSH][16] on wiki.centos.org. This way you can automate your deployments without user interaction. + +Alternatively, you can request the password interactively during deployment. I strongly recommend that you use this method during testing only, because it is insecure and there is no way to track changes to a destination host’s fingerprint. If you want to do this, change the value of StrictHostKeyChecking from the default yes to no in the **/etc/ssh/ssh_config** file on each of your destination hosts. Then add the --ask-pass flag on the ansible-playbook command to have Ansible prompt for the SSH password. + +Here I illustrate how to edit the **ssh_config** file to disable strict host key checking on the destination server. We manually SSH into the server to which we’ll deploy NGINX and change the value of StrictHostKeyChecking to no. + + $ ssh kjones@172.16.239.140 + kjones@172.16.239.140's password:*********** + + [kjones@nginx ]$ sudo vim /etc/ssh/ssh_config + +After you make the change, save **ssh_config**, and connect to your Ansible server via SSH. The setting should look as below before you save your work. + + # /etc/ssh/ssh_config + + StrictHostKeyChecking no + +#### Running Ansible to Deploy NGINX #### + +If you have followed the steps in this tutorial, you can run the following command to have Ansible deploy NGINX. (Again, if you have set up RSA SSH key authentication, then the --ask-pass flag is not needed.) Run the command on the Ansible server with the configuration files we created above. + + $ sudo ansible-playbook --ask-pass $HOME/ansible-nginx/deploy.yml + +Ansible prompts for the SSH password and produces output like the following. A recap that reports failed=0 like this one indicates that deployment succeeded. + + $ sudo ansible-playbook --ask-pass $HOME/ansible-nginx/deploy.yml + SSH password: + + PLAY [all] ******************************************************************** + + GATHERING FACTS *************************************************************** + ok: [172.16.239.140] + + TASK: [NGINX | Installing NGINX repo rpm] ************************************* + changed: [172.16.239.140] + + TASK: [NGINX | Installing NGINX] ********************************************** + changed: [172.16.239.140] + + TASK: [NGINX | Starting NGINX] ************************************************ + changed: [172.16.239.140] + + PLAY RECAP ******************************************************************** + 172.16.239.140 : ok=4 changed=3 unreachable=0 failed=0 + +If you didn’t get a successful play recap, you can try running the ansible-playbook command again with the -vvvv flag (verbose with connection debugging) to troubleshoot the deployment process. + +When deployment succeeds (as it did for us on the first try), you can verify that NGINX is running on the remote server by running the following basic [cURL][17] command. Here it returns 200 OK. Success! We have successfully installed NGINX using Ansible. + + $ curl -Is 172.16.239.140 | grep HTTP + HTTP/1.1 200 OK + +### Creating an Ansible Playbook for Installing NGINX Plus (CentOS) ### + +Now that I’ve shown you how to install the open source version of NGINX, I’ll walk you through the steps for installing NGINX Plus. This requires some additional changes to the deployment configuration and showcases some of Ansible’s other features. + +#### Copying the NGINX Plus Certificate and Key to the Ansible Server #### + +To install and configure NGINX Plus with Ansible, we first need to copy the key and certificate for our NGINX Plus subscription from the [NGINX Plus Customer Portal][18] to the standard location on the Ansible deployment server. + +Access to the NGINX Plus Customer Portal is available for customers who have purchased NGINX Plus or are evaluating it. If you are interested in evaluating NGINX Plus, you can request a 30-day free trial [here][19]. You will receive a link to your trial certificate and key shortly after you sign up. + +On a Mac or Linux host, use the [scp][20] utility as I show here. On a Microsoft Windows host, you can use [WinSCP][21]. For this tutorial, I downloaded the files to my Mac laptop, then used scp to copy them to the Ansible server. These commands place both the key and certificate in my home directory. + + $ cd /path/to/nginx-repo-files/ + $ scp nginx-repo.* user@destination-server:. + +Next we SSH to the Ansible server, make sure the SSL directory for NGINX Plus exists, and move the files there. + + $ ssh user@destination-server + $ sudo mkdir -p /etc/ssl/nginx/ + $ sudo mv nginx-repo.* /etc/ssl/nginx/ + +Verify that your **/etc/ssl/nginx** directory contains both the certificate (**.crt**) and key (**.key**) files. You can check by using the tree command. + + $ tree /etc/ssl/nginx + /etc/ssl/nginx + ├── nginx-repo.crt + └── nginx-repo.key + + 0 directories, 2 files + +If you do not have tree installed, you can do so using the following command. + + $ sudo yum install -y tree + +#### Creating the Ansible Directory Structure #### + +The remaining steps are very similar to the ones for open source NGINX that we performed in [Creating an Ansible Playbook for Installing NGINX (CentOS)][22]. First we set up a working directory for our NGINX Plus deployment. Again I prefer creating it as a subdirectory of my home directory. + + $ cd $HOME + $ mkdir -p ansible-nginx-plus/tasks/ + $ touch ansible-nginx-plus/deploy.yml + $ touch ansible-nginx-plus/tasks/install_nginx_plus.yml + +The directory structure now looks like this. + + $ tree $HOME/ansible-nginx-plus/ + /home/kjones/ansible-nginx-plus/ + ├── deploy.yml + └── tasks + └── install_nginx_plus.yml + + 1 directory, 2 files + +#### Creating the Main Deployment File #### + +Next we use vim to create the **deploy.yml** file as for open source NGINX. + + $ vim ansible-nginx-plus/deploy.yml + +The only difference from the open source NGINX deployment is that we change the name of the included file to **install_nginx_plus.yml**. As a reminder, the file tells Ansible to deploy NGINX Plus on all servers in the **nginx** group (which is defined in **/etc/ansible/hosts**), and to read in and execute the contents of the **install_nginx_plus.yml** file from the **tasks** directory during deployment. + + # ./ansible-nginx-plus/deploy.yml + + - hosts: nginx + tasks: + - include: 'tasks/install_nginx_plus.yml' + +If you have not done so already, you also need to create the hosts file as detailed in [Creating the List of NGINX Servers][23] above. + +#### Creating the Deployment File for NGINX Plus #### + +Open **install_nginx_plus.yml** in a text editor. The file is going to contain the instructions for Ansible to follow when installing and configuring your NGINX Plus deployment. The commands and modules are specific to CentOS and some are unique to NGINX Plus. + + $ vim ansible-nginx-plus/tasks/install_nginx_plus.yml + +The first section uses the [file][24] module, telling Ansible to create the SSL directory for NGINX Plus as specified by the path and state arguments, set the ownership to root, and change the mode to 0700. + + # ./ansible-nginx-plus/tasks/install_nginx_plus.yml + + - name: NGINX Plus | Creating NGINX Plus ssl cert repo directory + file: path=/etc/ssl/nginx state=directory group=root mode=0700 + +The next two sections use the [copy][25] module to copy the NGINX Plus certificate and key from the Ansible deployment server to the NGINX Plus server during the deployment, again setting ownership to root and the mode to 0700. + + - name: NGINX Plus | Copying NGINX Plus repository certificate + copy: src=/etc/ssl/nginx/nginx-repo.crt dest=/etc/ssl/nginx/nginx-repo.crt owner=root group=root mode=0700 + + - name: NGINX Plus | Copying NGINX Plus repository key + copy: src=/etc/ssl/nginx/nginx-repo.key dest=/etc/ssl/nginx/nginx-repo.key owner=root group=root mode=0700 + +Next we tell Ansible to use the [get_url][26] module to download the CA certificate from the NGINX Plus repository at the remote location specified by the url argument, put it in the directory specified by the dest argument, and set the mode to 0700. + + - name: NGINX Plus | Downloading NGINX Plus CA certificate + get_url: url=https://cs.nginx.com/static/files/CA.crt dest=/etc/ssl/nginx/CA.crt mode=0700 + +Similarly, we tell Ansible to download the NGINX Plus repo file using the get_url module and copy it to the **/etc/yum.repos.d** directory on the NGINX Plus server. + + - name: NGINX Plus | Downloading yum NGINX Plus repository + get_url: url=https://cs.nginx.com/static/files/nginx-plus-7.repo dest=/etc/yum.repos.d/nginx-plus-7.repo mode=0700 + +The final two name sections tell Ansible to install and start NGINX Plus using the yum and service modules. + + - name: NGINX Plus | Installing NGINX Plus + yum: + name: nginx-plus + state: latest + + - name: NGINX Plus | Starting NGINX Plus + service: + name: nginx + state: started + +#### Running Ansible to Deploy NGINX Plus #### + +After saving the **install_nginx_plus.yml** file, we run the ansible-playbook command to deploy NGINX Plus. Again here we include the --ask-pass flag to have Ansible prompt for the SSH password and pass it to each NGINX Plus server, and specify the path to the main Ansible **deploy.yml** file. + + $ sudo ansible-playbook --ask-pass $HOME/ansible-nginx-plus/deploy.yml + + PLAY [nginx] ****************************************************************** + + GATHERING FACTS *************************************************************** + ok: [172.16.239.140] + + TASK: [NGINX Plus | Creating NGINX Plus ssl cert repo directory] ************** + changed: [172.16.239.140] + + TASK: [NGINX Plus | Copying NGINX Plus repository certificate] **************** + changed: [172.16.239.140] + + TASK: [NGINX Plus | Copying NGINX Plus repository key] ************************ + changed: [172.16.239.140] + + TASK: [NGINX Plus | Downloading NGINX Plus CA certificate] ******************** + changed: [172.16.239.140] + + TASK: [NGINX Plus | Downloading yum NGINX Plus repository] ******************** + changed: [172.16.239.140] + + TASK: [NGINX Plus | Installing NGINX Plus] ************************************ + changed: [172.16.239.140] + + TASK: [NGINX Plus | Starting NGINX Plus] ************************************** + changed: [172.16.239.140] + + PLAY RECAP ******************************************************************** + 172.16.239.140 : ok=8 changed=7 unreachable=0 failed=0 + +The playbook recap was successful. Now we can run a quick curl command to verify that NGINX Plus is running. Great, we get 200 OK! Success! We have successfully installed NGINX Plus with Ansible. + + $ curl -Is http://172.16.239.140 | grep HTTP + HTTP/1.1 200 OK + +### Creating an Ansible Playbook for Installing NGINX and NGINX Plus on Ubuntu ### + +The process for deploying NGINX and NGINX Plus on [Ubuntu servers][27] is pretty similar to the process on CentOS, so instead of providing step-by-step instructions I’ll show the complete deployment files and and point out the slight differences from CentOS. + +First create the Ansible directory structure and the main Ansible deployment file, as for CentOS. Also create the **/etc/ansible/hosts** file as described in [Creating the List of NGINX Servers][28]. For NGINX Plus, you need to copy over the key and certificate as described in [Copying the NGINX Plus Certificate and Key to the Ansible Server][29]. + +Here’s the **install_nginx.yml** deployment file for open source NGINX. In the first section, we use the [apt_key][30] module to import the NGINX signing key. The next two sections use the [lineinfile][31] module to add the package URLs for Ubuntu 14.04 to the **sources.list** file. Lastly we use the [apt][32] module to update the cache and install NGINX (apt replaces the yum module we used for deploying to CentOS). + + # ./ansible-nginx/tasks/install_nginx.yml + + - name: NGINX | Adding NGINX signing key + apt_key: url=http://nginx.org/keys/nginx_signing.key state=present + + - name: NGINX | Adding sources.list deb url for NGINX + lineinfile: dest=/etc/apt/sources.list line="deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx" + + - name: NGINX Plus | Adding sources.list deb-src url for NGINX + lineinfile: dest=/etc/apt/sources.list line="deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx" + + - name: NGINX | Updating apt cache + apt: + update_cache: yes + + - name: NGINX | Installing NGINX + apt: + pkg: nginx + state: latest + + - name: NGINX | Starting NGINX + service: + name: nginx + state: started + +Here’s the **install_nginx.yml** deployment file for NGINX Plus. The first four sections set up the NGINX Plus key and certificate. Then we use the apt_key module to import the signing key as for open source NGINX, and the get_url module to download the apt configuration file for NGINX Plus. The [shell][33] module evokes a printf command that writes its output to the **nginx-plus.list** file in the **sources.list.d** directory. The final name modules are the same as for open source NGINX. + + # ./ansible-nginx-plus/tasks/install_nginx_plus.yml + + - name: NGINX Plus | Creating NGINX Plus ssl cert repo directory + file: path=/etc/ssl/nginx state=directory group=root mode=0700 + + - name: NGINX Plus | Copying NGINX Plus repository certificate + copy: src=/etc/ssl/nginx/nginx-repo.crt dest=/etc/ssl/nginx/nginx-repo.crt owner=root group=root mode=0700 + + - name: NGINX Plus | Copying NGINX Plus repository key + copy: src=/etc/ssl/nginx/nginx-repo.key dest=/etc/ssl/nginx/nginx-repo.key owner=root group=root mode=0700 + + - name: NGINX Plus | Downloading NGINX Plus CA certificate + get_url: url=https://cs.nginx.com/static/files/CA.crt dest=/etc/ssl/nginx/CA.crt mode=0700 + + - name: NGINX Plus | Adding NGINX Plus signing key + apt_key: url=http://nginx.org/keys/nginx_signing.key state=present + + - name: NGINX Plus | Downloading Apt-Get NGINX Plus repository + get_url: url=https://cs.nginx.com/static/files/90nginx dest=/etc/apt/apt.conf.d/90nginx mode=0700 + + - name: NGINX Plus | Adding sources.list url for NGINX Plus + shell: printf "deb https://plus-pkgs.nginx.com/ubuntu `lsb_release -cs` nginx-plus\n" >/etc/apt/sources.list.d/nginx-plus.list + + - name: NGINX Plus | Running apt-get update + apt: + update_cache: yes + + - name: NGINX Plus | Installing NGINX Plus via apt-get + apt: + pkg: nginx-plus + state: latest + + - name: NGINX Plus | Start NGINX Plus + service: + name: nginx + state: started + +We’re now ready to run the ansible-playbook command: + + $ sudo ansible-playbook --ask-pass $HOME/ansible-nginx-plus/deploy.yml + +You should get a successful play recap. If you did not get a success, you can use the verbose flag to help troubleshoot your deployment as described in [Running Ansible to Deploy NGINX][34]. + +### Summary ### + +What I demonstrated in this tutorial is just the beginning of what Ansible can do to help automate your NGINX or NGINX Plus deployment. There are many useful modules ranging from user account management to custom configuration templates. If you are interested in learning more about these, please visit the extensive [Ansible documentation][35 site. + +To learn more about Ansible, come hear my talk on deploying NGINX Plus with Ansible at [NGINX.conf 2015][36], September 22–24 in San Francisco. + +-------------------------------------------------------------------------------- + +via: https://www.nginx.com/blog/installing-nginx-nginx-plus-ansible/ + +作者:[Kevin Jones][a] +译者:[struggling](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.nginx.com/blog/author/kjones/ +[1]:http://www.ansible.com/ +[2]:http://www.paramiko.org/ +[3]:http://www.openssh.com/ +[4]:http://nginx.org/en/ +[5]:https://www.nginx.com/products/ +[6]:http://www.centos.org/ +[7]:https://www.nginx.com/blog/installing-nginx-nginx-plus-ansible/#ubuntu +[8]:http://docs.ansible.com/ansible/intro_installation.html#installing-the-control-machine +[9]:https://www.nginx.com/blog/installing-nginx-nginx-plus-ansible/#deploy-nginx +[10]:http://docs.ansible.com/ansible/playbooks_roles.html#task-include-files-and-encouraging-reuse +[11]:https://www.nginx.com/blog/installing-nginx-nginx-plus-ansible/#list-nginx +[12]:http://docs.ansible.com/ansible/YAMLSyntax.html +[13]:http://docs.ansible.com/ansible/yum_module.html +[14]:http://docs.ansible.com/ansible/service_module.html +[15]:http://nginx.org/en/linux_packages.html +[16]:http://wiki.centos.org/HowTos/Network/SecuringSSH +[17]:http://curl.haxx.se/ +[18]:https://cs.nginx.com/ +[19]:https://www.nginx.com/#free-trial +[20]:http://linux.die.net/man/1/scp +[21]:https://winscp.net/eng/download.php +[22]:https://www.nginx.com/blog/installing-nginx-nginx-plus-ansible/#playbook-nginx +[23]:https://www.nginx.com/blog/installing-nginx-nginx-plus-ansible/#list-nginx +[24]:http://docs.ansible.com/ansible/file_module.html +[25]:http://docs.ansible.com/ansible/copy_module.html +[26]:http://docs.ansible.com/ansible/get_url_module.html +[27]:http://www.ubuntu.com/ +[28]:https://www.nginx.com/blog/installing-nginx-nginx-plus-ansible/#list-nginx +[29]:https://www.nginx.com/blog/installing-nginx-nginx-plus-ansible/#copy-cert-key +[30]:http://docs.ansible.com/ansible/apt_key_module.html +[31]:http://docs.ansible.com/ansible/lineinfile_module.html +[32]:http://docs.ansible.com/ansible/apt_module.html +[33]:http://docs.ansible.com/ansible/shell_module.html +[34]:https://www.nginx.com/blog/installing-nginx-nginx-plus-ansible/#deploy-nginx +[35]:http://docs.ansible.com/ +[36]:https://www.nginx.com/nginxconf/ \ No newline at end of file From f06d5858a4d431cfcf1f2dcdb4e6f317e57ee525 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sun, 6 Sep 2015 12:45:46 +0800 Subject: [PATCH 04/31] Update 20150906 Installing NGINX and NGINX Plus With Ansible.md --- .../20150906 Installing NGINX and NGINX Plus With Ansible.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sources/tech/20150906 Installing NGINX and NGINX Plus With Ansible.md b/sources/tech/20150906 Installing NGINX and NGINX Plus With Ansible.md index 42ebe26e1b..3fa66fe6b1 100644 --- a/sources/tech/20150906 Installing NGINX and NGINX Plus With Ansible.md +++ b/sources/tech/20150906 Installing NGINX and NGINX Plus With Ansible.md @@ -1,4 +1,5 @@ -Installing NGINX and NGINX Plus With Ansible +translation by strugglingyouth +nstalling NGINX and NGINX Plus With Ansible ================================================================================ Coming from a production operations background, I have learned to love all things related to automation. Why do something by hand if a computer can do it for you? But creating and implementing automation can be a difficult task given an ever-changing infrastructure and the various technologies surrounding your environments. This is why I love [Ansible][1]. Ansible is an open source tool for IT configuration management, deployment, and orchestration that is extremely easy to use. @@ -447,4 +448,4 @@ via: https://www.nginx.com/blog/installing-nginx-nginx-plus-ansible/ [33]:http://docs.ansible.com/ansible/shell_module.html [34]:https://www.nginx.com/blog/installing-nginx-nginx-plus-ansible/#deploy-nginx [35]:http://docs.ansible.com/ -[36]:https://www.nginx.com/nginxconf/ \ No newline at end of file +[36]:https://www.nginx.com/nginxconf/ From c3481798efafdc0ae4fd0667c1effe79d2d89764 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Sun, 6 Sep 2015 15:05:37 +0800 Subject: [PATCH 05/31] =?UTF-8?q?20150906-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...h In Ubuntu And elementary OS With NaSC.md | 53 +++++ ... How To Set Up Your FTP Server In Linux.md | 102 +++++++++ ...ata intrusion detection system on Linux.md | 197 ++++++++++++++++++ 3 files changed, 352 insertions(+) create mode 100644 sources/tech/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md create mode 100644 sources/tech/20150906 How To Set Up Your FTP Server In Linux.md create mode 100644 sources/tech/20150906 How to install Suricata intrusion detection system on Linux.md diff --git a/sources/tech/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md b/sources/tech/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md new file mode 100644 index 0000000000..67601c8ce6 --- /dev/null +++ b/sources/tech/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md @@ -0,0 +1,53 @@ +Do Simple Math In Ubuntu And elementary OS With NaSC +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Make-Math-Simpler-with-NaSC.jpg) + +[NaSC][1], abbreviation Not a Soulver Clone, is a third party app developed for elementary OS. Whatever the name suggests, NaSC is heavily inspired by [Soulver][2], an OS X app for doing maths like a normal person. + +elementary OS itself draws from OS X and it is not a surprise that a number of the third party apps it has got, are also inspired by OS X apps. + +Coming back to NaSC, what exactly it means by “maths like a normal person “? Well, it means to write like how you think in your mind. As per the description of the app: + +> “Its an app where you do maths like a normal person. It lets you type whatever you want and smartly figures out what is math and spits out an answer on the right pane. Then you can plug those answers in to future equations and if that answer changes, so does the equations its used in.” + +Still not convinced? Here, take a look at this screenshot. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/NaSC.png) + +Now, you see what is ‘math for normal person’? Honestly, I am not a fan of such apps but it might be useful for some of you perhaps. Let’s see how can you install NaSC in elementary OS, Ubuntu and Linux Mint. + +### Install NaSC in Ubuntu, elementary OS and Mint ### + +There is a PPA available for installing NaSC. The PPA says ‘daily’ which could mean daily build (i.e. unstable) but in my quick test, it worked just fine. + +Open a terminal and use the following commands: + + sudo apt-add-repository ppa:nasc-team/daily + sudo apt-get update + sudo apt-get install nasc + +Here is a screenshot of NaSC in Ubuntu 15.04: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/NaSC-Ubuntu.png) + +If you want to remove it, you can use the following commands: + + sudo apt-get remove nasc + sudo apt-add-repository --remove ppa:nasc-team/daily + +If you try it, do share your experience with it. In addition to this, you can also try [Vocal podcast app for Linux][3] from third party elementary OS apps. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/math-ubuntu-nasc/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://parnold-x.github.io/nasc/ +[2]:http://www.acqualia.com/soulver/ +[3]:http://itsfoss.com/podcast-app-vocal-linux/ \ No newline at end of file diff --git a/sources/tech/20150906 How To Set Up Your FTP Server In Linux.md b/sources/tech/20150906 How To Set Up Your FTP Server In Linux.md new file mode 100644 index 0000000000..a3e2096359 --- /dev/null +++ b/sources/tech/20150906 How To Set Up Your FTP Server In Linux.md @@ -0,0 +1,102 @@ +How To Set Up Your FTP Server In Linux +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Setup-FTP-Server-in-Linux.jpg) + +In this lesson, I will explain to you how to Set up your FTP server. But first, let me quickly tell you what is FTP. + +### What is FTP? ### + +[FTP][1] is an acronym for File Transfer Protocol. As the name suggests, FTP is used to transfer files between computers on a network. You can use FTP to exchange files between computer accounts, transfer files between an account and a desktop computer, or access online software archives. Keep in mind, however, that many FTP sites are heavily used and require several attempts before connecting. + +An FTP address looks a lot like an HTTP or website address except it uses the prefix ftp:// instead of http://. + +### What is an FTP Server? ### + +Typically, a computer with an FTP address is dedicated to receive an FTP connection. A computer dedicated to receiving an FTP connection is referred to as an FTP server or FTP site. + +Now, let’s begin a special adventure. We will make FTP server to share files with friends and family. I will use [vsftpd][2] for this purpose. + +VSFTPD is an FTP server software which claims to be the most secure FTP software. In fact, the first two letters in VSFTPD, stand for “very secure”. The software was built around the vulnerabilities of the FTP protocol. + +Nevertheless, you should always remember that there are better solutions for secure transfer and management of files such as SFTP (uses [OpenSSH][3]). The FTP protocol is particularly useful for sharing non-sensitive data and is very reliable at that. + +#### Installing VSFTPD in rpm distributions: #### + +You can quickly install VSFTPD on your server through the command line interface with: + + dnf -y install vsftpd + +#### Installing VSFTPD in deb distributions: #### + +You can quickly install VSFTPD on your server through the command line interface with: + +sudo apt-get install vsftpd + +#### Installing VSFTPD in Arch distribution: #### + +You can quickly install VSFTPD on your server through the command line interface with: + + sudo pacman -S vsftpd + +#### Configuring FTP server #### + +Most VSFTPD’s configuration takes place in /etc/vsftpd.conf. The file itself is well-documented, so this section only highlights some important changes you may want to make. For all available options and basic documentation see the man pages: + + man vsftpd.conf + +Files are served by default from /srv/ftp as per the Filesystem Hierarchy Standard. + +**Enable Uploading:** + +The “write_enable” flag must be set to YES in order to allow changes to the filesystem, such as uploading: + + write_enable=YES + +**Allow Local Users to Login:** + +In order to allow users in /etc/passwd to login, the “local_enable” directive must look like this: + +local_enable=YES + +**Anonymous Login** + +The following lines control whether anonymous users can login: + + # Allow anonymous login + +anonymous_enable=YES +# No password is required for an anonymous login (Optional) +no_anon_password=YES +# Maximum transfer rate for an anonymous client in Bytes/second (Optional) +anon_max_rate=30000 +# Directory to be used for an anonymous login (Optional) +anon_root=/example/directory/ + +**Chroot Jail** + +It is possible to set up a chroot environment, which prevents the user from leaving his home directory. To enable this, add/change the following lines in the configuration file: + + chroot_list_enable=YES chroot_list_file=/etc/vsftpd.chroot_list + +The “chroot_list_file” variable specifies the file in which the jailed users are contained to. + +In the end you must restart your ftp server. Type in your command line + + sudo systemctl restart vsftpd + +That’s it. Your FTP server is up and running. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/set-ftp-server-linux/ + +作者:[alimiracle][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/ali/ +[1]:https://en.wikipedia.org/wiki/File_Transfer_Protocol +[2]:https://security.appspot.com/vsftpd.html +[3]:http://www.openssh.com/ \ No newline at end of file diff --git a/sources/tech/20150906 How to install Suricata intrusion detection system on Linux.md b/sources/tech/20150906 How to install Suricata intrusion detection system on Linux.md new file mode 100644 index 0000000000..fe4a784d5a --- /dev/null +++ b/sources/tech/20150906 How to install Suricata intrusion detection system on Linux.md @@ -0,0 +1,197 @@ +How to install Suricata intrusion detection system on Linux +================================================================================ +With incessant security threats, intrusion detection system (IDS) has become one of the most critical requirements in today's data center environments. However, as more and more servers upgrade their NICs to 10GB/40GB Ethernet, it is increasingly difficult to implement compute-intensive intrusion detection on commodity hardware at line rates. One approach to scaling IDS performance is **multi-threaded IDS**, where CPU-intensive deep packet inspection workload is parallelized into multiple concurrent tasks. Such parallelized inspection can exploit multi-core hardware to scale up IDS throughput easily. Two well-known open-source efforts in this area are [Suricata][1] and [Bro][2]. + +In this tutorial, I am going to demonstrate **how to install and configure Suricata IDS on Linux server**. + +### Install Suricata IDS on Linux ### + +Let's build Suricata from the source. You first need to install several required dependencies as follows. + +#### Install Dependencies on Debian, Ubuntu or Linux Mint #### + + $ sudo apt-get install wget build-essential libpcre3-dev libpcre3-dbg automake autoconf libtool libpcap-dev libnet1-dev libyaml-dev zlib1g-dev libcap-ng-dev libjansson-dev + +#### Install Dependencies on CentOS, Fedora or RHEL #### + + $ sudo yum install wget libpcap-devel libnet-devel pcre-devel gcc-c++ automake autoconf libtool make libyaml-devel zlib-devel file-devel jansson-devel nss-devel + +Once you install all required packages, go ahead and install Suricata as follows. + +First, download the latest Suricata source code from [http://suricata-ids.org/download/][3], and build it. As of this writing, the latest version is 2.0.8. + + $ wget http://www.openinfosecfoundation.org/download/suricata-2.0.8.tar.gz + $ tar -xvf suricata-2.0.8.tar.gz + $ cd suricata-2.0.8 + $ ./configure --sysconfdir=/etc --localstatedir=/var + +Here is the example output of configuration. + + Suricata Configuration: + AF_PACKET support: yes + PF_RING support: no + NFQueue support: no + NFLOG support: no + IPFW support: no + DAG enabled: no + Napatech enabled: no + Unix socket enabled: yes + Detection enabled: yes + + libnss support: yes + libnspr support: yes + libjansson support: yes + Prelude support: no + PCRE jit: yes + LUA support: no + libluajit: no + libgeoip: no + Non-bundled htp: no + Old barnyard2 support: no + CUDA enabled: no + +Now compile and install it. + + $ make + $ sudo make install + +Suricata source code comes with default configuration files. Let's install these default configuration files as follows. + + $ sudo make install-conf + +As you know, Suricata is useless without IDS rule sets. Conveniently, the Makefile comes with IDS rule installation option. To install IDS rules, run the following command. + + $ sudo make install-rules + +The above rule installation command will download the current snapshot of community rulesets available from [EmergingThreats.net][4], and store them under /etc/suricata/rules. + +![](https://farm1.staticflickr.com/691/20482669553_8b67632277_c.jpg) + +### Configure Suricata IDS the First Time ### + +Now it's time to configure Suricata. The configuration file is located at **/etc/suricata/suricata.yaml**. Open the file with a text editor for editing. + + $ sudo vi /etc/suricata/suricata.yaml + +Here are some basic setup for you to get started. + +The "default-log-dir" keyword should point to the location of Suricata log files. + + default-log-dir: /var/log/suricata/ + +Under "vars" section, you will find several important variables used by Suricata. "HOME_NET" should point to the local network to be inspected by Suricata. "!$HOME_NET" (assigned to EXTERNAL_NET) refers to any other networks than the local network. "XXX_PORTS" indicates the port number(s) use by different services. Note that Suricata can automatically detect HTTP traffic regardless of the port it uses. So it is not critical to specify the HTTP_PORTS variable correctly. + + vars: + HOME_NET: "[192.168.122.0/24]" + EXTERNAL_NET: "!$HOME_NET" + HTTP_PORTS: "80" + SHELLCODE_PORTS: "!80" + SSH_PORTS: 22 + +The "host-os-policy" section is used to defend against some well-known attacks which exploit the behavior of an operating system's network stack (e.g., TCP reassembly) to evade detection. As a counter measure, modern IDS came up with so-called "target-based" inspection, where inspection engine fine-tunes its detection algorithm based on a target operating system of the traffic. Thus, if you know what OS individual local hosts are running, you can feed that information to Suricata to potentially enhance its detection rate. This is when "host-os-policy" section is used. In this example, the default IDS policy is Linux; if no OS information is known for a particular IP address, Suricata will apply Linux-based inspection. When traffic for 192.168.122.0/28 and 192.168.122.155 is captured, Suricata will apply Windows-based inspection policy. + + host-os-policy: + # These are Windows machines. + windows: [192.168.122.0/28, 192.168.122.155] + bsd: [] + bsd-right: [] + old-linux: [] + # Make the default policy Linux. + linux: [0.0.0.0/0] + old-solaris: [] + solaris: ["::1"] + hpux10: [] + hpux11: [] + irix: [] + macos: [] + vista: [] + windows2k3: [] + +Under "threading" section, you can specify CPU affinity for different Suricata threads. By default, [CPU affinity][5] is disabled ("set-cpu-affinity: no"), meaning that Suricata threads will be scheduled on any available CPU cores. By default, Suricata will create one "detect" thread for each CPU core. You can adjust this behavior by specifying "detect-thread-ratio: N". This will create N*M detect threads, where M is the total number of CPU cores on the host. + + threading: + set-cpu-affinity: no + detect-thread-ratio: 1.5 + +With the above threading settings, Suricata will create 1.5*M detection threads, where M is the total number of CPU cores on the system. + +For more information about Suricata configuration, you can read the default configuration file itself, which is heavily commented for clarity. + +### Perform Intrusion Detection with Suricata ### + +Now it's time to test-run Suricata. Before launching it, there's one more step to do. + +When you are using pcap capture mode, it is highly recommended to turn off any packet offloead features (e.g., LRO/GRO) on the NIC which Suricata is listening on, as those features may interfere with live packet capture. + +Here is how to turn off LRO/GRO on the network interface eth0: + + $ sudo ethtool -K eth0 gro off lro off + +Note that depending on your NIC, you may see the following warning, which you can ignore. It simply means that your NIC does not support LRO. + + Cannot change large-receive-offload + +Suricata supports a number of running modes. A runmode determines how different threads are used for IDS. The following command lists all [available runmodes][6]. + + $ sudo /usr/local/bin/suricata --list-runmodes + +![](https://farm6.staticflickr.com/5730/20481140934_25080d04d7_c.jpg) + +The default runmode used by Suricata is autofp (which stands for "auto flow pinned load balancing"). In this mode, packets from each distinct flow are assigned to a single detect thread. Flows are assigned to threads with the lowest number of unprocessed packets. + +Finally, let's start Suricata, and see it in action. + + $ sudo /usr/local/bin/suricata -c /etc/suricata/suricata.yaml -i eth0 --init-errors-fatal + +![](https://farm1.staticflickr.com/701/21077552366_c577746e36_c.jpg) + +In this example, we are monitoring a network interface eth0 on a 8-core system. As shown above, Suricata creates 13 packet processing threads and 3 management threads. The packet processing threads consist of one PCAP packet capture thread, and 12 detect threads (equal to 8*1.5). This means that the packets captured by one capture thread are load-balanced to 12 detect threads for IDS. The management threads are one flow manager and two counter/stats related threads. + +Here is a thread-view of Suricata process (plotted by [htop][7]). + +![](https://farm6.staticflickr.com/5775/20482669593_174f8f41cb_c.jpg) + +Suricata detection logs are stored in /var/log/suricata directory. + + $ tail -f /var/log/suricata/fast.log + +---------- + + 04/01/2015-15:47:12.559075 [**] [1:2200074:1] SURICATA TCPv4 invalid checksum [**] [Classification: (null)] [Priority: 3] {TCP} 172.16.253.158:22 -> 172.16.253.1:46997 + 04/01/2015-15:49:06.565901 [**] [1:2200074:1] SURICATA TCPv4 invalid checksum [**] [Classification: (null)] [Priority: 3] {TCP} 172.16.253.158:22 -> 172.16.253.1:46317 + 04/01/2015-15:49:06.566759 [**] [1:2200074:1] SURICATA TCPv4 invalid checksum [**] [Classification: (null)] [Priority: 3] {TCP} 172.16.253.158:22 -> 172.16.253.1:46317 + +For ease of import, the log is also available in JSON format: + + $ tail -f /var/log/suricata/eve.json + +---------- + {"timestamp":"2015-04-01T15:49:06.565901","event_type":"alert","src_ip":"172.16.253.158","src_port":22,"dest_ip":"172.16.253.1","dest_port":46317,"proto":"TCP","alert":{"action":"allowed","gid":1,"signature_id":2200074,"rev":1,"signature":"SURICATA TCPv4 invalid checksum","category":"","severity":3}} + {"timestamp":"2015-04-01T15:49:06.566759","event_type":"alert","src_ip":"172.16.253.158","src_port":22,"dest_ip":"172.16.253.1","dest_port":46317,"proto":"TCP","alert":{"action":"allowed","gid":1,"signature_id":2200074,"rev":1,"signature":"SURICATA TCPv4 invalid checksum","category":"","severity":3}} + +### Conclusion ### + +In this tutorial, I demonstrated how you can set up Suricata IDS on a multi-core Linux server. Unlike single-threaded [Snort IDS][8], Suricata can easily benefit from multi-core/many-core hardware with multi-threading. There is great deal of customization in Suricata to maximize its performance and detection coverage. Suricata folks maintain [online Wiki][9] quite well, so I strongly recommend you check it out if you want to deploy Suricata in your environment. + +Are you currently using Suricata? If so, feel free to share your experience. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/install-suricata-intrusion-detection-system-linux.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://suricata-ids.org/ +[2]:https://www.bro.org/ +[3]:http://suricata-ids.org/download/ +[4]:http://rules.emergingthreats.net/ +[5]:http://xmodulo.com/run-program-process-specific-cpu-cores-linux.html +[6]:https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Runmodes +[7]:http://ask.xmodulo.com/view-threads-process-linux.html +[8]:http://xmodulo.com/how-to-compile-and-install-snort-from-source-code-on-ubuntu.html +[9]:https://redmine.openinfosecfoundation.org/projects/suricata/wiki \ No newline at end of file From e9f7ade861d0deb3043807f507f3afe306cdb76b Mon Sep 17 00:00:00 2001 From: cvsher <478990879@qq.com> Date: Sun, 6 Sep 2015 15:58:24 +0800 Subject: [PATCH 06/31] Update 20150906 How To Set Up Your FTP Server In Linux.md --- .../tech/20150906 How To Set Up Your FTP Server In Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150906 How To Set Up Your FTP Server In Linux.md b/sources/tech/20150906 How To Set Up Your FTP Server In Linux.md index a3e2096359..718539b7a1 100644 --- a/sources/tech/20150906 How To Set Up Your FTP Server In Linux.md +++ b/sources/tech/20150906 How To Set Up Your FTP Server In Linux.md @@ -1,3 +1,4 @@ +translating by cvsher How To Set Up Your FTP Server In Linux ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Setup-FTP-Server-in-Linux.jpg) @@ -99,4 +100,4 @@ via: http://itsfoss.com/set-ftp-server-linux/ [a]:http://itsfoss.com/author/ali/ [1]:https://en.wikipedia.org/wiki/File_Transfer_Protocol [2]:https://security.appspot.com/vsftpd.html -[3]:http://www.openssh.com/ \ No newline at end of file +[3]:http://www.openssh.com/ From cff69fea0e9f67f4bda119e34f9098f912d75545 Mon Sep 17 00:00:00 2001 From: cvsher <478990879@qq.com> Date: Sun, 6 Sep 2015 16:03:53 +0800 Subject: [PATCH 07/31] Update 20150906 How To Set Up Your FTP Server In Linux.md --- .../tech/20150906 How To Set Up Your FTP Server In Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150906 How To Set Up Your FTP Server In Linux.md b/sources/tech/20150906 How To Set Up Your FTP Server In Linux.md index a3e2096359..718539b7a1 100644 --- a/sources/tech/20150906 How To Set Up Your FTP Server In Linux.md +++ b/sources/tech/20150906 How To Set Up Your FTP Server In Linux.md @@ -1,3 +1,4 @@ +translating by cvsher How To Set Up Your FTP Server In Linux ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Setup-FTP-Server-in-Linux.jpg) @@ -99,4 +100,4 @@ via: http://itsfoss.com/set-ftp-server-linux/ [a]:http://itsfoss.com/author/ali/ [1]:https://en.wikipedia.org/wiki/File_Transfer_Protocol [2]:https://security.appspot.com/vsftpd.html -[3]:http://www.openssh.com/ \ No newline at end of file +[3]:http://www.openssh.com/ From 7b383ef98a19e92e61b0e50980a4179407e46d10 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Sun, 6 Sep 2015 16:26:33 +0800 Subject: [PATCH 08/31] =?UTF-8?q?20150906-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...r-friendly command line shell for Linux.md | 60 +++++ ... How to Configure OpenNMS on CentOS 7.x.md | 219 ++++++++++++++++++ ...tall DNSCrypt and Unbound in Arch Linux.md | 174 ++++++++++++++ ... to Install QGit Viewer in Ubuntu 14.04.md | 113 +++++++++ ....9.0 Winamp-like Audio Player in Ubuntu.md | 72 ++++++ ...ple in Ubuntu or Elementary OS via NaSC.md | 62 +++++ 6 files changed, 700 insertions(+) create mode 100644 sources/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md create mode 100644 sources/tech/20150906 How to Configure OpenNMS on CentOS 7.x.md create mode 100644 sources/tech/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md create mode 100644 sources/tech/20150906 How to Install QGit Viewer in Ubuntu 14.04.md create mode 100644 sources/tech/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md create mode 100644 sources/tech/20150906 Make Math Simple in Ubuntu or Elementary OS via NaSC.md diff --git a/sources/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md b/sources/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md new file mode 100644 index 0000000000..180616e2d2 --- /dev/null +++ b/sources/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md @@ -0,0 +1,60 @@ +FISH – A smart and user-friendly command line shell for Linux +================================================================================ +The friendly interactive shell (FISH). fish is a user friendly command line shell intended mostly for interactive use. A shell is a program used to execute other programs. + +### FISH Features ### + +#### Autosuggestions #### + +fish suggests commands as you type based on history and completions, just like a web browser. Watch out, Netscape Navigator 4.0! + +#### Glorious VGA Color #### + +fish natively supports term256, the state of the art in terminal technology. You'll have an astonishing 256 colors available for use! + +#### Sane Scripting #### + +fish is fully scriptable, and its syntax is simple, clean, and consistent. You'll never write esac again. + +#### Web Based configuration #### + +For those lucky few with a graphical computer, you can set your colors and view functions, variables, and history all from a web page. + +#### Man Page Completions #### + +Other shells support programmable completions, but only fish generates them automatically by parsing your installed man pages. + +#### Works Out Of The Box #### + +fish will delight you with features like tab completions and syntax highlighting that just work, with nothing new to learn or configure. + +### Install FISH On ubuntu 15.04 ### + +Open the terminal and run the following commands + + sudo apt-add-repository ppa:fish-shell/release-2 + sudo apt-get update + sudo apt-get install fish + +**Using FISH** + +Open the terminal and run the following command to start FISH + + fish + +Welcome to fish, the friendly interactive shell Type help for instructions on how to use fish + +Check [FISH Documentation][1] How to use. + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/fish-a-smart-and-user-friendly-command-line-shell-for-linux.html + +作者:[ruchi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.ubuntugeek.com/author/ubuntufix +[1]:http://fishshell.com/docs/current/index.html#introduction \ No newline at end of file diff --git a/sources/tech/20150906 How to Configure OpenNMS on CentOS 7.x.md b/sources/tech/20150906 How to Configure OpenNMS on CentOS 7.x.md new file mode 100644 index 0000000000..c7810d06ef --- /dev/null +++ b/sources/tech/20150906 How to Configure OpenNMS on CentOS 7.x.md @@ -0,0 +1,219 @@ +How to Configure OpenNMS on CentOS 7.x +================================================================================ +Systems management and monitoring services are very important that provides information to view important systems management information that allow us to to make decisions based on this information. To make sure the network is running at its best and to minimize the network downtime we need to improve application performance. So, in this article we will make you understand the step by step procedure to setup OpenNMS in your IT infrastructure. OpenNMS is a free open source enterprise level network monitoring and management platform that provides information to allow us to make decisions in regards to future network and capacity planning. + +OpenNMS designed to manage tens of thousands of devices from a single server as well as manage unlimited devices using a cluster of servers. It includes a discovery engine to automatically configure and manage network devices without operator intervention. It is written in Java and is published under the GNU General Public License. OpenNMS is known for its scalability with its main functional areas in services monitoring, data collection using SNMP and event management and notifications. + +### Installing OpenNMS RPM Repository ### + +We will start from the installation of OpenNMS RPM for our CentOs 7.1 operating system as its available for most of the RPM-based distributions through Yum at their official link http://yum.opennms.org/ . + +![OpenNMS RPM](http://blog.linoxide.com/wp-content/uploads/2015/08/18.png) + +Then open your command line interface of CentOS 7.1 and login with root credentials to run the below command with “wget” to get the required RPM. + + [root@open-nms ~]# wget http://yum.opennms.org/repofiles/opennms-repo-stable-rhel7.noarch.rpm + +![Download RPM](http://blog.linoxide.com/wp-content/uploads/2015/08/26.png) + +Now we need to install this repository so that the OpenNMS package information could be available through yum for installation. Let’s run the command below with same root level credentials to do so. + + [root@open-nms ~]# rpm -Uvh opennms-repo-stable-rhel7.noarch.rpm + +![Installing RPM](http://blog.linoxide.com/wp-content/uploads/2015/08/36.png) + +### Installing Prerequisite Packages for OpenNMS ### + +Now before we start installation of OpenNMS, let’s make sure you’ve done the following prerequisites. + +**Install JDK 7** + +Its recommended that you install the latest stable Java 7 JDK from Oracle for the best performance to integrate JDK in our YUM repository as a fallback. Let’s go to the Oracle Java 7 SE JDK download page, accept the license if you agree, choose the platform and architecture. Once it has finished downloading, execute it from the command-line and then install the resulting JDK rpm. + +Else run the below command to install using the Yum from the the available system repositories. + + [root@open-nms ~]# yum install java-1.7.0-openjdk-1.7.0.85-2.6.1.2.el7_1 + +Once you have installed the Java you can confirm its installation using below command and check its installed version. + + [root@open-nms ~]# java -version + +![Java version](http://blog.linoxide.com/wp-content/uploads/2015/08/46.png) + +**Install PostgreSQL** + +Now we will install the PostgreSQL that is a must requirement to setup the database for OpenNMS. PostgreSQL is included in all of the major YUM-based distributions. To install, simply run the below command. + + [root@open-nms ~]# yum install postgresql postgresql-server + +![Installing Postgresql](http://blog.linoxide.com/wp-content/uploads/2015/08/55.png) + +### Prepare the Database for OpenNMS ### + +Once you have installed PostgreSQL, now you'll need to make sure that PostgreSQL is up and active. Let’s run the below command to first initialize the database and then start its services. + + [root@open-nms ~]# /sbin/service postgresql initdb + [root@open-nms ~]# /sbin/service postgresql start + +![start DB](http://blog.linoxide.com/wp-content/uploads/2015/08/64.png) + +Now to confirm the status of your PostgreSQL database you can run the below command. + + [root@open-nms ~]# service postgresql status + +![PostgreSQL status](http://blog.linoxide.com/wp-content/uploads/2015/08/74.png) + +To ensure that PostgreSQL will start after a reboot, use the “systemctl”command to enable start on bootup using below command. + + [root@open-nms ~]# systemctl enable postgresql + ln -s '/usr/lib/systemd/system/postgresql.service' '/etc/systemd/system/multi-user.target.wants/postgresql.service' + +### Configure PostgreSQL ### + +Locate the Postgres “data” directory. Often this is located in /var/lib/pgsql/data directory and Open the postgresql.conf file in text editor and configure the following parameters as shown. + + [root@open-nms ~]# vim /var/lib/pgsql/data/postgresql.conf + +---------- + + #------------------------------------------------------------------------------ + # CONNECTIONS AND AUTHENTICATION + #------------------------------------------------------------------------------ + + listen_addresses = 'localhost' + max_connections = 256 + + #------------------------------------------------------------------------------ + # RESOURCE USAGE (except WAL) + #------------------------------------------------------------------------------ + + shared_buffers = 1024MB + +**User Access to the Database** + +PostgreSQL only allows you to connect if you are logged in to the local account name that matches the PostgreSQL user. Since OpenNMS runs as root, it cannot connect as a "postgres" or "opennms" user by default, so we have to change the configuration to allow user access to the database by opening the below configuration file. + + [root@open-nms ~]# vim /var/lib/pgsql/data/pg_hba.conf + +Update the configuration file as shown below and change the METHOD settings from "ident" to "trust" + +![user access to db](http://blog.linoxide.com/wp-content/uploads/2015/08/84.png) + +Write and quit the file to make saved changes and then restart PostgreSQL services. + + [root@open-nms ~]# service postgresql restart + +### Starting OpenNMS Installation ### + +Now we are ready go with installation of OpenNMS as we have almost don with its prerequisites. Using the YUM packaging system will download and install all of the required components and their dependencies, if they are not already installed on your system. +So let's riun th belwo command to start OpenNMS installation that will pull everything you need to have a working OpenNMS, including the OpenNMS core, web UI, and a set of common plugins. + + [root@open-nms ~]# yum -y install opennms + +![OpenNMS Installation](http://blog.linoxide.com/wp-content/uploads/2015/08/93.png) + +The above command will ends up with successful installation of OpenNMS and its derivative packages. + +### Configure JAVA for OpenNMS ### + +In order to integrate the default version of Java with OpenNMS we will run the below command. + + [root@open-nms ~]# /opt/opennms/bin/runjava -s + +![java integration](http://blog.linoxide.com/wp-content/uploads/2015/08/102.png) + +### Run the OpenNMS installer ### + +Now it's time to start the OpenNMS installer that will create and configure the OpenNMS database, while the same command will be used in case we want to update it to the latest version. To do so, we will run the following command. + + [root@open-nms ~]# /opt/opennms/bin/install -dis + +The above install command will take many options with following mechanism. + +-d - to update the database +-i - to insert any default data that belongs in the database +-s - to create or update the stored procedures OpenNMS uses for certain kinds of data access + + ============================================================================== + OpenNMS Installer + ============================================================================== + + Configures PostgreSQL tables, users, and other miscellaneous settings. + + DEBUG: Platform is IPv6 ready: true + - searching for libjicmp.so: + - trying to load /usr/lib64/libjicmp.so: OK + - searching for libjicmp6.so: + - trying to load /usr/lib64/libjicmp6.so: OK + - searching for libjrrd.so: + - trying to load /usr/lib64/libjrrd.so: OK + - using SQL directory... /opt/opennms/etc + - using create.sql... /opt/opennms/etc/create.sql + 17:27:51.178 [Main] INFO org.opennms.core.schema.Migrator - PL/PgSQL call handler exists + 17:27:51.180 [Main] INFO org.opennms.core.schema.Migrator - PL/PgSQL language exists + - checking if database "opennms" is unicode... ALREADY UNICODE + - Creating imports directory (/opt/opennms/etc/imports... OK + - Checking for old import files in /opt/opennms/etc... DONE + INFO 16/08/15 17:27:liquibase: Reading from databasechangelog + Installer completed successfully! + + ============================================================================== + OpenNMS Upgrader + ============================================================================== + + OpenNMS is currently stopped + Found upgrade task SnmpInterfaceRrdMigratorOnline + Found upgrade task KscReportsMigrator + Found upgrade task JettyConfigMigratorOffline + Found upgrade task DataCollectionConfigMigratorOffline + Processing RequisitionsMigratorOffline: Remove non-ip-snmp-primary and non-ip-interfaces from requisitions: NMS-5630, NMS-5571 + - Running pre-execution phase + Backing up: /opt/opennms/etc/imports + - Running post-execution phase + Removing backup /opt/opennms/etc/datacollection.zip + + Finished in 0 seconds + + Upgrade completed successfully! + +### Firewall configurations to Allow OpenNMS ### + +Here we have to allow OpenNMS management interface port 8980 through firewall or router to access the management web interface from the remote systems. So use the following commands to do so. + + [root@open-nms etc]# firewall-cmd --permanent --add-port=8980/tcp + [root@open-nms etc]# firewall-cmd --reload + +### Start OpenNMS and Login to Web Interface ### + +Let's start OpenNMS service and enable to it start at each bootup by using the below command. + + [root@open-nms ~]#systemctl start opennms + [root@open-nms ~]#systemctl enable opennms + +Once the services are up are ready to go with its web management interface. Open your web browser and access it with your server's IP address and 8980 port. + +http://servers_ip:8980/ + +Give the username and password where as the default username and password is admin/admin. + +![opennms login](http://blog.linoxide.com/wp-content/uploads/2015/08/opennms-login.png) + +After successful authentication with your provided username and password you will be directed towards the the Home page of OpenNMS where you can configure the new monitoring devices/nodes/services etc. + +![opennms home](http://blog.linoxide.com/wp-content/uploads/2015/08/opennms-home.png) + +### Conclusion ### + +Congratulations! we have successfully setup OpenNMS on CentOS 7.1. So, at the end of this tutorial, you are now able to install and configure OpenNMS with its prerequisites that included PostgreSQL and JAVA setup. So let's enjoy with the great network monitoring system with open source roots using OpenNMS that provide a bevy of features at no cost than their high-end competitors, and can scale to monitor large numbers of network nodes. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/monitoring-2/install-configure-opennms-centos-7-x/ + +作者:[Kashif Siddique][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/kashifs/ \ No newline at end of file diff --git a/sources/tech/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md b/sources/tech/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md new file mode 100644 index 0000000000..98cb0e9b55 --- /dev/null +++ b/sources/tech/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md @@ -0,0 +1,174 @@ +How to Install DNSCrypt and Unbound in Arch Linux +================================================================================ +**DNSCrypt** is a protocol that encrypt and authenticate communications between a DNS client and a DNS resolver. Prevent from DNS spoofing or man in the middle-attack. DNSCrypt are available for most operating system, including Linux, Windows, MacOSX android and iOS. And in this tutorial I'm using archlinux with kernel 4.1. + +Unbound is a DNS cache server used to resolve any DNS query received. If the user requests a new query, then unbound will store it as a cache, and when the user requests the same query for the second time, then unbound would take from the cache that have been saved. This will be faster than the first request query. + +And now I will try to install "DNSCrypt" to secure the dns communication, and make it faster with dns cache "Unbound". + +### Step 1 - Install yaourt ### + +Yaourt is one of AUR(Arch User Repository) helper that make archlinux users easy to install a program from AUR. Yaourt use same syntax as pacman, so you can install the program with yaourt. and this is easy way to install yaourt : + +1. Edit the arch repository configuration file with nano or vi, stored in a file "/etc/pacman.conf". + + $ nano /etc/pacman.conf + +2. Add at the bottom line yaourt repository, just paste script below : + + [archlinuxfr] + SigLevel = Never + Server = http://repo.archlinux.fr/$arch + +3. Save it with press "Ctrl + x" and then "Y". + +4. Now update the repository database and install yaourt with pacman command : + + $ sudo pacman -Sy yaourt + +### Step 2 - Install DNSCrypt and Unbound ### + +DNSCrypt and unbound available on archlinux repository, then you can install it with pacman command : + + $ sudo pacman -S dnscrypt-proxy unbound + +wait it and press "Y" for proceed with installation. + +### Step 3 - Install dnscrypt-autoinstall ### + +Dnscrypt-autoinstall is A script for installing and automatically configuring DNSCrypt on Linux-based systems. Dnscrypt-autoinstall available in AUR(Arch User Repository), and you must use "yaourt" command to install it : + + $ yaourt -S dnscrypt-autoinstall + +Note : + +-S = it is same as pacman -S to install a software/program. + +### Step 4 - Run dnscrypt-autoinstall ### + +run the command "dnscrypt-autoinstall" with root privileges to configure DNSCrypt automatically : + + $ sudo dnscrypt-autoinstall + +Press "Enter" for the next configuration, and then type "y" and choose the DNS provider you want to use, I'm here use DNSCrypt.eu featured with no logs and DNSSEC. + +![DNSCrypt autoinstall](http://blog.linoxide.com/wp-content/uploads/2015/08/DNSCrypt-autoinstall.png) + +### Step 5 - Configure DNSCrypt and Unbound ### + +1. Open the dnscrypt configuration file "/etc/conf.d/dnscrypt-config" and make sure the configuration of "DNSCRYPT_LOCALIP" point to **localhost IP**, and for port configuration "DNSCRYPT_LOCALPORT" it's up to you, I`m here use port **40**. + + $ nano /etc/conf.d/dnscrypt-config + + DNSCRYPT_LOCALIP=127.0.0.1 + DNSCRYPT_LOCALIP2=127.0.0.2 + DNSCRYPT_LOCALPORT=40 + +![DNSCrypt Configuration](http://blog.linoxide.com/wp-content/uploads/2015/08/DNSCryptConfiguration.png) + +Save and exit. + +2. Now you can edit unbound configuration in "/etc/unbound/". edit the file configuration with nano editor : + + $ nano /etc/unbound/unbound.conf + +3. Add the following script in the end of line : + + do-not-query-localhost: no + forward-zone: + name: "." + forward-addr: 127.0.0.1@40 + +Make sure the "**forward-addr**" port is same with "**DNSCRYPT_LOCALPORT**" configuration in DNSCrypt. You can see the I`m use port **40**. + +![Unbound Configuration](http://blog.linoxide.com/wp-content/uploads/2015/08/UnboundConfiguration.png) + +and then save and exit. + +### Step 6 - Run DNSCrypt and Unbound, then Add to startup/Boot ### + +Please run DNSCrypt and unbound with root privileges, you can run with systemctl command : + + $ sudo systemctl start dnscrypt-proxy unbound + +Add the service at the boot time/startup. You can do it by running "systemctl enable" : + + $ sudo systemctl enable dnscrypt-proxy unbound + +the command will create the symlink of the service to "/usr/lib/systemd/system/" directory. + +### Step 7 - Configure resolv.conf and restart all services ### + +Resolv.conf is a file used by linux to configure Domain Name Server(DNS) resolver. it is just plain-text created by administrator, so you must edit by root privileges and make it immutable/no one can edit it. + +Edit it with nano editor : + + $ nano /etc/resolv.conf + +and add the localhost IP "**127.0.0.1**". and now make it immutable with "chattr" command : + + $ chattr +i /etc/resolv.conf + +Note : + +If you want to edit it again, make it writable with command "chattr -i /etc/resolv.conf". + +Now yo need to restart the DNSCrypt, unbound and the network : + + $ sudo systemctl restart dnscrypt-proxy unbound netctl + +If you see the error, check your configuration file. + +### Testing ### + +1. Test DNSCrypt + +You can be sure that DNSCrypt had acted correctly by visiting https://dnsleaktest.com/, then click on "Standard Test" or "Extended Test" and wait the process running. + +And now you can see that DNSCrypt is working with DNSCrypt.eu as your DNS provider. + +![Testing DNSCrypt](http://blog.linoxide.com/wp-content/uploads/2015/08/TestingDNSCrypt.png) + +And now you can see that DNSCrypt is working with DNSCrypt.eu as your DNS provider. + +2. Test Unbound + +Now you should ensure that the unbound is working correctly with "dig" or "drill" command. + +This is the results for dig command : + + $ dig linoxide.com + +Now see in the results, the "Query time" is "533 msec" : + + ;; Query time: 533 msec + ;; SERVER: 127.0.0.1#53(127.0.0.1) + ;; WHEN: Sun Aug 30 14:48:19 WIB 2015 + ;; MSG SIZE rcvd: 188 + +and try again with the same command. And you will see the "Query time" is "0 msec". + + ;; Query time: 0 msec + ;; SERVER: 127.0.0.1#53(127.0.0.1) + ;; WHEN: Sun Aug 30 14:51:05 WIB 2015 + ;; MSG SIZE rcvd: 188 + +![Unbound Test](http://blog.linoxide.com/wp-content/uploads/2015/08/UnboundTest.png) + +And in the end DNSCrypt secure communications between the DNS clients and DNS resolver is working perfectly, and then Unbound make it faster if there is the same request in another time by taking the cache that have been saved. + +### Conclusion ### + +DNSCrypt is a protocol that can encrypt data flow between the DNS client and DNS resolver. DNSCrypt can run on various operating systems, either mobile or desktop. Choose DNS provider also includes something important, choose which provide a DNSSEC and no logs. Unbound can be used as a DNS cache, thus speeding up the resolve process resolv, because Unbound will store a request as the cache, then when a client request same query in the next time, then unbound would take from the cache that have been saved. DNSCrypt and Unbound is a powerful combination for the safety and speed. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/tools/install-dnscrypt-unbound-archlinux/ + +作者:[Arul][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arulm/ \ No newline at end of file diff --git a/sources/tech/20150906 How to Install QGit Viewer in Ubuntu 14.04.md b/sources/tech/20150906 How to Install QGit Viewer in Ubuntu 14.04.md new file mode 100644 index 0000000000..0c18bd4c99 --- /dev/null +++ b/sources/tech/20150906 How to Install QGit Viewer in Ubuntu 14.04.md @@ -0,0 +1,113 @@ +How to Install QGit Viewer in Ubuntu 14.04 +================================================================================ +QGit is a free and Open Source GUI git viewer written on Qt and C++ by Marco Costalba. It is a better git viewer which provides us the ability to browse revisions history, view commits and patches applied to the files under a simple GUI environment. It utilizes git command line to process execute the commands and to display the output. It has some common features like to view revisions, diffs, files history, files annotation, archive tree. We can format and apply patch series with the selected commits, drag and drop commits between two instances and more with QGit Viewer. It allows us to create custom buttons with which we can add more buttons to execute a specific command when pressed using its builtin Action Builder. + +Here are some easy steps on how we can compile and install QGit Viewer from its source code in Ubuntu 14.04 LTS "Trusty". + +### 1. Installing QT4 Libraries ### + +First of all, we'll need have QT4 Libraries installed in order to run QGit viewer in our ubuntu machine. As apt is the default package manager of ubuntu and QT4 packages is available in the official repository of ubutnu, we'll gonna install qt4-default using apt-get command as shown below. + + $ sudo apt-get install qt4-default + +### 2. Downloading QGit Tarball ### + +After installing Qt4 libraries, we'll gonna install git so that we can clone the Git repository of QGit Viewer for Qt 4 . To do so, we'll run the following apt-get command. + + $ sudo apt-get install git + +Now, we'll clone the repository using git command as shown below. + + $ git clone git://repo.or.cz/qgit4/redivivus.git + + Cloning into 'redivivus'... + remote: Counting objects: 7128, done. + remote: Compressing objects: 100% (2671/2671), done. + remote: Total 7128 (delta 5464), reused 5711 (delta 4438) + Receiving objects: 100% (7128/7128), 2.39 MiB | 470.00 KiB/s, done. + Resolving deltas: 100% (5464/5464), done. + Checking connectivity... done. + +### 3. Compiling QGit ### + +After we have cloned the repository, we'll now enter into the directory named redivivus and create the makefile which we'll require to compile qgit viewer. So, to enter into the directory, we'll run the following command. + + $ cd redivivus + +Next, we'll run the following command in order to generate a new Makefile from qmake project file ie qgit.pro. + + $ qmake qgit.pro + +After the Makefile has been generated, we'll now finally compile the source codes of qgit and get the binary as output. To do so, first we'll need to install make and g++ package so that we can compile, as it is a program written in C++ . + + $ sudo apt-get install make g++ + +Now, we'll gonna compile the codes using make command. + + $ make + +### 4. Installing QGit ### + +As we have successfully compiled the source code of QGit viewer, now we'll surely wanna install it in our Ubuntu 14.04 machine so that we can execute it from our system. To do so, we'll run the following command. + + $ sudo make install + + cd src/ && make -f Makefile install + make[1]: Entering directory `/home/arun/redivivus/src' + make -f Makefile.Release install + make[2]: Entering directory `/home/arun/redivivus/src' + install -m 755 -p "../bin/qgit" "/usr/lib/x86_64-linux-gnu/qt4/bin/qgit" + strip "/usr/lib/x86_64-linux-gnu/qt4/bin/qgit" + make[2]: Leaving directory `/home/arun/redivivus/src' + make[1]: Leaving directory `/home/arun/redivivus/src' + +Next, we'll need to copy the built qgit binary file from bin directory to /usr/bin/ directory so that it will be available as global command. + + $ sudo cp bin/qgit /usr/bin/ + +### 5. Creating Desktop File ### + +As we have successfully installed qgit in our Ubuntu box, we'll now go for create a desktop file so that QGit will be available under Menu or Launcher of our Desktop Environment. To do so, we'll need to create a new file named qgit.desktop under /usr/share/applications/ directory. + + $ sudo nano /usr/share/applications/qgit.desktop + +Then, we'll need to paste the following lines into the file. + + [Desktop Entry] + Name=qgit + GenericName=git GUI viewer + Exec=qgit + Icon=qgit + Type=Application + Comment=git GUI viewer + Terminal=false + MimeType=inode/directory; + Categories=Qt;Development;RevisionControl; + +After done, we'll simply save the file and exit. + +### 6. Running QGit Viewer ### + +After QGit is installed successfully in our Ubuntu box, we can now run it from any launcher or application menu. In order to run QGit from the terminal, we'll need to run as follows. + + $ qgit + +This will open the Qt4 Framework based QGit Viewer in GUI mode. + +![QGit Viewer](http://blog.linoxide.com/wp-content/uploads/2015/07/qgit-viewer.png) + +### Conclusion ### + +QGit is really an awesome QT based git viewer. It is available on all three platforms Linux, Mac OSX and Microsoft Windows. It helps us to easily navigate to the history, revisions, branches and more from the available git repository. It reduces the need of running git command line for the common stuffs like viewing revisions, history, diff, etc as graphical interface of it makes easy to do tasks. The latest version of qgit is also available in the default repository of ubuntu which we can install using **apt-get install qgit** command. So, qgit makes our work pretty fast and easy to do with its simple GUI. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/install-qgit-viewer-ubuntu-14-04/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ \ No newline at end of file diff --git a/sources/tech/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md b/sources/tech/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md new file mode 100644 index 0000000000..503d57fdbf --- /dev/null +++ b/sources/tech/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md @@ -0,0 +1,72 @@ +Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu +================================================================================ +![](http://ubuntuhandbook.org/wp-content/uploads/2015/01/qmmp-icon-simple.png) + +Qmmp, Qt-based audio player with winamp or xmms like user interface, now is at 0.9.0 release. PPA updated for Ubuntu 15.10, Ubuntu 15.04, Ubuntu 14.04, Ubuntu 12.04 and derivatives. + +Qmmp 0.9.0 is a big release with many new features, improvements and some translation updates. It added: + +- audio-channel sequence converter; +- 9 channels support to equalizer; +- album artist tag support; +- asynchronous sorting; +- sorting by file modification date; +- sorting by album artist; +- multiple column support; +- feature to hide track length; +- feature to disable plugins without qmmp.pri modification (qmake only) +- feature to remember playlist scroll position; +- feature to exclude cue data files; +- feature to change user agent; +- feature to change window title; +- feature to reset fonts; +- feature to restore default shortcuts; +- default hotkey for the “Rename List” action; +- feature to disable fadeout in the gme plugin; +- Simple User Interface (QSUI) with the following changes: + - added multiple column support; + - added sorting by album artist; + - added sorting by file modification date; + - added feature to hide song length; + - added default hotkey for the “Rename List” action; + - added “Save List” action to the tab menu; + - added feature to reset fonts; + - added feature to reset shortcuts; + - improved status bar; + +It also improved playlist changes notification, playlist container, sample rate converter, cmake build scripts, title formatter, ape tags support in the mpeg plugin, fileops plugin, reduced cpu usage, changed default skin (to Glare) and playlist separator. + +![qmmp-090](http://ubuntuhandbook.org/wp-content/uploads/2015/09/qmmp-090.jpg) + +### Install Qmmp 0.9.0 in Ubuntu: ### + +New release has been made into PPA, available for all current Ubuntu releases and derivatives. + +1. To add the [Qmmp PPA][1]. + +Open terminal from the Dash, App Launcher, or via Ctrl+Alt+T shortcut keys. When it opens, run command: + + sudo add-apt-repository ppa:forkotov02/ppa + +![qmmp-ppa](http://ubuntuhandbook.org/wp-content/uploads/2015/09/qmmp-ppa.jpg) + +2. After adding the PPA, upgrade Qmmp player through Software Updater. Or refresh system cache and install the software via below commands: + + sudo apt-get update + + sudo apt-get install qmmp qmmp-plugin-pack + +That’s it. Enjoy! + +-------------------------------------------------------------------------------- + +via: http://ubuntuhandbook.org/index.php/2015/09/qmmp-0-9-0-in-ubuntu/ + +作者:[Ji m][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ubuntuhandbook.org/index.php/about/ +[1]:https://launchpad.net/~forkotov02/+archive/ubuntu/ppa \ No newline at end of file diff --git a/sources/tech/20150906 Make Math Simple in Ubuntu or Elementary OS via NaSC.md b/sources/tech/20150906 Make Math Simple in Ubuntu or Elementary OS via NaSC.md new file mode 100644 index 0000000000..4abc41325f --- /dev/null +++ b/sources/tech/20150906 Make Math Simple in Ubuntu or Elementary OS via NaSC.md @@ -0,0 +1,62 @@ +Make Math Simple in Ubuntu / Elementary OS via NaSC +================================================================================ +![](http://ubuntuhandbook.org/wp-content/uploads/2015/09/nasc-icon.png) + +NaSC (Not a Soulver Clone) is an open source software designed for Elementary OS to do arithmetics. It’s kinda similar to the Mac app [Soulver][1]. + +> Its an app where you do maths like a normal person. It lets you type whatever you want and smartly figures out what is math and spits out an answer on the right pane. Then you can plug those answers in to future equations and if that answer changes, so does the equations its used in. + +With NaSC you can for example: + +- Perform calculations with strangers you can define yourself +- Change the units and values ​​(in m cm, dollar euro …) +- Knowing the surface area of ​​a planet +- Solve of second-degree polynomial +- and more … + +![nasc-eos](http://ubuntuhandbook.org/wp-content/uploads/2015/09/nasc-eos.jpg) + +At the first launch, NaSC offers a tutorial that details possible features. You can later click the help icon on headerbar to get more. + +![nasc-help](http://ubuntuhandbook.org/wp-content/uploads/2015/09/nasc-help.jpg) + +In addition, the software allows to save your file in order to continue the work. It can be also shared on Pastebin with a defined time. + +### Install NaSC in Ubuntu / Elementary OS Freya: ### + +For Ubuntu 15.04, Ubuntu 15.10, Elementary OS Freya, open terminal from the Dash, App Launcher and run below commands one by one: + +1. Add the [NaSC PPA][2] via command: + + sudo apt-add-repository ppa:nasc-team/daily + +![nasc-ppa](http://ubuntuhandbook.org/wp-content/uploads/2015/09/nasc-ppa.jpg) + +2. If you’ve installed Synaptic Package Manager, search for and install `nasc` via it after clicking Reload button. + +Or run below commands to update system cache and install the software: + + sudo apt-get update + + sudo apt-get install nasc + +3. **(Optional)** To remove the software as well as NaSC, run: + + sudo apt-get remove nasc && sudo add-apt-repository -r ppa:nasc-team/daily + +For those who don’t want to add PPA, grab the .deb package directly from [this page][3]. + +-------------------------------------------------------------------------------- + +via: http://ubuntuhandbook.org/index.php/2015/09/make-math-simple-in-ubuntu-elementary-os-via-nasc/ + +作者:[Ji m][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ubuntuhandbook.org/index.php/about/ +[1]:http://www.acqualia.com/soulver/ +[2]:https://launchpad.net/~nasc-team/+archive/ubuntu/daily/ +[3]:http://ppa.launchpad.net/nasc-team/daily/ubuntu/pool/main/n/nasc/ \ No newline at end of file From bba159333a0ff81bf91a5dfee08157e88b8c1989 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 6 Sep 2015 20:27:34 +0800 Subject: [PATCH 09/31] [Translated]RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md --- ...ic Control Using FirewallD and Iptables.md | 193 ------------------ ...ic Control Using FirewallD and Iptables.md | 193 ++++++++++++++++++ 2 files changed, 193 insertions(+), 193 deletions(-) delete mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md create mode 100644 translated/tech/RHCSA/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md b/sources/tech/RHCSA Series/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md deleted file mode 100644 index 022953429d..0000000000 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md +++ /dev/null @@ -1,193 +0,0 @@ -FSSlc Translating - -RHCSA Series: Firewall Essentials and Network Traffic Control Using FirewallD and Iptables – Part 11 -================================================================================ -In simple words, a firewall is a security system that controls the incoming and outgoing traffic in a network based on a set of predefined rules (such as the packet destination / source or type of traffic, for example). - -![Control Network Traffic with FirewallD and Iptables](http://www.tecmint.com/wp-content/uploads/2015/05/Control-Network-Traffic-Using-Firewall.png) - -RHCSA: Control Network Traffic with FirewallD and Iptables – Part 11 - -In this article we will review the basics of firewalld, the default dynamic firewall daemon in Red Hat Enterprise Linux 7, and iptables service, the legacy firewall service for Linux, with which most system and network administrators are well acquainted, and which is also available in RHEL 7. - -### A Comparison Between FirewallD and Iptables ### - -Under the hood, both firewalld and the iptables service talk to the netfilter framework in the kernel through the same interface, not surprisingly, the iptables command. However, as opposed to the iptables service, firewalld can change the settings during normal system operation without existing connections being lost. - -Firewalld should be installed by default in your RHEL system, though it may not be running. You can verify with the following commands (firewall-config is the user interface configuration tool): - - # yum info firewalld firewall-config - -![Check FirewallD Information](http://www.tecmint.com/wp-content/uploads/2015/05/Check-FirewallD-Information.png) - -Check FirewallD Information - -and, - - # systemctl status -l firewalld.service - -![Check FirewallD Status](http://www.tecmint.com/wp-content/uploads/2015/05/Check-FirewallD-Status.png) - -Check FirewallD Status - -On the other hand, the iptables service is not included by default, but can be installed through. - - # yum update && yum install iptables-services - -Both daemons can be started and enabled to start on boot with the usual systemd commands: - - # systemctl start firewalld.service | iptables-service.service - # systemctl enable firewalld.service | iptables-service.service - -Read Also: [Useful Commands to Manage Systemd Services][1] - -As for the configuration files, the iptables service uses `/etc/sysconfig/iptables` (which will not exist if the package is not installed in your system). On a RHEL 7 box used as a cluster node, this file looks as follows: - -![Iptables Firewall Configuration](http://www.tecmint.com/wp-content/uploads/2015/05/Iptables-Rules.png) - -Iptables Firewall Configuration - -Whereas firewalld store its configuration across two directories, `/usr/lib/firewalld` and `/etc/firewalld`: - - # ls /usr/lib/firewalld /etc/firewalld - -![FirewallD Configuration](http://www.tecmint.com/wp-content/uploads/2015/05/Firewalld-configuration.png) - -FirewallD Configuration - -We will examine these configuration files further later in this article, after we add a few rules here and there. By now it will suffice to remind you that you can always find more information about both tools with. - - # man firewalld.conf - # man firewall-cmd - # man iptables - -Other than that, remember to take a look at [Reviewing Essential Commands & System Documentation – Part 1][2] of the current series, where I described several sources where you can get information about the packages installed on your RHEL 7 system. - -### Using Iptables to Control Network Traffic ### - -You may want to refer to [Configure Iptables Firewall – Part 8][3] of the Linux Foundation Certified Engineer (LFCE) series to refresh your memory about iptables internals before proceeding further. Thus, we will be able to jump in right into the examples. - -**Example 1: Allowing both incoming and outgoing web traffic** - -TCP ports 80 and 443 are the default ports used by the Apache web server to handle normal (HTTP) and secure (HTTPS) web traffic. You can allow incoming and outgoing web traffic through both ports on the enp0s3 interface as follows: - - # iptables -A INPUT -i enp0s3 -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT - # iptables -A OUTPUT -o enp0s3 -p tcp --sport 80 -m state --state ESTABLISHED -j ACCEPT - # iptables -A INPUT -i enp0s3 -p tcp --dport 443 -m state --state NEW,ESTABLISHED -j ACCEPT - # iptables -A OUTPUT -o enp0s3 -p tcp --sport 443 -m state --state ESTABLISHED -j ACCEPT - -**Example 2: Block all (or some) incoming connections from a specific network** - -There may be times when you need to block all (or some) type of traffic originating from a specific network, say 192.168.1.0/24 for example: - - # iptables -I INPUT -s 192.168.1.0/24 -j DROP - -will drop all packages coming from the 192.168.1.0/24 network, whereas, - - # iptables -A INPUT -s 192.168.1.0/24 --dport 22 -j ACCEPT - -will only allow incoming traffic through port 22. - -**Example 3: Redirect incoming traffic to another destination** - -If you use your RHEL 7 box not only as a software firewall, but also as the actual hardware-based one, so that it sits between two distinct networks, IP forwarding must have been already enabled in your system. If not, you need to edit `/etc/sysctl.conf` and set the value of net.ipv4.ip_forward to 1, as follows: - - net.ipv4.ip_forward = 1 - -then save the change, close your text editor and finally run the following command to apply the change: - - # sysctl -p /etc/sysctl.conf - -For example, you may have a printer installed at an internal box with IP 192.168.0.10, with the CUPS service listening on port 631 (both on the print server and on your firewall). In order to forward print requests from clients on the other side of the firewall, you should add the following iptables rule: - - # iptables -t nat -A PREROUTING -i enp0s3 -p tcp --dport 631 -j DNAT --to 192.168.0.10:631 - -Please keep in mind that iptables reads its rules sequentially, so make sure the default policies or later rules do not override those outlined in the examples above. - -### Getting Started with FirewallD ### - -One of the changes introduced with firewalld are zones. This concept allows to separate networks into different zones level of trust the user has decided to place on the devices and traffic within that network. - -To list the active zones: - - # firewall-cmd --get-active-zones - -In the example below, the public zone is active, and the enp0s3 interface has been assigned to it automatically. To view all the information about a particular zone: - - # firewall-cmd --zone=public --list-all - -![List all FirewallD Zones](http://www.tecmint.com/wp-content/uploads/2015/05/View-FirewallD-Zones.png) - -List all FirewallD Zones - -Since you can read more about zones in the [RHEL 7 Security guide][4], we will only list some specific examples here. - -**Example 4: Allowing services through the firewall** - -To get a list of the supported services, use. - - # firewall-cmd --get-services - -![List All Supported Services](http://www.tecmint.com/wp-content/uploads/2015/05/List-All-Supported-Services.png) - -List All Supported Services - -To allow http and https web traffic through the firewall, effective immediately and on subsequent boots: - - # firewall-cmd --zone=MyZone --add-service=http - # firewall-cmd --zone=MyZone --permanent --add-service=http - # firewall-cmd --zone=MyZone --add-service=https - # firewall-cmd --zone=MyZone --permanent --add-service=https - # firewall-cmd --reload - -If code>–zone is omitted, the default zone (you can check with firewall-cmd –get-default-zone) is used. - -To remove the rule, replace the word add with remove in the above commands. - -**Example 5: IP / Port forwarding** - -First off, you need to find out if masquerading is enabled for the desired zone: - - # firewall-cmd --zone=MyZone --query-masquerade - -In the image below, we can see that masquerading is enabled for the external zone, but not for public: - -![Check Masquerading Status in Firewalld](http://www.tecmint.com/wp-content/uploads/2015/05/Check-masquerading.png) - -Check Masquerading Status - -You can either enable masquerading for public: - - # firewall-cmd --zone=public --add-masquerade - -or use masquerading in external. Here’s what we would do to replicate Example 3 with firewalld: - - # firewall-cmd --zone=external --add-forward-port=port=631:proto=tcp:toport=631:toaddr=192.168.0.10 - -And don’t forget to reload the firewall. - -You can find further examples on [Part 9][5] of the RHCSA series, where we explained how to allow or disable the ports that are usually used by a web server and a ftp server, and how to change the corresponding rule when the default port for those services are changed. In addition, you may want to refer to the firewalld wiki for further examples. - -Read Also: [Useful FirewallD Examples to Configure Firewall in RHEL 7][6] - -### Conclusion ### - -In this article we have explained what a firewall is, what are the available services to implement one in RHEL 7, and provided a few examples that can help you get started with this task. If you have any comments, suggestions, or questions, feel free to let us know using the form below. Thank you in advance! - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/firewalld-vs-iptables-and-control-network-traffic-in-firewall/ - -作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/gacanepa/ -[1]:http://www.tecmint.com/manage-services-using-systemd-and-systemctl-in-linux/ -[2]:http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/ -[3]:http://www.tecmint.com/configure-iptables-firewall/ -[4]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Guide/sec-Using_Firewalls.html -[5]:http://www.tecmint.com/rhcsa-series-install-and-secure-apache-web-server-and-ftp-in-rhel/ -[6]:http://www.tecmint.com/firewalld-rules-for-centos-7/ diff --git a/translated/tech/RHCSA/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md b/translated/tech/RHCSA/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md new file mode 100644 index 0000000000..80e64c088d --- /dev/null +++ b/translated/tech/RHCSA/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md @@ -0,0 +1,193 @@ +RHCSA 系列: 防火墙简要和使用 FirewallD 和 Iptables 来控制网络流量 – Part 11 +================================================================================ + +简单来说,防火墙就是一个基于一系列预先定义的规则(例如流量包的目的地或来源,流量的类型等)的安全系统,它控制着一个网络中的流入和流出流量。 + +![使用 FirewallD 和 Iptables 来控制网络流量](http://www.tecmint.com/wp-content/uploads/2015/05/Control-Network-Traffic-Using-Firewall.png) + +RHCSA: 使用 FirewallD 和 Iptables 来控制网络流量 – Part 11 + +在本文中,我们将回顾 firewalld 和 iptables 的基础知识。前者是 RHEL 7 中的默认动态防火墙守护进程,而后者则是针对 Linux 的传统的防火墙服务,大多数的系统和网络管理员都非常熟悉它,并且在 RHEL 7 中也可以获取到。 + +### FirewallD 和 Iptables 的一个比较 ### + +在后台, firewalld 和 iptables 服务都通过相同的接口来与内核中的 netfilter 框架相交流,这不足为奇,即它们都通过 iptables 命令来与 netfilter 交互。然而,与 iptables 服务相反, firewalld 可以在不丢失现有连接的情况下,在正常的系统操作期间更改设定。 + +在默认情况下, firewalld 应该已经安装在你的 RHEL 系统中了,尽管它可能没有在运行。你可以使用下面的命令来确认(firewall-config 是用户界面配置工具): + + # yum info firewalld firewall-config + +![检查 FirewallD 的信息](http://www.tecmint.com/wp-content/uploads/2015/05/Check-FirewallD-Information.png) + +检查 FirewallD 的信息 + +以及, + + # systemctl status -l firewalld.service + +![检查 FirewallD 的状态](http://www.tecmint.com/wp-content/uploads/2015/05/Check-FirewallD-Status.png) + +检查 FirewallD 的状态 + +另一方面, iptables 服务在默认情况下没有被包含在 RHEL 系统中,但可以被安装上。 + + # yum update && yum install iptables-services + +这两个守护进程都可以使用常规的 systemd 命令来在开机时被启动和开启: + + # systemctl start firewalld.service | iptables-service.service + # systemctl enable firewalld.service | iptables-service.service + +另外,请阅读:[管理 Systemd 服务的实用命令][1] (注: 本文已被翻译发表,在 https://linux.cn/article-5926-1.html) + +至于配置文件, iptables 服务使用 `/etc/sysconfig/iptables` 文件(假如这个软件包在你的系统中没有被安装,则这个文件将不存在)。在一个被用作集群节点的 RHEL 7 机子上,这个文件长得像这样: + +![Iptables 防火墙配置文件](http://www.tecmint.com/wp-content/uploads/2015/05/Iptables-Rules.png) + +Iptables 防火墙配置文件 + +而 firewalld 则在两个目录中存储它的配置文件,即 `/usr/lib/firewalld` 和 `/etc/firewalld`: + + # ls /usr/lib/firewalld /etc/firewalld + +![FirewallD 的配置文件](http://www.tecmint.com/wp-content/uploads/2015/05/Firewalld-configuration.png) + +FirewallD 的配置文件 + +在这篇文章中后面,我们将进一步查看这些配置文件,在那之后,我们将在各处添加一些规则。 +现在,是时候提醒你了,你总可以使用下面的命令来找到更多有关这两个工具的信息。 + + # man firewalld.conf + # man firewall-cmd + # man iptables + +除了这些,记得查看一下当前系列的第一篇 [RHCSA 系列(一): 回顾基础命令及系统文档][2](注: 本文已被翻译发表,在 https://linux.cn/article-6133-1.html ),在其中我描述了几种渠道来得到安装在你的 RHEL 7 系统上的软件包的信息。 + +### 使用 Iptables 来控制网络流量 ### + +在进一步深入之前,或许你需要参考 Linux 基金会认证工程师(Linux Foundation Certified Engineer,LFCE) 系列中的 [配置 Iptables 防火墙 – Part 8][3] 来复习你脑中有关 iptables 的知识。 + +**例 1:同时允许流入和流出的网络流量** + +TCP 端口 80 和 443 是 Apache web 服务器使用的用来处理常规(HTTP) 和安全(HTTPS)网络流量的默认端口。你可以像下面这样在 enp0s3 接口上允许流入和流出网络流量通过这两个端口: + + # iptables -A INPUT -i enp0s3 -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT + # iptables -A OUTPUT -o enp0s3 -p tcp --sport 80 -m state --state ESTABLISHED -j ACCEPT + # iptables -A INPUT -i enp0s3 -p tcp --dport 443 -m state --state NEW,ESTABLISHED -j ACCEPT + # iptables -A OUTPUT -o enp0s3 -p tcp --sport 443 -m state --state ESTABLISHED -j ACCEPT + +**例 2:从某个特定网络中阻挡所有(或某些)流入连接** + +或许有时你需要阻挡来自于某个特定网络的所有(或某些)类型的来源流量,比方说 192.168.1.0/24: + + # iptables -I INPUT -s 192.168.1.0/24 -j DROP + +上面的命令将丢掉所有来自 192.168.1.0/24 网络的网络包,而 + + # iptables -A INPUT -s 192.168.1.0/24 --dport 22 -j ACCEPT + +将只允许通过端口 22 的流入流量。 + +**例 3:将流入流量重定向到另一个目的地** + +假如你不仅使用你的 RHEL 7 机子来作为一个软件防火墙,而且还将它作为一个硬件防火墙,使得它位于两个不同的网络之间,则在你的系统 IP 转发一定已经被开启了。假如没有开启,你需要编辑 `/etc/sysctl.conf` 文件并将 `net.ipv4.ip_forward` 的值设为 1,即: + + net.ipv4.ip_forward = 1 + +接着保存更改,关闭你的文本编辑器,并最终运行下面的命令来应用更改: + + # sysctl -p /etc/sysctl.conf + +例如,你可能在一个内部的机子上安装了一个打印机,它的 IP 地址为 192.168.0.10,CUPS 服务在端口 631 上进行监听(同时在你的打印服务器和你的防火墙上)。为了从防火墙另一边的客户端传递打印请求,你应该添加下面的 iptables 规则: + + # iptables -t nat -A PREROUTING -i enp0s3 -p tcp --dport 631 -j DNAT --to 192.168.0.10:631 + +请记住 iptables 逐条地读取它的规则,所以请确保默认的策略或后面的规则不会重载上面例子中那些有下划线的规则。 + +### FirewallD 入门 ### + +引入 firewalld 的一个改变是区域(zone) (注:翻译参考了 https://fedoraproject.org/wiki/FirewallD/zh-cn) 的概念。它允许将网路划分为拥有不同信任级别的区域,由用户决定将设备和流量放置到哪个区域。 + +要获取活动的区域,使用: + + # firewall-cmd --get-active-zones + +在下面的例子中,公用区域被激活了,并且 enp0s3 接口被自动地分配到了这个区域。要查看有关一个特定区域的所有信息,可使用: + + # firewall-cmd --zone=public --list-all + +![列出所有的 Firewalld 区域](http://www.tecmint.com/wp-content/uploads/2015/05/View-FirewallD-Zones.png) + +列出所有的 Firewalld 区域 + +由于你可以在 [RHEL 7 安全指南][4] 中阅读到更多有关区域的知识,这里我们将仅列出一些特别的例子。 + +**例 4:允许服务通过防火墙** + +要获取受支持的服务的列表,可以使用: + + # firewall-cmd --get-services + +![列出所有受支持的服务](http://www.tecmint.com/wp-content/uploads/2015/05/List-All-Supported-Services.png) + +列出所有受支持的服务 + +要立刻且在随后的开机中使得 http 和 https 网络流量通过防火墙,可以这样: + + # firewall-cmd --zone=MyZone --add-service=http + # firewall-cmd --zone=MyZone --permanent --add-service=http + # firewall-cmd --zone=MyZone --add-service=https + # firewall-cmd --zone=MyZone --permanent --add-service=https + # firewall-cmd --reload + +假如 code>–zone 被忽略,则默认的区域(你可以使用 `firewall-cmd –get-default-zone`来查看)将会被使用。 + +若要移除这些规则,可以在上面的命令中将 `add` 替换为 `remove`。 + +**例 5:IP 转发或端口转发** + +首先,你需要查看在目标区域中,伪装是否被开启: + + # firewall-cmd --zone=MyZone --query-masquerade + +在下面的图片中,我们可以看到对于外部区域,伪装已被开启,但对于公用区域则没有: + +![在 firewalld 中查看伪装状态](http://www.tecmint.com/wp-content/uploads/2015/05/Check-masquerading.png) + +查看伪装状态 + +你可以为公共区域开启伪装: + + # firewall-cmd --zone=public --add-masquerade + +或者在外部区域中使用伪装。下面是使用 firewalld 来重复例 3 中的任务所需的命令: + + # firewall-cmd --zone=external --add-forward-port=port=631:proto=tcp:toport=631:toaddr=192.168.0.10 + +并且别忘了重新加载防火墙。 + +在 RHCSA 系列的 [Part 9][5] 你可以找到更深入的例子,在那篇文章中我们解释了如何允许或禁用通常被 web 服务器和 ftp 服务器使用的端口,以及在针对这两个服务所使用的默认端口被改变时,如何更改相应的规则。另外,你或许想参考 firewalld 的 wiki 来查看更深入的例子。 + +Read Also: [在 RHEL 7 中配置防火墙的几个实用的 firewalld 例子][6] + +### 总结 ### + +在这篇文章中,我们已经解释了防火墙是什么,介绍了在 RHEL 7 中用来实现防火墙的几个可用的服务,并提供了可以帮助你入门防火墙的几个例子。假如你有任何的评论,建议或问题,请随意使用下面的评论框来让我们知晓。这里就事先感谢了! + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/firewalld-vs-iptables-and-control-network-traffic-in-firewall/ + +作者:[Gabriel Cánepa][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/gacanepa/ +[1]:http://www.tecmint.com/manage-services-using-systemd-and-systemctl-in-linux/ +[2]:http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/ +[3]:http://www.tecmint.com/configure-iptables-firewall/ +[4]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Guide/sec-Using_Firewalls.html +[5]:http://www.tecmint.com/rhcsa-series-install-and-secure-apache-web-server-and-ftp-in-rhel/ +[6]:http://www.tecmint.com/firewalld-rules-for-centos-7/ \ No newline at end of file From 9914cfab72f15b32c1d4ba7653cf64673a876e35 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 6 Sep 2015 20:30:28 +0800 Subject: [PATCH 10/31] Update RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ...art 12--Automate RHEL 7 Installations Using 'Kickstart'.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md b/sources/tech/RHCSA Series/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md index a4365e311e..3d8b578a32 100644 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md @@ -1,3 +1,5 @@ +FSSlc translating + RHCSA Series: Automate RHEL 7 Installations Using ‘Kickstart’ – Part 12 ================================================================================ Linux servers are rarely standalone boxes. Whether it is in a datacenter or in a lab environment, chances are that you have had to install several machines that will interact one with another in some way. If you multiply the time that it takes to install Red Hat Enterprise Linux 7 manually on a single server by the number of boxes that you need to set up, this can lead to a rather lengthy effort that can be avoided through the use of an unattended installation tool known as kickstart. @@ -139,4 +141,4 @@ via: http://www.tecmint.com/automatic-rhel-installations-using-kickstart/ [a]:http://www.tecmint.com/author/gacanepa/ [1]:https://access.redhat.com/labs/kickstartconfig/ -[2]:http://www.tecmint.com/multiple-centos-installations-using-kickstart/ \ No newline at end of file +[2]:http://www.tecmint.com/multiple-centos-installations-using-kickstart/ From 303b95f336868fb67d589d88435bc5d04038df19 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 6 Sep 2015 21:59:32 +0800 Subject: [PATCH 11/31] =?UTF-8?q?Translating=EF=BC=9A=20sources/tech/20150?= =?UTF-8?q?906=20Do=20Simple=20Math=20In=20Ubuntu=20And=20elementary=20OS?= =?UTF-8?q?=20With=20NaSC.md=20sources/tech/20150906=20How=20To=20Manage?= =?UTF-8?q?=20Log=20Files=20With=20Logrotate=20On=20Ubuntu=2012.10.md=20so?= =?UTF-8?q?urces/tech/20150906=20Make=20Math=20Simple=20in=20Ubuntu=20or?= =?UTF-8?q?=20Elementary=20OS=20via=20NaSC.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...50906 Do Simple Math In Ubuntu And elementary OS With NaSC.md | 1 + ...906 How To Manage Log Files With Logrotate On Ubuntu 12.10.md | 1 + ...50906 Make Math Simple in Ubuntu or Elementary OS via NaSC.md | 1 + 3 files changed, 3 insertions(+) diff --git a/sources/tech/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md b/sources/tech/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md index 67601c8ce6..512c0669f9 100644 --- a/sources/tech/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md +++ b/sources/tech/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md @@ -1,3 +1,4 @@ +ictlyh Translating Do Simple Math In Ubuntu And elementary OS With NaSC ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Make-Math-Simpler-with-NaSC.jpg) diff --git a/sources/tech/20150906 How To Manage Log Files With Logrotate On Ubuntu 12.10.md b/sources/tech/20150906 How To Manage Log Files With Logrotate On Ubuntu 12.10.md index 2968dc113e..0c7ae1a7e3 100644 --- a/sources/tech/20150906 How To Manage Log Files With Logrotate On Ubuntu 12.10.md +++ b/sources/tech/20150906 How To Manage Log Files With Logrotate On Ubuntu 12.10.md @@ -1,3 +1,4 @@ +ictlyh Translating How To Manage Log Files With Logrotate On Ubuntu 12.10 ================================================================================ #### About Logrotate #### diff --git a/sources/tech/20150906 Make Math Simple in Ubuntu or Elementary OS via NaSC.md b/sources/tech/20150906 Make Math Simple in Ubuntu or Elementary OS via NaSC.md index 4abc41325f..2ddb2a072c 100644 --- a/sources/tech/20150906 Make Math Simple in Ubuntu or Elementary OS via NaSC.md +++ b/sources/tech/20150906 Make Math Simple in Ubuntu or Elementary OS via NaSC.md @@ -1,3 +1,4 @@ +ictlyh Translating Make Math Simple in Ubuntu / Elementary OS via NaSC ================================================================================ ![](http://ubuntuhandbook.org/wp-content/uploads/2015/09/nasc-icon.png) From a1393e930fd6e4a40875824ad3fb7328350a5c07 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 6 Sep 2015 22:23:56 +0800 Subject: [PATCH 12/31] Update 20150906 FISH--A smart and user-friendly command line shell for Linux.md --- ...-A smart and user-friendly command line shell for Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md b/sources/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md index 180616e2d2..6e0c78246b 100644 --- a/sources/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md +++ b/sources/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md @@ -1,3 +1,5 @@ +translating by oska874 + FISH – A smart and user-friendly command line shell for Linux ================================================================================ The friendly interactive shell (FISH). fish is a user friendly command line shell intended mostly for interactive use. A shell is a program used to execute other programs. @@ -57,4 +59,4 @@ via: http://www.ubuntugeek.com/fish-a-smart-and-user-friendly-command-line-shell 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.ubuntugeek.com/author/ubuntufix -[1]:http://fishshell.com/docs/current/index.html#introduction \ No newline at end of file +[1]:http://fishshell.com/docs/current/index.html#introduction From d2ae274381a71eb01861251cc738afc8e963258a Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 7 Sep 2015 09:48:01 +0800 Subject: [PATCH 13/31] Update 20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md --- ...06 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md b/sources/tech/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md index 503d57fdbf..36e4c70d2c 100644 --- a/sources/tech/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md +++ b/sources/tech/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md @@ -1,3 +1,4 @@ +translation by strugglingyouth Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu ================================================================================ ![](http://ubuntuhandbook.org/wp-content/uploads/2015/01/qmmp-icon-simple.png) @@ -69,4 +70,4 @@ via: http://ubuntuhandbook.org/index.php/2015/09/qmmp-0-9-0-in-ubuntu/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://ubuntuhandbook.org/index.php/about/ -[1]:https://launchpad.net/~forkotov02/+archive/ubuntu/ppa \ No newline at end of file +[1]:https://launchpad.net/~forkotov02/+archive/ubuntu/ppa From c2ad6f0bf7b55a98ba75e766537be8909340c6b4 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 7 Sep 2015 11:02:25 +0800 Subject: [PATCH 14/31] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...r-friendly command line shell for Linux.md | 47 +++++++++---------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/sources/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md b/sources/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md index 6e0c78246b..208f1f6781 100644 --- a/sources/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md +++ b/sources/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md @@ -1,59 +1,56 @@ -translating by oska874 -FISH – A smart and user-friendly command line shell for Linux +FISH - Linux 的一个智能、易用的SHELL ================================================================================ -The friendly interactive shell (FISH). fish is a user friendly command line shell intended mostly for interactive use. A shell is a program used to execute other programs. -### FISH Features ### +FISH:友好的交互式shell。 fish 是一个用户友好的命令行shell,主要是用来进行交互式使用。shell 就是一个用来执行其他程序的程序。 -#### Autosuggestions #### +### FISH 特性 ### -fish suggests commands as you type based on history and completions, just like a web browser. Watch out, Netscape Navigator 4.0! +#### 自动建议 #### -#### Glorious VGA Color #### +fish 会根据你的历史输入和已经完成的命令来提供建议,方便输入,就像一个网络浏览器一样。注意了,就是Netscape Navigator 4.0! -fish natively supports term256, the state of the art in terminal technology. You'll have an astonishing 256 colors available for use! +#### 漂亮的VGA 色彩 #### +fish 原生支持term256, 它就是一个终端技术的艺术国度。 你将可以拥有一个难以置信的、256 色的shell 来使用。 -#### Sane Scripting #### +#### 理智的脚本 #### -fish is fully scriptable, and its syntax is simple, clean, and consistent. You'll never write esac again. +fish 是完全可以通过脚本控制的,而且它的语法又是那么的简单、干净,而且一致。你甚至不需要去重写。 -#### Web Based configuration #### +#### 基于web 的配置 #### -For those lucky few with a graphical computer, you can set your colors and view functions, variables, and history all from a web page. +对于少数能使用图形计算机的幸运儿, 你们可以在网页上配置你们自己的色彩方案,以及查看函数、变量和历史记录。 -#### Man Page Completions #### +#### 帮助手册补全 #### -Other shells support programmable completions, but only fish generates them automatically by parsing your installed man pages. +其它的shell 支持可配置的补全, 但是只有fish 可以通过自动转换你安装好的man 手册来实现补全功能。 -#### Works Out Of The Box #### +#### 开箱即用 #### -fish will delight you with features like tab completions and syntax highlighting that just work, with nothing new to learn or configure. +fish 将会通过tab 补全和语法高亮是你非常愉快的使用shell, 同时不需要太多的学习或者配置。 -### Install FISH On ubuntu 15.04 ### +### 在ubuntu 15.04 上安装FISH -Open the terminal and run the following commands +打开终端,运行下列命令: sudo apt-add-repository ppa:fish-shell/release-2 sudo apt-get update sudo apt-get install fish -**Using FISH** - -Open the terminal and run the following command to start FISH +**使用FISH** +打开终端,运行下列命令来启动FISH: fish -Welcome to fish, the friendly interactive shell Type help for instructions on how to use fish - -Check [FISH Documentation][1] How to use. +欢迎来到fish, 友好的交互式shell,输入指令help 来了解怎么使用fish。 +阅读[FISH 文档][1] ,掌握使用方法。 -------------------------------------------------------------------------------- via: http://www.ubuntugeek.com/fish-a-smart-and-user-friendly-command-line-shell-for-linux.html 作者:[ruchi][a] -译者:[译者ID](https://github.com/译者ID) +译者:[译者ID](https://github.com/oska874) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From c50498f743252e6eb6246c463f41a5ce81f96b3d Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 7 Sep 2015 11:02:42 +0800 Subject: [PATCH 15/31] Update 20150906 FISH--A smart and user-friendly command line shell for Linux.md --- ...SH--A smart and user-friendly command line shell for Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md b/sources/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md index 208f1f6781..3a6e5cafa0 100644 --- a/sources/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md +++ b/sources/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md @@ -45,6 +45,7 @@ fish 将会通过tab 补全和语法高亮是你非常愉快的使用shell, 欢迎来到fish, 友好的交互式shell,输入指令help 来了解怎么使用fish。 阅读[FISH 文档][1] ,掌握使用方法。 + -------------------------------------------------------------------------------- via: http://www.ubuntugeek.com/fish-a-smart-and-user-friendly-command-line-shell-for-linux.html From 50656a3d038d05410e679011cbee135aacb1362c Mon Sep 17 00:00:00 2001 From: ezio Date: Mon, 7 Sep 2015 11:09:56 +0800 Subject: [PATCH 16/31] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=B9=B6=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ISH--A smart and user-friendly command line shell for Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md (100%) diff --git a/sources/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md b/translated/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md similarity index 100% rename from sources/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md rename to translated/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md From 979d48279e393a6e0154ca303e7b7290ef3c66a4 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 7 Sep 2015 23:30:48 +0800 Subject: [PATCH 17/31] PUB:20150821 Top 4 open source command-line email clients @KevinSJ --- ... open source command-line email clients.md | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) rename {translated/share => published}/20150821 Top 4 open source command-line email clients.md (52%) diff --git a/translated/share/20150821 Top 4 open source command-line email clients.md b/published/20150821 Top 4 open source command-line email clients.md similarity index 52% rename from translated/share/20150821 Top 4 open source command-line email clients.md rename to published/20150821 Top 4 open source command-line email clients.md index db28f4c543..1e9ae59c5c 100644 --- a/translated/share/20150821 Top 4 open source command-line email clients.md +++ b/published/20150821 Top 4 open source command-line email clients.md @@ -1,13 +1,12 @@ -KevinSJ Translating -四大开源版命令行邮件客户端 +4 个开源的命令行邮件客户端 ================================================================================ ![](http://opensource.com/sites/default/files/styles/image-full-size/public/images/life/life_mail.png) -无论你承认与否,email并没有消亡。对依赖命令行的 Linux 高级用户而言,离开 shell 转而使用传统的桌面或网页版邮件客户端并不合适。归根结底,命令行最善于处理文件,特别是文本文件,能使效率倍增。 +无论你承认与否,email并没有消亡。对那些对命令行至死不渝的 Linux 高级用户而言,离开 shell 转而使用传统的桌面或网页版邮件客户端并不适应。归根结底,命令行最善于处理文件,特别是文本文件,能使效率倍增。 -幸运的是,也有不少的命令行邮件客户端,他们的用户大都乐于帮助你入门并回答你使用中遇到的问题。但别说我没警告过你:一旦你完全掌握了其中一个客户端,要再使用图基于图形界面的客户端将回变得很困难! +幸运的是,也有不少的命令行邮件客户端,而它们的用户大都乐于帮助你入门并回答你使用中遇到的问题。但别说我没警告过你:一旦你完全掌握了其中一个客户端,你会发现很难回到基于图形界面的客户端! -要安装下述四个客户端中的任何一个是非常容易的;主要 Linux 发行版的软件仓库中都提供此类软件,并可通过包管理器进行安装。你也可以再其他的操作系统中寻找并安装这类客户端,但我并未尝试过也没有相关的经验。 +要安装下述四个客户端中的任何一个是非常容易的;主要的 Linux 发行版的软件仓库中都提供此类软件,并可通过包管理器进行安装。你也可以在其它的操作系统中寻找并安装这类客户端,但我并未尝试过也没有相关的经验。 ### Mutt ### @@ -17,7 +16,7 @@ KevinSJ Translating 许多终端爱好者都听说过甚至熟悉 Mutt 和 Alpine, 他们已经存在多年。让我们先看看 Mutt。 -Mutt 支持许多你所期望 email 系统支持的功能:会话,颜色区分,支持多语言,同时还有很多设置选项。它支持 POP3 和 IMAP, 两个主要的邮件传输协议,以及许多邮箱格式。自从1995年诞生以来, Mutt 即拥有一个活跃的开发社区,但最近几年,新版本更多的关注于修复问题和安全更新而非提供新功能。这对大多数 Mutt 用户而言并无大碍,他们钟爱这样的界面,并支持此项目的口号:“所有邮件客户端都很烂,只是这个烂的没那么彻底。” +Mutt 支持许多你所期望 email 系统支持的功能:会话,颜色区分,支持多语言,同时还有很多设置选项。它支持 POP3 和 IMAP 这两个主要的邮件传输协议,以及许多邮箱格式。自从1995年诞生以来, Mutt 就拥有了一个活跃的开发社区,但最近几年,新版本更多的关注于修复问题和安全更新而非提供新功能。这对大多数 Mutt 用户而言并无大碍,他们钟爱这样的界面,并支持此项目的口号:“所有邮件客户端都很烂,只是这个烂的没那么彻底。” ### Alpine ### @@ -25,13 +24,13 @@ Mutt 支持许多你所期望 email 系统支持的功能:会话,颜色区 - [源代码][5] - 授权协议: [Apache 2.0][6] -Alpine 是另一款知名的终端邮件客户端,它由华盛顿大学开发,初衷是作为 UW 开发的 Pine 的开源,支持unicode的替代版本。 +Alpine 是另一款知名的终端邮件客户端,它由华盛顿大学开发,设计初衷是作为一个开源的、支持 unicode 的 Pine (也来自华盛顿大学)的替代版本。 Alpine 不仅容易上手,还为高级用户提供了很多特性,它支持很多协议 —— IMAP, LDAP, NNTP, POP, SMTP 等,同时也支持不同的邮箱格式。Alpine 内置了一款名为 Pico 的可独立使用的简易文本编辑工具,但你也可以使用你常用的文本编辑器: vi, Emacs等。 -尽管Alpine的升级并不频繁,名为re-alpine的分支为不同的开发者提供了开发此项目的机会。 +尽管 Alpine 的升级并不频繁,不过有个名为 re-alpine 的分支为不同的开发者提供了开发此项目的机会。 -Alpine 支持再屏幕上显示上下文帮助,但一些用户回喜欢 Mutt 式的独立说明手册,但这两种提供了较好的说明。用户可以同时尝试 Mutt 和 Alpine,并由个人喜好作出决定,也可以尝试以下几个比较新颖的选项。 +Alpine 支持在屏幕上显示上下文帮助,但一些用户会喜欢 Mutt 式的独立说明手册,不过它们两个的文档都很完善。用户可以同时尝试 Mutt 和 Alpine,并由个人喜好作出决定,也可以尝试以下的几个新选择。 ### Sup ### @@ -39,10 +38,9 @@ Alpine 支持再屏幕上显示上下文帮助,但一些用户回喜欢 Mutt - [源代码][8] - 授权协议: [GPLv2][9] -Sup 是我们列表中能被称为“大容量邮件客户端”的两个之一。自称“为邮件较多的人设计的命令行客户端”,Sup 的目标是提供一个支持层次化设计并允许再为会话添加标签进行简单整理的界面。 +Sup 是我们列表中能被称为“大容量邮件客户端”的二者之一。自称“为邮件较多的人设计的命令行客户端”,Sup 的目标是提供一个支持层次化设计并允许为会话添加标签进行简单整理的界面。 由于采用 Ruby 编写,Sup 能提供十分快速的搜索并能自动管理联系人列表,同时还允许自定义插件。对于使用 Gmail 作为网页邮件客户端的人们,这些功能都是耳熟能详的,这就使得 Sup 成为一种比较现代的命令行邮件管理方式。 -Written in Ruby, Sup provides exceptionally fast searching, manages your contact list automatically, and allows for custom extensions. For people who are used to Gmail as a webmail interface, these features will seem familiar, and Sup might be seen as a more modern approach to email on the command line. ### Notmuch ### @@ -52,16 +50,17 @@ Written in Ruby, Sup provides exceptionally fast searching, manages your contact "Sup? Notmuch." Notmuch 作为 Sup 的回应,最初只是重写了 Sup 的一小部分来提高性能。最终,这个项目逐渐变大并成为了一个独立的邮件客户端。 -Notmuch是一款相当精简的软件。它并不能独立的收发邮件,启用 Notmuch 的快速搜索功能的代码实际上是一个需要调用的独立库。但这样的模块化设计也使得你能使用你最爱的工具进行写信,发信和收信,集中精力做好一件事情并有效浏览和管理你的邮件。 +Notmuch 是一款相当精简的软件。它并不能独立的收发邮件,启用 Notmuch 的快速搜索功能的代码实际上是设计成一个程序可以调用的独立库。但这样的模块化设计也使得你能使用你最爱的工具进行写信,发信和收信,集中精力做好一件事情并有效浏览和管理你的邮件。 + +这个列表并不完整,还有很多 email 客户端,它们或许才是你的最佳选择。你喜欢什么客户端呢? -这个列表并不完整,还有很多 email 客户端,他们或许才是你的最佳选择。你喜欢什么客户端呢? -------------------------------------------------------------------------------- via: http://opensource.com/life/15/8/top-4-open-source-command-line-email-clients 作者:[Jason Baker][a] 译者:[KevinSJ](https://github.com/KevinSj) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From c1ceb5869d1d80ff3c819030e2882d374c7b6e67 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 7 Sep 2015 23:47:48 +0800 Subject: [PATCH 18/31] PUB:20150906 FISH--A smart and user-friendly command line shell for Linux @oska874 --- ...r-friendly command line shell for Linux.md | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) rename {translated/share => published}/20150906 FISH--A smart and user-friendly command line shell for Linux.md (54%) diff --git a/translated/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md b/published/20150906 FISH--A smart and user-friendly command line shell for Linux.md similarity index 54% rename from translated/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md rename to published/20150906 FISH--A smart and user-friendly command line shell for Linux.md index 3a6e5cafa0..de5d3946f0 100644 --- a/translated/share/20150906 FISH--A smart and user-friendly command line shell for Linux.md +++ b/published/20150906 FISH--A smart and user-friendly command line shell for Linux.md @@ -1,33 +1,35 @@ - -FISH - Linux 的一个智能、易用的SHELL +FISH:Linux 的一个智能易用的 Shell ================================================================================ -FISH:友好的交互式shell。 fish 是一个用户友好的命令行shell,主要是用来进行交互式使用。shell 就是一个用来执行其他程序的程序。 +FISH(friendly interactive shell)是一个用户友好的命令行 shell,主要是用来进行交互式使用。shell 就是一个用来执行其他程序的程序。 ### FISH 特性 ### #### 自动建议 #### -fish 会根据你的历史输入和已经完成的命令来提供建议,方便输入,就像一个网络浏览器一样。注意了,就是Netscape Navigator 4.0! +fish 会根据你的历史输入和补完来提供命令建议,就像一个网络浏览器一样。注意了,就是Netscape Navigator 4.0! + +![](http://www.tecmint.com/wp-content/uploads/2015/07/Fish-Auto-Suggestion.gif) #### 漂亮的VGA 色彩 #### -fish 原生支持term256, 它就是一个终端技术的艺术国度。 你将可以拥有一个难以置信的、256 色的shell 来使用。 + +fish 原生支持 term256, 它就是一个终端技术的艺术国度。 你将可以拥有一个难以置信的、256 色的shell 来使用。 #### 理智的脚本 #### fish 是完全可以通过脚本控制的,而且它的语法又是那么的简单、干净,而且一致。你甚至不需要去重写。 -#### 基于web 的配置 #### +#### 基于 web 的配置 #### 对于少数能使用图形计算机的幸运儿, 你们可以在网页上配置你们自己的色彩方案,以及查看函数、变量和历史记录。 #### 帮助手册补全 #### -其它的shell 支持可配置的补全, 但是只有fish 可以通过自动转换你安装好的man 手册来实现补全功能。 +其它的 shell 支持可配置的补全, 但是只有 fish 可以通过自动转换你安装好的 man 手册来实现补全功能。 #### 开箱即用 #### -fish 将会通过tab 补全和语法高亮是你非常愉快的使用shell, 同时不需要太多的学习或者配置。 +fish 将会通过 tab 补全和语法高亮使你非常愉快的使用shell, 同时不需要太多的学习或者配置。 ### 在ubuntu 15.04 上安装FISH @@ -37,12 +39,13 @@ fish 将会通过tab 补全和语法高亮是你非常愉快的使用shell, sudo apt-get update sudo apt-get install fish -**使用FISH** +###使用FISH### 打开终端,运行下列命令来启动FISH: + fish -欢迎来到fish, 友好的交互式shell,输入指令help 来了解怎么使用fish。 +欢迎来到 fish,友好的交互式shell,输入指令 help 来了解怎么使用fish。 阅读[FISH 文档][1] ,掌握使用方法。 @@ -51,8 +54,8 @@ fish 将会通过tab 补全和语法高亮是你非常愉快的使用shell, via: http://www.ubuntugeek.com/fish-a-smart-and-user-friendly-command-line-shell-for-linux.html 作者:[ruchi][a] -译者:[译者ID](https://github.com/oska874) -校对:[校对者ID](https://github.com/校对者ID) +译者:[oska874](https://github.com/oska874) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 46a139830ca8be02c9f6de86db5ebd73620dfb6d Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 8 Sep 2015 00:14:35 +0800 Subject: [PATCH 19/31] PUB:20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @jerryling315 ,请注意,要使用中文标点。 --- ...u 15.04 to connect to Android or iPhone.md | 77 +++++++++++++++++++ ...u 15.04 to connect to Android or iPhone.md | 74 ------------------ 2 files changed, 77 insertions(+), 74 deletions(-) create mode 100644 published/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md delete mode 100644 translated/tech/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md diff --git a/published/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md b/published/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md new file mode 100644 index 0000000000..e7ee7d760d --- /dev/null +++ b/published/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md @@ -0,0 +1,77 @@ +如何在 Ubuntu 15.04 下创建一个可供 Android/iOS 连接的 AP +================================================================================ +我成功地在 Ubuntu 15.04 下用 Gnome Network Manager 创建了一个无线AP热点。接下来我要分享一下我的步骤。请注意:你必须要有一个可以用来创建AP热点的无线网卡。如果你不知道如何确认它的话,在终端(Terminal)里输入`iw list`。 + +如果你没有安装`iw`的话, 在Ubuntu下你可以使用`sudo apt-get install iw`进行安装. + +在你键入`iw list`之后, 查看“支持的接口模式”, 你应该会看到类似下面的条目中看到 AP: + + Supported interface modes: + + * IBSS + * managed + * AP + * AP/VLAN + * monitor + * mesh point + +让我们一步步看: + +1、 断开WIFI连接。使用有线网络接入你的笔记本。 + +2、 在顶栏面板里点击网络的图标 -> Edit Connections(编辑连接) -> 在弹出窗口里点击Add(新增)按钮。 + +3、 在下拉菜单内选择Wi-Fi。 + +4、 接下来: + +a、 输入一个链接名 比如: Hotspot 1 + +b、 输入一个 SSID 比如: Hotspot 1 + +c、 选择模式(mode): Infrastructure (基础设施) + +d、 设备 MAC 地址: 在下拉菜单里选择你的无线设备 + +![](http://i2.wp.com/www.linuxveda.com/wp-content/uploads/2015/08/ubuntu-ap-gnome1.jpg) + +5、 进入Wi-Fi安全选项卡,选择 WPA & WPA2 Personal 并且输入密码。 +6、 进入IPv4设置选项卡,在Method(方法)下拉菜单里,选择Shared to other computers(共享至其他电脑)。 + +![](http://i1.wp.com/www.linuxveda.com/wp-content/uploads/2015/08/ubuntu-ap-gnome4.jpg) + +7、 进入IPv6选项卡,在Method(方法)里设置为忽略ignore (只有在你不使用IPv6的情况下这么做) +8、 点击 Save(保存) 按钮以保存配置。 +9、 从 menu/dash 里打开Terminal。 +10、 修改你刚刚使用 network settings 创建的连接。 + +使用 VIM 编辑器: + + sudo vim /etc/NetworkManager/system-connections/Hotspot + +或使用Gedit 编辑器: + + gksu gedit /etc/NetworkManager/system-connections/Hotspot + +把名字 Hotspot 用你在第4步里起的连接名替换掉。 + +![](http://i2.wp.com/www.linuxveda.com/wp-content/uploads/2015/08/ubuntu-ap-gnome2.jpg?resize=640%2C402) + +a、 把 `mode=infrastructure` 改成 `mode=ap` 并且保存文件。 +b、 一旦你保存了这个文件,你应该能在 Wifi 菜单里看到你刚刚建立的AP了。(如果没有的话请再顶栏里 关闭/打开 Wifi 选项一次) + +![](http://i1.wp.com/www.linuxveda.com/wp-content/uploads/2015/08/ubuntu-ap-gnome3.jpg?resize=290%2C375) + +11、你现在可以把你的设备连上Wifi了。已经过 Android 5.0的小米4测试。(下载了1GB的文件以测试速度与稳定性) + +-------------------------------------------------------------------------------- + +via: http://www.linuxveda.com/2015/08/23/how-to-create-an-ap-in-ubuntu-15-04-to-connect-to-androidiphone/ + +作者:[Sayantan Das][a] +译者:[jerryling315](https://github.com/jerryling315) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxveda.com/author/sayantan_das/ diff --git a/translated/tech/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md b/translated/tech/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md deleted file mode 100644 index 02aef62d82..0000000000 --- a/translated/tech/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md +++ /dev/null @@ -1,74 +0,0 @@ -如何在 Ubuntu 15.04 下创建连接至 Android/iOS 的 AP -================================================================================ -我成功地在 Ubuntu 15.04 下用 Gnome Network Manager 创建了一个无线AP热点. 接下来我要分享一下我的步骤. 请注意: 你必须要有一个可以用来创建AP热点的无线网卡. 如果你不知道如何找到连上了的设备的话, 在终端(Terminal)里输入`iw list`. - -如果你没有安装`iw`的话, 在Ubuntu下你可以使用`udo apt-get install iw`进行安装. - -在你键入`iw list`之后, 寻找可用的借口, 你应该会看到类似下列的条目: - -Supported interface modes: - -* IBSS -* managed -* AP -* AP/VLAN -* monitor -* mesh point - -让我们一步步看 - -1. 断开WIFI连接. 使用有线网络接入你的笔记本. -1. 在顶栏面板里点击网络的图标 -> Edit Connections(编辑连接) -> 在弹出窗口里点击Add(新增)按钮. -1. 在下拉菜单内选择Wi-Fi. -1. 接下来, - -a. 输入一个链接名 比如: Hotspot - -b. 输入一个 SSID 比如: Hotspot - -c. 选择模式(mode): Infrastructure - -d. 设备 MAC 地址: 在下拉菜单里选择你的无线设备 - -![](http://i2.wp.com/www.linuxveda.com/wp-content/uploads/2015/08/ubuntu-ap-gnome1.jpg) - -1. 进入Wi-Fi安全选项卡, 选择 WPA & WPA2 Personal 并且输入密码. -1. 进入IPv4设置选项卡, 在Method(方法)下拉菜单里, 选择Shared to other computers(共享至其他电脑). - -![](http://i1.wp.com/www.linuxveda.com/wp-content/uploads/2015/08/ubuntu-ap-gnome4.jpg) - -1. 进入IPv6选项卡, 在Method(方法)里设置为忽略ignore (只有在你不使用IPv6的情况下这么做) -1. 点击 Save(保存) 按钮以保存配置. -1. 从 menu/dash 里打开Terminal. -1. 修改你刚刚使用 network settings 创建的连接. - -使用 VIM 编辑器: - - sudo vim /etc/NetworkManager/system-connections/Hotspot - -使用Gedit 编辑器: - - gksu gedit /etc/NetworkManager/system-connections/Hotspot - -把名字 Hotspot 用你在第4步里起的连接名替换掉. - -![](http://i2.wp.com/www.linuxveda.com/wp-content/uploads/2015/08/ubuntu-ap-gnome2.jpg?resize=640%2C402) - -1. 把 `mode=infrastructure` 改成 `mode=ap` 并且保存文件 -1. 一旦你保存了这个文件, 你应该能在 Wifi 菜单里看到你刚刚建立的AP了. (如果没有的话请再顶栏里 关闭/打开 Wifi 选项一次) - -![](http://i1.wp.com/www.linuxveda.com/wp-content/uploads/2015/08/ubuntu-ap-gnome3.jpg?resize=290%2C375) - -1. 你现在可以把你的设备连上Wifi了. 已经过 Android 5.0的小米4测试.(下载了1GB的文件以测试速度与稳定性) - --------------------------------------------------------------------------------- - -via: http://www.linuxveda.com/2015/08/23/how-to-create-an-ap-in-ubuntu-15-04-to-connect-to-androidiphone/ - -作者:[Sayantan Das][a] -译者:[jerryling315](https://github.com/jerryling315) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxveda.com/author/sayantan_das/ From 8fca2c5bb751b650d65c884f11048df9f6253176 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 8 Sep 2015 09:22:01 +0800 Subject: [PATCH 20/31] translating --- .../20150906 How to Install QGit Viewer in Ubuntu 14.04.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150906 How to Install QGit Viewer in Ubuntu 14.04.md b/sources/tech/20150906 How to Install QGit Viewer in Ubuntu 14.04.md index 0c18bd4c99..747a87b13b 100644 --- a/sources/tech/20150906 How to Install QGit Viewer in Ubuntu 14.04.md +++ b/sources/tech/20150906 How to Install QGit Viewer in Ubuntu 14.04.md @@ -1,3 +1,5 @@ +Translating----geekpi + How to Install QGit Viewer in Ubuntu 14.04 ================================================================================ QGit is a free and Open Source GUI git viewer written on Qt and C++ by Marco Costalba. It is a better git viewer which provides us the ability to browse revisions history, view commits and patches applied to the files under a simple GUI environment. It utilizes git command line to process execute the commands and to display the output. It has some common features like to view revisions, diffs, files history, files annotation, archive tree. We can format and apply patch series with the selected commits, drag and drop commits between two instances and more with QGit Viewer. It allows us to create custom buttons with which we can add more buttons to execute a specific command when pressed using its builtin Action Builder. @@ -110,4 +112,4 @@ via: http://linoxide.com/ubuntu-how-to/install-qgit-viewer-ubuntu-14-04/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/arunp/ \ No newline at end of file +[a]:http://linoxide.com/author/arunp/ From 47fe31595e2bdb312b18e2d74d986c6b727daed9 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 8 Sep 2015 10:08:39 +0800 Subject: [PATCH 21/31] translated --- ... to Install QGit Viewer in Ubuntu 14.04.md | 115 ------------------ ... to Install QGit Viewer in Ubuntu 14.04.md | 113 +++++++++++++++++ 2 files changed, 113 insertions(+), 115 deletions(-) delete mode 100644 sources/tech/20150906 How to Install QGit Viewer in Ubuntu 14.04.md create mode 100644 translated/tech/20150906 How to Install QGit Viewer in Ubuntu 14.04.md diff --git a/sources/tech/20150906 How to Install QGit Viewer in Ubuntu 14.04.md b/sources/tech/20150906 How to Install QGit Viewer in Ubuntu 14.04.md deleted file mode 100644 index 747a87b13b..0000000000 --- a/sources/tech/20150906 How to Install QGit Viewer in Ubuntu 14.04.md +++ /dev/null @@ -1,115 +0,0 @@ -Translating----geekpi - -How to Install QGit Viewer in Ubuntu 14.04 -================================================================================ -QGit is a free and Open Source GUI git viewer written on Qt and C++ by Marco Costalba. It is a better git viewer which provides us the ability to browse revisions history, view commits and patches applied to the files under a simple GUI environment. It utilizes git command line to process execute the commands and to display the output. It has some common features like to view revisions, diffs, files history, files annotation, archive tree. We can format and apply patch series with the selected commits, drag and drop commits between two instances and more with QGit Viewer. It allows us to create custom buttons with which we can add more buttons to execute a specific command when pressed using its builtin Action Builder. - -Here are some easy steps on how we can compile and install QGit Viewer from its source code in Ubuntu 14.04 LTS "Trusty". - -### 1. Installing QT4 Libraries ### - -First of all, we'll need have QT4 Libraries installed in order to run QGit viewer in our ubuntu machine. As apt is the default package manager of ubuntu and QT4 packages is available in the official repository of ubutnu, we'll gonna install qt4-default using apt-get command as shown below. - - $ sudo apt-get install qt4-default - -### 2. Downloading QGit Tarball ### - -After installing Qt4 libraries, we'll gonna install git so that we can clone the Git repository of QGit Viewer for Qt 4 . To do so, we'll run the following apt-get command. - - $ sudo apt-get install git - -Now, we'll clone the repository using git command as shown below. - - $ git clone git://repo.or.cz/qgit4/redivivus.git - - Cloning into 'redivivus'... - remote: Counting objects: 7128, done. - remote: Compressing objects: 100% (2671/2671), done. - remote: Total 7128 (delta 5464), reused 5711 (delta 4438) - Receiving objects: 100% (7128/7128), 2.39 MiB | 470.00 KiB/s, done. - Resolving deltas: 100% (5464/5464), done. - Checking connectivity... done. - -### 3. Compiling QGit ### - -After we have cloned the repository, we'll now enter into the directory named redivivus and create the makefile which we'll require to compile qgit viewer. So, to enter into the directory, we'll run the following command. - - $ cd redivivus - -Next, we'll run the following command in order to generate a new Makefile from qmake project file ie qgit.pro. - - $ qmake qgit.pro - -After the Makefile has been generated, we'll now finally compile the source codes of qgit and get the binary as output. To do so, first we'll need to install make and g++ package so that we can compile, as it is a program written in C++ . - - $ sudo apt-get install make g++ - -Now, we'll gonna compile the codes using make command. - - $ make - -### 4. Installing QGit ### - -As we have successfully compiled the source code of QGit viewer, now we'll surely wanna install it in our Ubuntu 14.04 machine so that we can execute it from our system. To do so, we'll run the following command. - - $ sudo make install - - cd src/ && make -f Makefile install - make[1]: Entering directory `/home/arun/redivivus/src' - make -f Makefile.Release install - make[2]: Entering directory `/home/arun/redivivus/src' - install -m 755 -p "../bin/qgit" "/usr/lib/x86_64-linux-gnu/qt4/bin/qgit" - strip "/usr/lib/x86_64-linux-gnu/qt4/bin/qgit" - make[2]: Leaving directory `/home/arun/redivivus/src' - make[1]: Leaving directory `/home/arun/redivivus/src' - -Next, we'll need to copy the built qgit binary file from bin directory to /usr/bin/ directory so that it will be available as global command. - - $ sudo cp bin/qgit /usr/bin/ - -### 5. Creating Desktop File ### - -As we have successfully installed qgit in our Ubuntu box, we'll now go for create a desktop file so that QGit will be available under Menu or Launcher of our Desktop Environment. To do so, we'll need to create a new file named qgit.desktop under /usr/share/applications/ directory. - - $ sudo nano /usr/share/applications/qgit.desktop - -Then, we'll need to paste the following lines into the file. - - [Desktop Entry] - Name=qgit - GenericName=git GUI viewer - Exec=qgit - Icon=qgit - Type=Application - Comment=git GUI viewer - Terminal=false - MimeType=inode/directory; - Categories=Qt;Development;RevisionControl; - -After done, we'll simply save the file and exit. - -### 6. Running QGit Viewer ### - -After QGit is installed successfully in our Ubuntu box, we can now run it from any launcher or application menu. In order to run QGit from the terminal, we'll need to run as follows. - - $ qgit - -This will open the Qt4 Framework based QGit Viewer in GUI mode. - -![QGit Viewer](http://blog.linoxide.com/wp-content/uploads/2015/07/qgit-viewer.png) - -### Conclusion ### - -QGit is really an awesome QT based git viewer. It is available on all three platforms Linux, Mac OSX and Microsoft Windows. It helps us to easily navigate to the history, revisions, branches and more from the available git repository. It reduces the need of running git command line for the common stuffs like viewing revisions, history, diff, etc as graphical interface of it makes easy to do tasks. The latest version of qgit is also available in the default repository of ubuntu which we can install using **apt-get install qgit** command. So, qgit makes our work pretty fast and easy to do with its simple GUI. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/install-qgit-viewer-ubuntu-14-04/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ diff --git a/translated/tech/20150906 How to Install QGit Viewer in Ubuntu 14.04.md b/translated/tech/20150906 How to Install QGit Viewer in Ubuntu 14.04.md new file mode 100644 index 0000000000..317e610a6f --- /dev/null +++ b/translated/tech/20150906 How to Install QGit Viewer in Ubuntu 14.04.md @@ -0,0 +1,113 @@ +如何在Ubuntu中安装QGit浏览器 +================================================================================ +QGit是一款Marco Costalba用Qt和C++写的开源GUI Git浏览器。它是一款在GUI环境下更好地提供浏览历史记录、提交记录和文件补丁的浏览器。它利用git命令行来执行并显示输出。它有一些常规的功能像浏览历史、比较、文件历史、文件标注、档案树。我们可以格式化并用选中的提交应用补丁,在两个实例之间拖拽并提交等等。它允许我们创建自定义的按钮来用它内置的生成器来执行特定的命令。 + +这里有简单的几步在Ubuntu 14.04 LTS "Trusty"中编译并安装QGit浏览器。 + +### 1. 安装 QT4 库 ### + +首先在ubuntu中运行QGit需要先安装QT4库。由于apt是ubuntu默认的包管理器,同时qt4也在官方的仓库中,因此我们直接用下面的apt-get命令来安装qt4。 + + $ sudo apt-get install qt4-default + +### 2. 下载QGit压缩包 ### + +安装完Qt4之后,我们要安装git,这样我们才能在QGit中克隆git仓库。运行下面的apt-get命令。 + + $ sudo apt-get install git + +现在,我们要使用下面的git命令来克隆仓库。 + + $ git clone git://repo.or.cz/qgit4/redivivus.git + + Cloning into 'redivivus'... + remote: Counting objects: 7128, done. + remote: Compressing objects: 100% (2671/2671), done. + remote: Total 7128 (delta 5464), reused 5711 (delta 4438) + Receiving objects: 100% (7128/7128), 2.39 MiB | 470.00 KiB/s, done. + Resolving deltas: 100% (5464/5464), done. + Checking connectivity... done. + +### 3. 编译 QGit ### + +克隆之后,我们现在进入redivivus的目录,并创建我们编译需要的makefile文件。因此,要进入目录,我们要运行下面的命令。 + + $ cd redivivus + +接下来,我们运行下面的命令从qmake项目也就是qgit.pro来生成新的Makefile。 + + $ qmake qgit.pro + +生成Makefile之后,我们现在终于要编译qgit的源代码并得到二进制的输出。首先我们要安装make和g++包用于编译,因为这是一个用C++写的程序。 + + $ sudo apt-get install make g++ + +现在,我们要用make命令来编译代码了 + + $ make + +### 4. 安装 QGit ### + +成功编译QGit的源码之后,我们就要在Ubuntu 14.04中安装它了,这样就可以在系统中执行它。因此我们将运行下面的命令、 + + $ sudo make install + + cd src/ && make -f Makefile install + make[1]: Entering directory `/home/arun/redivivus/src' + make -f Makefile.Release install + make[2]: Entering directory `/home/arun/redivivus/src' + install -m 755 -p "../bin/qgit" "/usr/lib/x86_64-linux-gnu/qt4/bin/qgit" + strip "/usr/lib/x86_64-linux-gnu/qt4/bin/qgit" + make[2]: Leaving directory `/home/arun/redivivus/src' + make[1]: Leaving directory `/home/arun/redivivus/src' + +接下来,我们需要从bin目录下复制qgit的二进制文件到/usr/bin/,这样我们就可以全局运行它了。 + + $ sudo cp bin/qgit /usr/bin/ + +### 5. 创建桌面文件 ### + +既然我们已经在ubuntu中成功安装了qgit,我们来创建一个桌面文件,这样QGit就可以在我们桌面环境中的菜单或者启动器中找到了。要做到这点,我们要在/usr/share/applications/创建一个新文件叫qgit.desktop。 + + $ sudo nano /usr/share/applications/qgit.desktop + +接下来复制下面的行到文件中。 + + [Desktop Entry] + Name=qgit + GenericName=git GUI viewer + Exec=qgit + Icon=qgit + Type=Application + Comment=git GUI viewer + Terminal=false + MimeType=inode/directory; + Categories=Qt;Development;RevisionControl; + +完成之后,保存并退出。 + +### 6. 运行 QGit 浏览器 ### + +QGit安装完成之后,我们现在就可以从任何启动器或者程序菜单中启动它了。要在终端下面运行QGit,我们可以像下面那样。 + + $ qgit + +这会打开基于Qt4框架GUI模式的QGit。 + +![QGit Viewer](http://blog.linoxide.com/wp-content/uploads/2015/07/qgit-viewer.png) + +### 总结 ### + +QGit是一个很棒的基于QT的git浏览器。它可以在Linux、MAC OSX和 Microsoft Windows所有这三个平台中运行。它帮助我们很容易地浏览历史、版本、分支等等git仓库提供的信息。它减少了使用命令行的方式去执行诸如浏览版本、历史、比较功能的需求,并用图形化的方式来简化了这些任务。最新的qgit版本也在默认仓库中,你可以使用 **apt-get install qgit** 命令来安装。因此。qgit用它简单的GUI使得我们的工作更加简单和快速。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/install-qgit-viewer-ubuntu-14-04/ + +作者:[Arun Pyasi][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ From caffc9312cb2921598ce6c145547562aefd0a2a0 Mon Sep 17 00:00:00 2001 From: cvsher <478990879@qq.com> Date: Tue, 8 Sep 2015 11:08:06 +0800 Subject: [PATCH 22/31] [translated]20150906 How To Set Up Your FTP Server In Linux.md [translated]20150906 How To Set Up Your FTP Server In Linux.md --- ... How To Set Up Your FTP Server In Linux.md | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 translated/tech/20150906 How To Set Up Your FTP Server In Linux.md diff --git a/translated/tech/20150906 How To Set Up Your FTP Server In Linux.md b/translated/tech/20150906 How To Set Up Your FTP Server In Linux.md new file mode 100644 index 0000000000..e2a27dd36b --- /dev/null +++ b/translated/tech/20150906 How To Set Up Your FTP Server In Linux.md @@ -0,0 +1,105 @@ +如何在linux中搭建FTP服务 +===================================================================== +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Setup-FTP-Server-in-Linux.jpg) + +在本教程中,我将会解释如何搭建你自己的FTP服务。但是,首先我们应该来的学习一下FTP是什么。 + +###FTP是什么?### + +[FTP][1] 是文件传输协议(File Transfer Protocol)的缩写。顾名思义,FTP是用于计算机之间通过网络进行文件传输。你可以通过FTP在计算机账户间进行文件传输,也可以在账户和桌面计算机之间传输文件,或者访问在线软件文档。但是,需要注意的是多数的FTP站点的使用率非常高,并且在连接前需要进行多次尝试。 + +FTP地址和HTTP地址(即网页地址)非常相似,只是FTP地址使用ftp://前缀而不是http:// + +###FTP服务器是什么?### + +通常,拥有FTP地址的计算机是专用于接收FTP连接请求的。一台专用于接收FTP连接请求的计算机即为FTP服务器或者FTP站点。 + +现在,我们来开始一个特别的冒险,我们将会搭建一个FTP服务用于和家人、朋友进行文件共享。在本教程,我们将以[vsftpd][2]作为ftp服务。 + +VSFTPD是一个自称为最安全的FTP服务端软件。事实上VSFTPD的前两个字母表示“非常安全的(very secure)”。该软件的构建绕开了FTP协议的漏洞。 + +尽管如此,你应该知道对于安全的文件管理和传输还有更好的解决方法,如:SFTP(使用[OpenSSH][3])。FTP协议对于共享非敏感数据是非常有用和可靠的。 + +####在rpm distributions中安装VSFTPD:#### + +你可以使用如下命令在命令行界面中快捷的安装VSFTPD: + + dnf -y install vsftpd + +####在deb distributions中安装VSFTPD:#### + +你可以使用如下命令在命令行界面中快捷的安装VSFTPD: + + sudo apt-get install vsftpd + +####在Arch distribution中安装VSFTPD:#### + +你可以使用如下命令在命令行界面中快捷的安装VSFTPD: + + sudo apt-get install vsftpd + +####配置FTP服务#### + +多数的VSFTPD配置项都在/etc/vsftpd.conf配置文件中。这个文件本身已经有非常良好的文档说明了,因此,在本节中,我只强调一些你可能进行修改的重要选项。使用man页面查看所有可用的选项和基本的 文档说明: + + man vsftpd.conf + +根据文件系统层级标准,FTP共享文件默认位于/srv/ftp目录中。 + +**允许上传:** + +为了允许ftp用户可以修改文件系统的内容,如上传文件等,“write_enable”标志必须设置为 YES。 + + write_enable=YES + +**允许本地用户登陆:** + +为了允许文件/etc/passwd中记录的用户可以登陆ftp服务,“local_enable”标记必须设置为YES。 + + local_enable=YES + +**匿名用户登陆** + +下面配置内容控制匿名用户是否允许登陆: + + # Allow anonymous login + anonymous_enable=YES + # No password is required for an anonymous login (Optional) + no_anon_password=YES + # Maximum transfer rate for an anonymous client in Bytes/second (Optional) + anon_max_rate=30000 + # Directory to be used for an anonymous login (Optional) + anon_root=/example/directory/ + +**根目录限制(Chroot Jail)** + +(译者注:chroot jail是类unix系统中的一种安全机制,用于修改进程运行的根目录环境,限制该线程不能感知到其根目录树以外的其他目录结构和文件的存在。详情参看[chroot jail][4]) + +有时我们需要设置根目录(chroot)环境来禁止用户离开他们的家(home)目录。在配置文件中增加/修改下面配置开启根目录限制(Chroot Jail): + + chroot_list_enable=YES + chroot_list_file=/etc/vsftpd.chroot_list + +“chroot_list_file”变量指定根目录监狱所包含的文件/目录(译者注:即用户只能访问这些文件/目录) + +最后你必须重启ftp服务,在命令行中输入以下命令: + + sudo systemctl restart vsftpd + +到此为止,你的ftp服务已经搭建完成并且启动了 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/set-ftp-server-linux/ + +作者:[alimiracle][a] +译者:[cvsher](https://github.com/cvsher) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/ali/ +[1]:https://en.wikipedia.org/wiki/File_Transfer_Protocol +[2]:https://security.appspot.com/vsftpd.html +[3]:http://www.openssh.com/ +[4]:https://zh.wikipedia.org/wiki/Chroot From e85221fe828f8879170fabe02cd7d835e971ee89 Mon Sep 17 00:00:00 2001 From: cvsher <478990879@qq.com> Date: Tue, 8 Sep 2015 11:28:29 +0800 Subject: [PATCH 23/31] Update 20150906 How To Set Up Your FTP Server In Linux.md --- .../tech/20150906 How To Set Up Your FTP Server In Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150906 How To Set Up Your FTP Server In Linux.md b/translated/tech/20150906 How To Set Up Your FTP Server In Linux.md index e2a27dd36b..8c754786fe 100644 --- a/translated/tech/20150906 How To Set Up Your FTP Server In Linux.md +++ b/translated/tech/20150906 How To Set Up Your FTP Server In Linux.md @@ -18,7 +18,7 @@ FTP地址和HTTP地址(即网页地址)非常相似,只是FTP地址使用f VSFTPD是一个自称为最安全的FTP服务端软件。事实上VSFTPD的前两个字母表示“非常安全的(very secure)”。该软件的构建绕开了FTP协议的漏洞。 -尽管如此,你应该知道对于安全的文件管理和传输还有更好的解决方法,如:SFTP(使用[OpenSSH][3])。FTP协议对于共享非敏感数据是非常有用和可靠的。 +尽管如此,你应该知道还有更安全的方法进行文件管理和传输,如:SFTP(使用[OpenSSH][3])。FTP协议对于共享非敏感数据是非常有用和可靠的。 ####在rpm distributions中安装VSFTPD:#### From 4f869d3e23e53fd746c3e7761007f9c5680d92de Mon Sep 17 00:00:00 2001 From: cvsher <478990879@qq.com> Date: Tue, 8 Sep 2015 11:46:13 +0800 Subject: [PATCH 24/31] Delete 20150906 How To Set Up Your FTP Server In Linux.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成,删除源文件 --- ... How To Set Up Your FTP Server In Linux.md | 103 ------------------ 1 file changed, 103 deletions(-) delete mode 100644 sources/tech/20150906 How To Set Up Your FTP Server In Linux.md diff --git a/sources/tech/20150906 How To Set Up Your FTP Server In Linux.md b/sources/tech/20150906 How To Set Up Your FTP Server In Linux.md deleted file mode 100644 index 718539b7a1..0000000000 --- a/sources/tech/20150906 How To Set Up Your FTP Server In Linux.md +++ /dev/null @@ -1,103 +0,0 @@ -translating by cvsher -How To Set Up Your FTP Server In Linux -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Setup-FTP-Server-in-Linux.jpg) - -In this lesson, I will explain to you how to Set up your FTP server. But first, let me quickly tell you what is FTP. - -### What is FTP? ### - -[FTP][1] is an acronym for File Transfer Protocol. As the name suggests, FTP is used to transfer files between computers on a network. You can use FTP to exchange files between computer accounts, transfer files between an account and a desktop computer, or access online software archives. Keep in mind, however, that many FTP sites are heavily used and require several attempts before connecting. - -An FTP address looks a lot like an HTTP or website address except it uses the prefix ftp:// instead of http://. - -### What is an FTP Server? ### - -Typically, a computer with an FTP address is dedicated to receive an FTP connection. A computer dedicated to receiving an FTP connection is referred to as an FTP server or FTP site. - -Now, let’s begin a special adventure. We will make FTP server to share files with friends and family. I will use [vsftpd][2] for this purpose. - -VSFTPD is an FTP server software which claims to be the most secure FTP software. In fact, the first two letters in VSFTPD, stand for “very secure”. The software was built around the vulnerabilities of the FTP protocol. - -Nevertheless, you should always remember that there are better solutions for secure transfer and management of files such as SFTP (uses [OpenSSH][3]). The FTP protocol is particularly useful for sharing non-sensitive data and is very reliable at that. - -#### Installing VSFTPD in rpm distributions: #### - -You can quickly install VSFTPD on your server through the command line interface with: - - dnf -y install vsftpd - -#### Installing VSFTPD in deb distributions: #### - -You can quickly install VSFTPD on your server through the command line interface with: - -sudo apt-get install vsftpd - -#### Installing VSFTPD in Arch distribution: #### - -You can quickly install VSFTPD on your server through the command line interface with: - - sudo pacman -S vsftpd - -#### Configuring FTP server #### - -Most VSFTPD’s configuration takes place in /etc/vsftpd.conf. The file itself is well-documented, so this section only highlights some important changes you may want to make. For all available options and basic documentation see the man pages: - - man vsftpd.conf - -Files are served by default from /srv/ftp as per the Filesystem Hierarchy Standard. - -**Enable Uploading:** - -The “write_enable” flag must be set to YES in order to allow changes to the filesystem, such as uploading: - - write_enable=YES - -**Allow Local Users to Login:** - -In order to allow users in /etc/passwd to login, the “local_enable” directive must look like this: - -local_enable=YES - -**Anonymous Login** - -The following lines control whether anonymous users can login: - - # Allow anonymous login - -anonymous_enable=YES -# No password is required for an anonymous login (Optional) -no_anon_password=YES -# Maximum transfer rate for an anonymous client in Bytes/second (Optional) -anon_max_rate=30000 -# Directory to be used for an anonymous login (Optional) -anon_root=/example/directory/ - -**Chroot Jail** - -It is possible to set up a chroot environment, which prevents the user from leaving his home directory. To enable this, add/change the following lines in the configuration file: - - chroot_list_enable=YES chroot_list_file=/etc/vsftpd.chroot_list - -The “chroot_list_file” variable specifies the file in which the jailed users are contained to. - -In the end you must restart your ftp server. Type in your command line - - sudo systemctl restart vsftpd - -That’s it. Your FTP server is up and running. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/set-ftp-server-linux/ - -作者:[alimiracle][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/ali/ -[1]:https://en.wikipedia.org/wiki/File_Transfer_Protocol -[2]:https://security.appspot.com/vsftpd.html -[3]:http://www.openssh.com/ From 00ff0244546b628399bc86e32b36f3637394aa24 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 8 Sep 2015 15:16:30 +0800 Subject: [PATCH 25/31] =?UTF-8?q?20150908-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tall and Configure Plank Dock in Ubuntu.md | 66 +++++++++++++ ... Files Directly From the HDD with GRUB2.md | 96 +++++++++++++++++++ 2 files changed, 162 insertions(+) create mode 100644 sources/tech/20150908 How to Download Install and Configure Plank Dock in Ubuntu.md create mode 100644 sources/tech/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md diff --git a/sources/tech/20150908 How to Download Install and Configure Plank Dock in Ubuntu.md b/sources/tech/20150908 How to Download Install and Configure Plank Dock in Ubuntu.md new file mode 100644 index 0000000000..4f0a5f9ea1 --- /dev/null +++ b/sources/tech/20150908 How to Download Install and Configure Plank Dock in Ubuntu.md @@ -0,0 +1,66 @@ +How to Download, Install, and Configure Plank Dock in Ubuntu +================================================================================ +It’s a well-known fact that Linux is extremely customizable with users having a lot of options to choose from – be it the operating systems’ various distributions or desktop environments available for a single distro. Like users of any other OS, Linux users also have different tastes and preferences, especially when it comes to desktop. + +While some users aren’t particularly bothered about their desktop, others take special care to make sure that their desktop looks cool and attractive, something for which there are various applications available. One such application that brings life to your desktop – especially if you use a global menu on the top – is the dock. There are many dock applications available for Linux; if you’re looking for the simplest one, then look no further than [Plank][1], which we’ll be discussing in this article. + +**Note**: the examples and commands mentioned here have been tested on Ubuntu (version 14.10) and Plank version 0.9.1.1383. + +### Plank ### + +The official documentation describes Plank as the “simplest dock on the planet.” The project’s goal is to provide just what a dock needs, although it’s essentially a library which can be extended to create other dock programs with more advanced features. + +What’s worth mentioning here is that Plank, which comes pre-installed in elementary OS, is the underlying technology for Docky, a popular dock application which is very similar in functionality to Mac OS X’s Dock. + +### Download and Install ### + +You can download and install Plank by executing the following commands on your terminal: + + sudo add-apt-repository ppa:docky-core/stable + sudo apt-get update + sudo apt-get install plank + +Once installed successfully, you can open the application by typing the name Plank in Unity Dash (see image below), or open it from the App Menu if you aren’t using the Unity environment. + +![](https://www.maketecheasier.com/assets/uploads/2015/09/plank-unity-dash.png) + +### Features ### + +Once the Plank dock is enabled, you’ll see it sitting at the center-bottom of your desktop. + +![](https://www.maketecheasier.com/assets/uploads/2015/09/plank-enabled-new.jpg) + +As you can see in the image above, the dock contains some application icons with an orange color indication below those which are currently running. Needless to say, you can click an icon to open that application. Also, a right-click on any application icon will produce some more options that you might be interested in. For example, see the screen-shot below: + +![](https://www.maketecheasier.com/assets/uploads/2015/09/plank-right-click-icons-new.jpg) + +To access the configuration options, you’ll have to do a right-click on Plank’s icon (which is the first one from the left), and then click the Preferences option. This will produce the following window. + +![](https://www.maketecheasier.com/assets/uploads/2015/09/plank-preferences.png) + +As you can see, the preference window consists of two tabs: Appearance and Behavior, with the former being selected by default. The Appearance tab contains settings related to the Plank theme, the dock’s position, and alignment, as well as that related to icons, while the Behavior tab contains settings related to the dock itself. + +![](https://www.maketecheasier.com/assets/uploads/2015/09/plank-behavior-settings.png) + +For example, I changed the position of the dock to Right from within the Appearance tab and locked the icons (which means no “Keep in Dock” option on right-click) from the Behavior tab. + +![](https://www.maketecheasier.com/assets/uploads/2015/09/plank-right-lock-new.jpg) + +As you can see in the screen-shot above, the changes came into effect. Similarly, you can tweak any available setting as per your requirement. + +### Conclusion ### + +Like I said in the beginning, having a dock isn’t mandatory. However, using one definitely makes things convenient, especially if you’ve been using Mac and have recently switched over to Linux for whatever reason. For its part, Plank not only offers simplicity, but dependability and stability as well – the project is well-maintained. + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/download-install-configure-plank-dock-ubuntu/ + +作者:[Himanshu Arora][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/himanshu/ +[1]:https://launchpad.net/plank \ No newline at end of file diff --git a/sources/tech/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md b/sources/tech/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md new file mode 100644 index 0000000000..7de3640532 --- /dev/null +++ b/sources/tech/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md @@ -0,0 +1,96 @@ +How to Run ISO Files Directly From the HDD with GRUB2 +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/07/rundirectiso-featured.png) + +Most Linux distros offer a live environment, which you can boot up from a USB drive, for you to test the system without installing. You can either use it to evaluate the distro or as a disposable OS. While it is easy to copy these onto a USB disk, in certain cases one might want to run the same ISO image often or run different ones regularly. GRUB 2 can be configured so that you do not need to burn the ISOs to disk or use a USB drive, but need to run a live environment directly form the boot menu. + +### Obtaining and checking bootable ISO images ### + +To obtain an ISO image, you should usually visit the website of the desired distribution and download any image that is compatible with your setup. If the image can be started from a USB, it should be able to start from the GRUB menu as well. + +Once the image has finished downloading, you should check its integrity by running a simple md5 check on it. This will output a long combination of numbers and alphanumeric characters + +![](https://www.maketecheasier.com/assets/uploads/2015/07/rundirectiso-md5.png) + +which you can compare against the MD5 checksum provided on the download page. The two should be identical. + +### Setting up GRUB 2 ### + +ISO images contain full systems. All you need to do is direct GRUB2 to the appropriate file, and tell it where it can find the kernel and the initramdisk or initram filesystem (depending on which one your distribution uses). + +In this example, a Kubuntu 15.04 live environment will be set up to run on an Ubuntu 14.04 box as a Grub menu item. It should work for most newer Ubuntu-based systems and derivatives. If you have a different system or want to achieve something else, you can get some ideas on how to do this from one of [these files][1], although it will require a little experience with GRUB. + +In this example the file `kubuntu-15.04-desktop-amd64.iso` + +lives in `/home/maketecheasier/TempISOs/` on `/dev/sda1`. + +To make GRUB2 look for it in the right place, you need to edit the + + /etc/grub.d40-custom + +![](https://www.maketecheasier.com/assets/uploads/2015/07/rundirectiso-40-custom-empty.png) + +To start Kubuntu from the above location, add the following code (after adjusting it to your needs) below the commented section, without modifying the original content. + + menuentry "Kubuntu 15.04 ISO" { + set isofile="/home/maketecheasier/TempISOs/kubuntu-15.04-desktop-amd64.iso" + loopback loop (hd0,1)$isofile + echo "Starting $isofile..." + linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=${isofile} quiet splash + initrd (loop)/casper/initrd.lz + } + +![](https://www.maketecheasier.com/assets/uploads/2015/07/rundirectiso-40-custom-new.png) + +### Breaking down the above code ### + +First set up a variable named `$menuentry`. This is where the ISO file is located. If you want to change to a different ISO, you need to change the bit where it says set `isofile="/path/to/file/name-of-iso-file-.iso"`. + +The next line is where you specify the loopback device; you also need to give it the right partition number. This is the bit where it says + + loopback loop (hd0,1)$isofile + +Note the hd0,1 bit; it is important. This means first HDD, first partition (`/dev/sda1`). + +GRUB’s naming here is slightly confusing. For HDDs, it starts counting from “0”, making the first HDD #0, the second one #1, the third one #2, etc. However, for partitions, it will start counting from 1. First partition is #1, second is #2, etc. There might be a good reason for this but not necessarily a sane one (UX-wise it is a disaster, to be sure).. + +This makes fist disk, first partition, which in Linux would usually look something like `/dev/sda1` become `hd0,1` in GRUB2. The second disk, third partition would be `hd1,3`, and so on. + +The next important line is + + linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=${isofile} quiet splash + +It will load the kernel image. On newer Ubuntu Live CDs, this would be in the `/casper` directory and called `vmlinuz.efi`. If you use a different system, your kernel might be missing the `.efi` extension or be located somewhere else entirely (You can easily check this by opening the ISO file with an archive manager and looking inside `/casper.`). The last options, `quiet splash`, would be your regular GRUB options, if you care to change them. + +Finally + + initrd (loop)/casper/initrd.lz + +will load `initrd`, which is responsible to load a RAMDisk into memory for bootup. + +### Booting into your live system ### + +To make it all work, you will only need to update GRUB2 + + sudo update-grub + +![](https://www.maketecheasier.com/assets/uploads/2015/07/rundirectiso-updare-grub.png) + +When you reboot your system, you should be presented with a new GRUB entry which will allow you to load into the ISO image you’ve just set up. + +![](https://www.maketecheasier.com/assets/uploads/2015/07/rundirectiso-grub-menu.png) + +Selecting the new entry should boot you into the live environment, just like booting from a DVD or USB would. + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/run-iso-files-hdd-grub2/ + +作者:[Attila Orosz][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/attilaorosz/ +[1]:http://git.marmotte.net/git/glim/tree/grub2 \ No newline at end of file From b4e47be63df2f95725301cc0a5cf80c3fa0c820c Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 8 Sep 2015 15:48:28 +0800 Subject: [PATCH 26/31] =?UTF-8?q?20150906-2=20=E9=80=89=E9=A2=98=20Learn?= =?UTF-8?q?=20with=20Linux=20=E4=B8=93=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learn with Linux--Learning Music.md | 155 ++++++++++++++++++ .../Learn with Linux--Learning to Type.md | 121 ++++++++++++++ ...-Master Your Math with These Linux Apps.md | 126 ++++++++++++++ .../Learn with Linux--Physics Simulation.md | 107 ++++++++++++ .../Learn with Linux--Two Geography Apps.md | 103 ++++++++++++ 5 files changed, 612 insertions(+) create mode 100644 sources/tech/Learn with Linux/Learn with Linux--Learning Music.md create mode 100644 sources/tech/Learn with Linux/Learn with Linux--Learning to Type.md create mode 100644 sources/tech/Learn with Linux/Learn with Linux--Master Your Math with These Linux Apps.md create mode 100644 sources/tech/Learn with Linux/Learn with Linux--Physics Simulation.md create mode 100644 sources/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md diff --git a/sources/tech/Learn with Linux/Learn with Linux--Learning Music.md b/sources/tech/Learn with Linux/Learn with Linux--Learning Music.md new file mode 100644 index 0000000000..e6467eb810 --- /dev/null +++ b/sources/tech/Learn with Linux/Learn with Linux--Learning Music.md @@ -0,0 +1,155 @@ +Learn with Linux: Learning Music +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-featured.png) + +This article is part of the [Learn with Linux][1] series: + +- [Learn with Linux: Learning to Type][2] +- [Learn with Linux: Physics Simulation][3] +- [Learn with Linux: Learning Music][4] +- [Learn with Linux: Two Geography Apps][5] +- [Learn with Linux: Master Your Math with These Linux Apps][6] + +Linux offers great educational software and many excellent tools to aid students of all grades and ages in learning and practicing a variety of topics, often interactively. The “Learn with Linux” series of articles offers an introduction to a variety of educational apps and software. + +Learning music is a great pastime. Training your ears to identify scales and chords and mastering an instrument or your own voice requires lots of practise and could become difficult. Music theory is extensive. There is much to memorize, and to turn it into a “skill” you will need diligence. Linux offers exceptional software to help you along your musical journey. They will not help you become a professional musician instantly but could ease the process of learning, being a great aide and reference point. + +### Gnu Solfège ### + +[Solfège][7] is a popular music education method that is used in all levels of music education all around the world. Many popular methods (like the Kodály method) use Solfège as their basis. GNU Solfège is a great software aimed more at practising Solfège than learning it. It assumes the student has already acquired the basics and wishes to practise what they have learned. + +As the developer states on the GNU website: + +> “When you study music on high school, college, music conservatory, you usually have to do ear training. Some of the exercises, like sight singing, is easy to do alone [sic]. But often you have to be at least two people, one making questions, the other answering. […] GNU Solfège tries to help out with this. With Solfege you can practise the more simple and mechanical exercises without the need to get others to help you. Just don’t forget that this program only touches a part of the subject.” + +The software delivers its promise; you can practise essentially everything with audible and visual aids. + +GNU solfege is in the Debian (therefore Ubuntu) repositories. To get it just type the following command into a terminal: + + sudo apt-get install solfege + +When it loads, you find yourself on a simple starting screen/ + +![learnmusic-solfege-main](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-solfege-main.png) + +The number of options is almost overwhelming. Most of the links will open sub-categories + +![learnmusic-solfege-scales](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-solfege-scales.png) + +from where you can select individual exercises. + +![learnmusic-solfege-hun](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-solfege-hun.png) + +There are practice sessions and tests. Both will be able to play the tones through any connected MIDI device or just your sound card’s MIDI player. The exercises often have visual notation and the ability to play back the sequence slowly. + +One important note about Solfège is that under Ubuntu you might not be able to hear anything with the default setup (unless you have a MIDI device connected). If that is the case, head over to “File -> Preferences,” select sound setup and choose the appropriate option for your system (choosing ALSA would probably work in most cases). + +![learnmusic-solfege-midi](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-solfege-midi.png) + +Solfège could be very helpful for your daily practise. Use it regularly and you will have trained your ear before you can sing do-re-mi. + +### Tete (ear trainer) ### + +[Tete][8] (This ear trainer ‘ere) is a Java application for simple, yet efficient, [ear training][9]. It helps you identify a variety of scales by playing thhm back under various circumstances, from different roots and on different MIDI sounds. [Download it from SourceForge][10]. You then need to unzip the downloaded file. + + unzip Tete-* + +Enter the unpacked directory: + + cd Tete-* + +Assuming you have Java installed in your system, you can run the java file with + + java -jar Tete-[your version] + +(To autocomplete the above command, just press the Tab key after typing “Tete-“.) + +Tete has a simple, one-page interface with everything on it. + +![learnmusic-tete-main](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-tete-main.png) + +You can choose to play scales (see above), chords, + +![learnmusic-tete-chords](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-tete-chords.png) + +or intervals. + +![learnmusic-tete-intervals](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-tete-intervals.png) + +You can “fine tune” your experience with various options including the midi instrument’s sound, what note to start from, ascending or descending scales, and how slow/fast the playback should be. Tete’s SourceForge page includes a very useful tutorial that explains most aspects of the software. + +### JalMus ### + +Jalmus is a Java-based keyboard note reading trainer. It works with attached MIDI keyboards or with the on-screen virtual keyboard. It has many simple lessons and exercises to train in music reading. Unfortunately, its development has been discontinued since 2013, but the software appears to still be functional. + +To get Jalmus, head over to the [sourceforge page][11] of its last version (2.3) to get the Java installer, or just type the following command into a terminal: + + wget http://garr.dl.sourceforge.net/project/jalmus/Jalmus-2.3/installjalmus23.jar + +Once the download finishes, load the installer with + + java -jar installjalmus23.jar + +You will be guided through a simple Java-based installer that was made for cross-platform installation. + +Jalmus’s main screen is plain. + +![learnmusic-jalmus-main](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-jalmus-main.jpg) + +You can find lessons of varying difficulty in the Lessons menu. It ranges from very simple ones, where one notes swims in from the left, and the corresponding key lights up on the on screen keyboard … + +![learnmusic-jalmus-singlenote](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-jalmus-singlenote.png) + +… to difficult ones with many notes swimming in from the right, and you are required to repeat the sequence on your keyboard. + +![learnmusic-jalmus-multinote](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-jalmus-multinote.png) + +Jalmus also includes exercises of note reading single notes, which are very similar to the lessons, only without the visual hints, where your score will be displayed after you finished. It also aids rhythm reading of varying difficulty, where the rhythm is both audible and visually marked. A metronome (audible and visual) aids in the understanding + +![learnmusic-jalmus-rhythm](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-jalmus-rhythm.png) + +and score reading where multiple notes will be played + +![learnmusic-jalmus-score](https://www.maketecheasier.com/assets/uploads/2015/07/learnmusic-jalmus-score.png) + +All these options are configurable; you can switch features on and off as you like. + +All things considered, Jalmus probably works best for rhythm training. Although it was not necessarily its intended purpose, the software really excelled in this particular use-case. + +### Notable mentions ### + +#### TuxGuitar #### + +For guitarists, [TuxGuitar][12] works much like Guitar Pro on Windows (and it can also read guitar-pro files). +PianoBooster + +[Piano Booster][13] can help with piano skills. It is designed to play MIDI files, which you can play along with on an attached keyboard, watching the core roll past on the screen. + +### Conclusion ### + +Linux offers many great tools for learning, and if your particular interest is music, your will not be left without software to aid your practice. Surely there are many more excellent software tools available for music students than were mentioned above. Do you know of any? Please let us know in the comments below. + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/linux-learning-music/ + +作者:[Attila Orosz][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/attilaorosz/ +[1]:https://www.maketecheasier.com/series/learn-with-linux/ +[2]:https://www.maketecheasier.com/learn-to-type-in-linux/ +[3]:https://www.maketecheasier.com/linux-physics-simulation/ +[4]:https://www.maketecheasier.com/linux-learning-music/ +[5]:https://www.maketecheasier.com/linux-geography-apps/ +[6]:https://www.maketecheasier.com/learn-linux-maths/ +[7]:https://en.wikipedia.org/wiki/Solf%C3%A8ge +[8]:http://tete.sourceforge.net/index.shtml +[9]:https://en.wikipedia.org/wiki/Ear_training +[10]:http://sourceforge.net/projects/tete/files/latest/download +[11]:http://sourceforge.net/projects/jalmus/files/Jalmus-2.3/ +[12]:http://tuxguitar.herac.com.ar/ +[13]:http://www.linuxlinks.com/article/20090517041840856/PianoBooster.html \ No newline at end of file diff --git a/sources/tech/Learn with Linux/Learn with Linux--Learning to Type.md b/sources/tech/Learn with Linux/Learn with Linux--Learning to Type.md new file mode 100644 index 0000000000..51cef0f1a8 --- /dev/null +++ b/sources/tech/Learn with Linux/Learn with Linux--Learning to Type.md @@ -0,0 +1,121 @@ +Learn with Linux: Learning to Type +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-featured.png) + +This article is part of the [Learn with Linux][1] series: + +- [Learn with Linux: Learning to Type][2] +- [Learn with Linux: Physics Simulation][3] +- [Learn with Linux: Learning Music][4] +- [Learn with Linux: Two Geography Apps][5] +- [Learn with Linux: Master Your Math with These Linux Apps][6] + +Linux offers great educational software and many excellent tools to aid students of all grades and ages in learning and practicing a variety of topics, often interactively. The “Learn with Linux” series of articles offers an introduction to a variety of educational apps and software. + +Typing is taken for granted by many people; today being keyboard savvy often comes as second nature. Yet how many of us still type with two fingers, even if ever so fast? Once typing was taught in schools, but slowly the art of ten-finger typing is giving way to two thumbs. + +The following two applications can help you master the keyboard so that your next thought does not get lost while your fingers catch up. They were chosen for their simplicity and ease of use. While there are some more flashy or better looking typing apps out there, the following two will get the basics covered and offer the easiest way to start out. + +### TuxType (or TuxTyping) ### + +TuxType is for children. Young students can learn how to type with ten fingers with simple lessons and practice their newly-acquired skills in fun games. + +Debian and derivatives (therefore all Ubuntu derivatives) should have TuxType in their standard repositories. To install simply type + + sudo apt-get install tuxtype + +The application starts with a simple menu screen featuring Tux and some really bad midi music (Fortunately the sound can be turned off easily with the icon in the lower left corner.). + +![learntotype-tuxtyping-main](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-tuxtyping-main.jpg) + +The top two choices, “Fish Cascade” and “Comet Zap,” represent typing games, but to start learning you need to head over to the lessons. + +There are forty simple built-in lessons to choose from. Each one of these will take a letter from the keyboard and make the student practice while giving visual hints, such as which finger to use. + +![learntotype-tuxtyping-exd1](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-tuxtyping-exd1.jpg) + +![learntotype-tuxtyping-exd2](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-tuxtyping-exd2.jpg) + +For more advanced practice, phrase typing is also available, although for some reason this is hidden under the options menu. + +![learntotype-tuxtyping-phrase](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-tuxtyping-phrase.jpg) + +The games are good for speed and accuracy as the player helps Tux catch falling fish + +![learntotype-tuxtyping-fish](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-tuxtyping-fish.jpg) + +or zap incoming asteroids by typing the words written over them. + +![learntotype-tuxtyping-zap](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-tuxtyping-zap.jpg) + +Besides being a fun way to practice, these games teach spelling, speed, and eye-to-hand coordination, as you must type while also watching the screen, building a foundation for touch typing, if taken seriously. + +### GNU typist (gtype) ### + +For adults and more experienced typists, there is GNU Typist, a console-based application developed by the GNU project. + +GNU Typist will also be carried by most Debian derivatives’ main repos. Installing it is as easy as typing + + sudo apt-get install gtype + +You will probably not find it in the Applications menu; insteaad you should start it from a terminal window. + + gtype + +The main menu is simple, no-nonsense and frill-free, yet it is evident how much the software has to offer. Typing lessons of all levels are immediately accessible. + +![learntotype-gtype-main](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-gtype-main.png) + +The lessons are straightforward and detailed. + +![learntotype-gtype-lesson](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-gtype-lesson.png) + +The interactive practice sessions offer little more than highlighting your mistakes. Instead of flashy visuals you have to chance to focus on practising. At the end of each lesson you get some simple statistics of how you’ve been doing. If you make too many mistakes, you cannot proceed until you can pass the level. + +![learntotype-gtype-mistake](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-gtype-mistake.png) + +While the basic lessons only require you to repeat some characters, more advanced drills will have the practitioner type either whole sentences, + +![learntotype-gtype-warmup](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-gtype-warmup.png) + +where of course the three percent error margin means you are allowed even fewer mistakes, + +![learntotype-gtype-warmupfail](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-gtype-warmupfail.png) + +or some drills aiming to achieve certain goals, as in the “Balanced keyboard drill.” + +![learntotype-gtype-balanceddrill](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-gtype-balanceddrill.png) + +Simple speed drills have you type quotes, + +![learntotype-gtype-speed-simple](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-gtype-speed-simple.png) + +while more advanced ones will make you write longer texts taken from classics. + +![learntotype-gtype-speed-advanced](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-gtype-speed-advanced.png) + +If you’d prefer a different language, more lessons can also be loaded as command line arguments. + +![learntotype-gtype-more-lessons](https://www.maketecheasier.com/assets/uploads/2015/07/learntotype-gtype-more-lessons.png) + +### Conclusion ### + +If you care to hone your typing skills, Linux has great software to offer. The two basic, yet feature-rich, applications discussed above will cater to most aspiring typists’ needs. If you use or know of another great typing application, please don’t hesitate to let us know below in the comments. + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/learn-to-type-in-linux/ + +作者:[Attila Orosz][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/attilaorosz/ +[1]:https://www.maketecheasier.com/series/learn-with-linux/ +[2]:https://www.maketecheasier.com/learn-to-type-in-linux/ +[3]:https://www.maketecheasier.com/linux-physics-simulation/ +[4]:https://www.maketecheasier.com/linux-learning-music/ +[5]:https://www.maketecheasier.com/linux-geography-apps/ +[6]:https://www.maketecheasier.com/learn-linux-maths/ \ No newline at end of file diff --git a/sources/tech/Learn with Linux/Learn with Linux--Master Your Math with These Linux Apps.md b/sources/tech/Learn with Linux/Learn with Linux--Master Your Math with These Linux Apps.md new file mode 100644 index 0000000000..f9def558fb --- /dev/null +++ b/sources/tech/Learn with Linux/Learn with Linux--Master Your Math with These Linux Apps.md @@ -0,0 +1,126 @@ +Learn with Linux: Master Your Math with These Linux Apps +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-featured.png) + +This article is part of the [Learn with Linux][1] series: + +- [Learn with Linux: Learning to Type][2] +- [Learn with Linux: Physics Simulation][3] +- [Learn with Linux: Learning Music][4] +- [Learn with Linux: Two Geography Apps][5] +- [Learn with Linux: Master Your Math with These Linux Apps][6] + +Linux offers great educational software and many excellent tools to aid students of all grades and ages in learning and practicing a variety of topics, often interactively. The “Learn with Linux” series of articles offers an introduction to a variety of educational apps and software. + +Mathematics is the core of computing. If one would expect a great operating system, such as GNU/Linux, to excel in and discipline, it would be Math. If you seek mathematical applications, you will not be disappointed. Linux offers many excellent tools that will make Mathematics look as intimidating as it ever did, but at least they will simplify your way of using it. + +### Gnuplot ### + +Gnuplot is a command-line scriptable and versatile graphing utility for different platforms. Despite its name, it is not part of the GNU operating system. Although it is not freely licensed, it’s free-ware (meaning it’s copyrighted but free to use). + +To install `gnuplot` on an Ubuntu (or derivative) system, type + + sudo apt-get install gnuplot gnuplot-x11 + +into a terminal window. To start the program, type + + gnuplot + +You will be presented with a simple command line interface + +![learnmath-gnuplot](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-gnuplot.png) + +into which you can start typing functions directly. The plot command will draw a graph. + +Typing, for instance, + + plot sin(x)/x + +into the `gnuplot` prompt, will open another window, wherein the graph is presented. + +![learnmath-gnuplot-plot1](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-gnuplot-plot1.png) + +You can also set different attributes of the graphs in-line. For example, specifying “title” will give them just that. + + plot sin(x) title 'Sine Function', tan(x) title 'Tangent' + +![learnmath-gnuplot-plot2](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-gnuplot-plot2.png) + +You can give things a bit more depth and draw 3D graphs with the `splot` command. + + splot sin(x*y/20) + +![learnmath-gnuplot-plot3](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-gnuplot-plot3.png) + +The plot window has a few basic configuration options, + +![learnmath-gnuplot-options](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-gnuplot-options.png) + +but the true power of `gnuplot` lies within its command line and scripting capabilities. The extensive full documentation of `gnuplot` can be found [here][7] with a great tutorial for the previous version [on the Duke University’s website][8]. + +### Maxima ### + +[Maxima][9] is a computer algebra system developed from the original sources of Macsyma. According to its SourceForge page, + +> “Maxima is a system for the manipulation of symbolic and numerical expressions, including differentiation, integration, Taylor series, Laplace transforms, ordinary differential equations, systems of linear equations, polynomials, sets, lists, vectors, matrices and tensors. Maxima yields high precision numerical results by using exact fractions, arbitrary-precision integers and variable-precision floating-point numbers. Maxima can plot functions and data in two and three dimensions.” + +You will have binary packages for Maxima in most Ubuntu derivatives as well as the Maxima graphical interface. To install them all, type + + sudo apt-get install maxima xmaxima wxmaxima + +into a terminal window. Maxima is a command line utility with not much of a UI, but if you start `wxmaxima`, you’ll get into a simple, yet powerful GUI. + +![learnmath-maxima](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima.png) + +You can start using this by simply starting to type. (Hint: Enter will add more lines; if you want to evaluate an expression, use “Shift + Enter.”) + +Maxima can be used for very simple problems, as it also acts as a calculator, + +![learnmath-maxima-1and1](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-1and1.png) + +and much more complex ones as well. + +![learnmath-maxima-functions](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-functions.png) + +It uses `gnuplot` to draw simple + +![learnmath-maxima-plot](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-plot.png) + +and more elaborate graphs. + +![learnmath-maxima-plot2](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-plot2.png) + +(It needs the `gnuplot-x11` package to display them.) + +Besides beautifying the expressions, Maxima makes it possible to export them in latex format, or do some operations on the highlighted functions with a right-click context menu, + +![learnmath-maxima-menu](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-menu.png) + +while its main menus offer an overwhelming amount of functionality. Of course, Maxima is capable of much more than this. It has an extensive documentation [available online][10]. + +### Conclusion ### + +Mathematics is not an easy subject, and the excellent math software on Linux does not make it look easier, yet these applications make using Mathematics much more straightforward and productive. The above two applications are just an introduction to what Linux has to offer. If you are seriously engaged in math and need even more functionality with great documentation, you should check out the [Mathbuntu project][11]. + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/learn-linux-maths/ + +作者:[Attila Orosz][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/attilaorosz/ +[1]:https://www.maketecheasier.com/series/learn-with-linux/ +[2]:https://www.maketecheasier.com/learn-to-type-in-linux/ +[3]:https://www.maketecheasier.com/linux-physics-simulation/ +[4]:https://www.maketecheasier.com/linux-learning-music/ +[5]:https://www.maketecheasier.com/linux-geography-apps/ +[6]:https://www.maketecheasier.com/learn-linux-maths/ +[7]:http://www.gnuplot.info/documentation.html +[8]:http://people.duke.edu/~hpgavin/gnuplot.html +[9]:http://maxima.sourceforge.net/ +[10]:http://maxima.sourceforge.net/documentation.html +[11]:http://www.mathbuntu.org/ \ No newline at end of file diff --git a/sources/tech/Learn with Linux/Learn with Linux--Physics Simulation.md b/sources/tech/Learn with Linux/Learn with Linux--Physics Simulation.md new file mode 100644 index 0000000000..2a8415dda7 --- /dev/null +++ b/sources/tech/Learn with Linux/Learn with Linux--Physics Simulation.md @@ -0,0 +1,107 @@ +Learn with Linux: Physics Simulation +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/07/physics-fetured.jpg) + +This article is part of the [Learn with Linux][1] series: + +- [Learn with Linux: Learning to Type][2] +- [Learn with Linux: Physics Simulation][3] +- [Learn with Linux: Learning Music][4] +- [Learn with Linux: Two Geography Apps][5] +- [Learn with Linux: Master Your Math with These Linux Apps][6] + +Linux offers great educational software and many excellent tools to aid students of all grades and ages in learning and practicing a variety of topics, often interactively. The “Learn with Linux” series of articles offers an introduction to a variety of educational apps and software. + +Physics is an interesting subject, and arguably the most enjoyable part of any Physics class/lecture are the demonstrations. It is really nice to see physics in action, yet the experiments do not need to be restricted to the classroom. While Linux offers many great tools for scientists to support or conduct experiments, this article will concern a few that would make learning physics easier or more fun. + +### 1. Step ### + +[Step][7] is an interactive physics simulator, part of [KDEEdu, the KDE Education Project][8]. Nobody could better describe what Step does than the people who made it. According to the project webpage, “[Step] works like this: you place some bodies on the scene, add some forces such as gravity or springs, then click “Simulate” and Step shows you how your scene will evolve according to the laws of physics. You can change every property of bodies/forces in your experiment (even during simulation) and see how this will change the outcome of the experiment. With Step, you can not only learn but feel how physics works!” + +While of course it requires Qt and loads of KDE-specific dependencies to work, projects like this (and KDEEdu itself) are part of the reason why KDE is such an awesome environment (if you don’t mind running a heavier desktop, of course). + +Step is in the Debian repositories; to install it on derivatives, simply type + + sudo apt-get install step + +into a terminal. On a KDE system it should have minimal dependencies and install in seconds. + +Step has a simple interface, and it lets you jump right into simulations. + +![physics-step-main](https://www.maketecheasier.com/assets/uploads/2015/07/physics-step-main.png) + +You will find all available objects on the left-hand side. You can have different particles, gas, shaped objects, springs, and different forces in action. (1) If you select an object, a short description of it will appear on the right-hand side (2). On the right you will also see an overview of the “world” you have created (the objects it contains) (3), the properties of the currently selected object (4), and the steps you have taken so far (5). + +![physics-step-parts](https://www.maketecheasier.com/assets/uploads/2015/07/physics-step-parts.png) + +Once you have placed all you wanted on the canvas, just press “Simulate,” and watch the events unfold as the objects interact with each other. + +![physics-step-simulate1](https://www.maketecheasier.com/assets/uploads/2015/07/physics-step-simulate1.png) + +![physics-step-simulate2](https://www.maketecheasier.com/assets/uploads/2015/07/physics-step-simulate2.png) + +![physics-step-simulate3](https://www.maketecheasier.com/assets/uploads/2015/07/physics-step-simulate3.png) + +To get to know Step better you only need to press F1. The KDE Help Center offers a great and detailed Step handbook. + +### 2. Lightspeed ### + +Lightspeed is a simple GTK+ and OpenGL based simulator that is meant to demonstrate the effect of how one might observe a fast moving object. Lightspeed will simulate these effects based on Einstein’s special relativity. According to [their sourceforge page][9] “When an object accelerates to more than a few million meters per second, it begins to appear warped and discolored in strange and unusual ways, and as it approaches the speed of light (299,792,458 m/s) the effects become more and more bizarre. In addition, the manner in which the object is distorted varies drastically with the viewpoint from which it is observed.” + +These effects which come into play at relative velocities are: + +- **The Lorentz contraction** – causes the object to appear shorter +- **The Doppler red/blue shift** – alters the hues of color observed +- **The headlight effect** – brightens or darkens the object +- **Optical aberration** – deforms the object in unusual ways + +Lightspeed is in the Debian repositories; to install it, simply type: + + sudo apt-get install lightspeed + +The user interface is very simple. You get a shape (more can be downloaded from sourceforge) which would move along the x-axis (animation can be started by processing “A” or by selecting it from the object menu). + +![physics-lightspeed](https://www.maketecheasier.com/assets/uploads/2015/08/physics-lightspeed.png) + +You control the speed of its movement with the right-hand side slider and watch how it deforms. + +![physics-lightspeed-deform](https://www.maketecheasier.com/assets/uploads/2015/08/physics-lightspeed-deform.png) + +Some simple controls will allow you to add more visual elements + +![physics-lightspeed-visual](https://www.maketecheasier.com/assets/uploads/2015/08/physics-lightspeed-visual.png) + +The viewing angles can be adjusted by pressing either the left, middle or right button and dragging the mouse or from the Camera menu that also offers some other adjustments like background colour or graphics mode. + +### Notable mention: Physion ### + +Physion looks like an interesting project and a great looking software to simulate physics in a much more colorful and fun way than the above examples would allow. Unfortunately, at the time of writing, the [official website][10] was experiencing problems, and the download page was unavailable. + +Judging from their Youtube videos, Physion must be worth installing once a download line becomes available. Until then we can just enjoy the this video demo. + +注:youtube 视频 + + +Do you have another favorite physics simulation/demonstration/learning applications for Linux? Please share with us in the comments below. + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/linux-physics-simulation/ + +作者:[Attila Orosz][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/attilaorosz/ +[1]:https://www.maketecheasier.com/series/learn-with-linux/ +[2]:https://www.maketecheasier.com/learn-to-type-in-linux/ +[3]:https://www.maketecheasier.com/linux-physics-simulation/ +[4]:https://www.maketecheasier.com/linux-learning-music/ +[5]:https://www.maketecheasier.com/linux-geography-apps/ +[6]:https://www.maketecheasier.com/learn-linux-maths/ +[7]:https://edu.kde.org/applications/all/step +[8]:https://edu.kde.org/ +[9]:http://lightspeed.sourceforge.net/ +[10]:http://www.physion.net/ \ No newline at end of file diff --git a/sources/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md b/sources/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md new file mode 100644 index 0000000000..a31e1f73b4 --- /dev/null +++ b/sources/tech/Learn with Linux/Learn with Linux--Two Geography Apps.md @@ -0,0 +1,103 @@ +Learn with Linux: Two Geography Apps +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-featured.png) + +This article is part of the [Learn with Linux][1] series: + +- [Learn with Linux: Learning to Type][2] +- [Learn with Linux: Physics Simulation][3] +- [Learn with Linux: Learning Music][4] +- [Learn with Linux: Two Geography Apps][5] +- [Learn with Linux: Master Your Math with These Linux Apps][6] + +Linux offers great educational software and many excellent tools to aid students of all grades and ages in learning and practicing a variety of topics, often interactively. The “Learn with Linux” series of articles offers an introduction to a variety of educational apps and software. + +Geography is an interesting subject, used by many of us day to day, often without realizing. But when you fire up GPS, SatNav, or just Google maps, you are using the geographical data provided by this software with the maps drawn by cartographists. When you hear about a certain country in the news or hear financial data being recited, these all fall under the umbrella of geography. And you have some great Linux software to study and practice these, whether it is for school or your own improvement. + +### Kgeography ### + +There are only two geography-related applications readily available in most Linux repositories, and both of these are KDE applications, in fact part of the KDE Educatonal project. Kgeography uses simple color-coded maps of any selected country. + +To install kegeography just type + + sudo apt-get install kgeography + +into a terminal window of any Ubuntu-based distribution. + +The interface is very basic. You are first presented with a picker menu that lets you choose an area map. + +![learn-geography-kgeo-pick](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-kgeo-pick.png) + +On the map you can display the name and capital of any given territory by clicking on it, + +![learn-geography-kgeo-brit](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-kgeo-brit.png) + +and test your knowledge in different quizzes. + +![learn-geography-kgeo-test](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-kgeo-test.png) + +It is an interactive way to test your basic geographical knowledge and could be an excellent tool to help you prepare for exams. + +### Marble ### + +Marble is a somewhat more advanced software, offering a global view of the world without the need of 3D acceleration. + +![learn-geography-marble-main](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-marble-main.png) + +To get Marble, type + + sudo apt-get install marble + +into a terminal window of any Ubuntu-based distribution. + +Marble focuses on cartography, its main view being that of an atlas. + +![learn-geography-marble-atlas](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-marble-atlas.jpg) + +You can have different projections, like Globe or Mercator displayed as defaults, with flat and other exotic views available from a drop-down menu. The surfaces include the basic Atlas view, a full-fledged offline map powered by OpenStreetMap, + +![learn-geography-marble-map](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-marble-map.jpg) + +satellite view (by NASA), + +![learn-geography-marble-satellite](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-marble-satellite.jpg) + +and political and even historical maps of the world, among others. + +![learn-geography-marble-history](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-marble-history.jpg) + +Besides providing great offline maps with different skins and varying amount of data, Marble offers other types of information as well. You can switch on and off various offline info-boxes + +![learn-geography-marble-offline](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-marble-offline.png) + +and online services from the menu. + +![learn-geography-marble-online](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-marble-online.png) + +An interesting online service is Wikipedia integration. Clicking on the little Wiki logos will bring up a pop-up featuring detailed information about the selected places. + +![learn-geography-marble-wiki](https://www.maketecheasier.com/assets/uploads/2015/07/learn-geography-marble-wiki.png) + +The software also includes options for location tracking, route planning, and searching for locations, among other great and useful features. If you enjoy cartography, Marble offers hours of fun exploring and learning. + +### Conclusion ### + +Linux offers many great educational applications, and the subject of geography is no exception. With the above two programs you can learn a lot about our globe and test your knowledge in a fun and interactive manner. + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/linux-geography-apps/ + +作者:[Attila Orosz][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/attilaorosz/ +[1]:https://www.maketecheasier.com/series/learn-with-linux/ +[2]:https://www.maketecheasier.com/learn-to-type-in-linux/ +[3]:https://www.maketecheasier.com/linux-physics-simulation/ +[4]:https://www.maketecheasier.com/linux-learning-music/ +[5]:https://www.maketecheasier.com/linux-geography-apps/ +[6]:https://www.maketecheasier.com/learn-linux-maths/ \ No newline at end of file From be965bed877c7286f652cc1f941d9c1953236027 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 8 Sep 2015 16:18:43 +0800 Subject: [PATCH 27/31] =?UTF-8?q?20150908-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0150908 List Of 10 Funny Linux Commands.md | 185 ++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 sources/tech/20150908 List Of 10 Funny Linux Commands.md diff --git a/sources/tech/20150908 List Of 10 Funny Linux Commands.md b/sources/tech/20150908 List Of 10 Funny Linux Commands.md new file mode 100644 index 0000000000..660bd47ff5 --- /dev/null +++ b/sources/tech/20150908 List Of 10 Funny Linux Commands.md @@ -0,0 +1,185 @@ +List Of 10 Funny Linux Commands +================================================================================ +**Working from the Terminal is really fun. Today, we’ll list really funny Linux commands which will bring smile on your face.** + +### 1. rev ### + +Create a file, type some words in this file, rev command will dump all words written by you in reverse. + + # rev + +![Selection_002](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0021.png) + +![Selection_001](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0011.png) + +### 2. fortune ### + +This command is not install by default, install with apt-get and fortune will display some random sentence. + + crank@crank-System:~$ sudo apt-get install fortune + +![Selection_003](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0031.png) + +Use **-s** option with fortune, it will limit the out to one sentence. + + # fortune -s + +![Selection_004](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0042.png) + +### 3. yes ### + + #yes + +This command will keep displaying the string for infinite time until the process is killed by the user. + + # yes unixmen + +![Selection_005](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0054.png) + +### 4. figlet ### + +This command can be installed with apt-get, comes with some ascii fonts which are located in **/usr/share/figlet**. + + cd /usr/share/figlet + +---------- + + #figlet -f + +e.g. + + #figlet -f big.flf unixmen + +![Selection_006](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0062.png) + +#figlet -f block.flf unixmen + +![Selection_007](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0072.png) + +You can try another options also. + +### 5. asciiquarium ### + +This command will transform your terminal in to a Sea Aquarium. +Download term animator + + # wget http://search.cpan.org/CPAN/authors/id/K/KB/KBAUCOM/Term-Animation-2.4.tar.gz + +Install and Configure above package. + + # tar -zxvf Term-Animation-2.4.tar.gz + # cd Term-Animation-2.4/ + # perl Makefile.PL && make && make test + # sudo make install + +Install following package: + + # apt-get install libcurses-perl + +Download and install asciiquarium + + # wget http://www.robobunny.com/projects/asciiquarium/asciiquarium.tar.gz + # tar -zxvf asciiquarium.tar.gz + # cd asciiquarium_1.0/ + # cp asciiquarium /usr/local/bin/ + +Run, + + # /usr/local/bin/asciiquarium + +![asciiquarium_1.1 : perl_008](http://www.unixmen.com/wp-content/uploads/2015/09/asciiquarium_1.1-perl_008.png) + +### 6. bb ### + + # apt-get install bb + # bb + +See what comes out: + +![Selection_009](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0092.png) + +### 7. sl ### + +Sometimes you type **sl** instead of **ls** by mistake,actually **sl** is a command and a locomotive engine will start moving if you type sl. + + # apt-get install sl + +---------- + + # sl + +![Selection_012](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0122.png) + +### 8. cowsay ### + +Very common command, is will display in ascii form whatever you wants to say. + + apt-get install cowsay + +---------- + + # cowsay + +![Selection_013](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0132.png) + +Or, you can use another character instead of com, such characters are stored in **/usr/share/cowsay/cows** + + # cd /usr/share/cowsay/cows + +---------- + + cowsay -f ghostbusters.cow unixmen + +![Selection_014](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0141.png) + +or + + # cowsay -f bud-frogs.cow Rajneesh + +![Selection_015](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0151.png) + +### 9. toilet ### + +Yes, this is a command, it dumps ascii strings in colored form to the terminal. + + # apt-get install toilet + +---------- + + # toilet --gay unixmen + +![Selection_016](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0161.png) + + toilet -F border -F gay unixmen + +![Selection_020](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_020.png) + + toilet -f mono12 -F metal unixmen + +![Selection_018](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0181.png) + +### 10. aafire ### + +Put you terminal on fire with aafire. + + # apt-get install libaa-bin + +---------- + + # aafire + +![Selection_019](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0191.png) + +That it, Have fun with Linux Terminal!! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/list-10-funny-linux-commands/ + +作者:[Rajneesh Upadhyay][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/rajneesh/ \ No newline at end of file From a5325a3597e9cc719e6676752dbd374568562858 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 9 Sep 2015 08:07:44 +0800 Subject: [PATCH 28/31] PUB:20150820 A Look at What's Next for the Linux Kernel @bazz2 --- ...Look at What's Next for the Linux Kernel.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) rename {translated/talk => published}/20150820 A Look at What's Next for the Linux Kernel.md (77%) diff --git a/translated/talk/20150820 A Look at What's Next for the Linux Kernel.md b/published/20150820 A Look at What's Next for the Linux Kernel.md similarity index 77% rename from translated/talk/20150820 A Look at What's Next for the Linux Kernel.md rename to published/20150820 A Look at What's Next for the Linux Kernel.md index daf3e4d0e3..56969d3b24 100644 --- a/translated/talk/20150820 A Look at What's Next for the Linux Kernel.md +++ b/published/20150820 A Look at What's Next for the Linux Kernel.md @@ -1,24 +1,24 @@ -Linux 内核的发展方向 +对 Linux 内核的发展方向的展望 ================================================================================ ![](http://www.eweek.com/imagesvr_ce/485/290x195cilinux1.jpg) -**即将到来的 Linux 4.2 内核涉及到史上最多的贡献者数量,内核开发者 Jonathan Corbet 如是说。** +** Linux 4.2 内核涉及到史上最多的贡献者数量,内核开发者 Jonathan Corbet 如是说。** -来自西雅图。Linux 内核持续增长:代码量在增加,代码贡献者数量也在增加。而随之而来的一些挑战需要处理一下。以上是 Jonathan Corbet 在今年的 LinuxCon 的内核年度报告上提出的主要观点。以下是他的主要演讲内容: +西雅图报道。Linux 内核持续增长:代码量在增加,代码贡献者数量也在增加。而随之而来的一些挑战需要处理一下。以上是 Jonathan Corbet 在今年的 LinuxCon 的内核年度报告上提出的主要观点。以下是他的主要演讲内容: -Linux 4.2 内核依然处于开发阶段,预计在8月23号释出。Corbet 强调有 1569 名开发者为这个版本贡献了代码,其中 277 名是第一次提交代码。 +Linux 4.2 内核已经于上月底释出。Corbet 强调有 1569 名开发者为这个版本贡献了代码,其中 277 名是第一次提交代码。 越来越多的开发者的加入,内核更新非常快,Corbet 估计现在大概 63 天就能产生一个新的内核里程碑。 Linux 4.2 涉及多方面的更新。其中一个就是引进了 OverLayFS,这是一种只读型文件系统,它可以实现在一个容器之上再放一个容器。 -网络系统对小包传输性能也有了提升,这对于高频传输领域如金融交易而言非常重要。提升的方面主要集中在减小处理数据包的时间的能耗。 +网络系统对小包传输性能也有了提升,这对于高频金融交易而言非常重要。提升的方面主要集中在减小处理数据包的时间的能耗。 依然有新的驱动中加入内核。在每个内核发布周期,平均会有 60 到 80 个新增或升级驱动中加入。 另一个主要更新是实时内核补丁,这个特性在 4.0 版首次引进,好处是系统管理员可以在生产环境中打上内核补丁而不需要重启系统。当补丁所需要的元素都已准备就绪,打补丁的过程会在后台持续而稳定地进行。 -**Linux 安全, IoT 和其他关注点 ** +**Linux 安全, IoT 和其他关注点** 过去一年中,安全问题在开源社区是一个很热的话题,这都归因于那些引发高度关注的事件,比如 Heartbleed 和 Shellshock。 @@ -26,9 +26,9 @@ Linux 4.2 涉及多方面的更新。其中一个就是引进了 OverLayFS,这 他强调说过去 10 年间有超过 3 百万行代码不再被开发者修改,而产生 Shellshock 漏洞的代码的年龄已经是 20 岁了,近年来更是无人问津。 -另一个关注点是 2038 问题,Linux 界的“千年虫”,如果不解决,2000 年出现过的问题还会重现。2038 问题说的是在 2038 年一些 Linux 和 Unix 机器会死机(LCTT:32 位系统记录的时间,在2038年1月19日星期二晚上03:14:07之后的下一秒,会变成负数)。Corbet 说现在离 2038 年还有 23 年时间,现在部署的系统都会考虑 2038 问题。 +另一个关注点是 2038 问题,Linux 界的“千年虫”,如果不解决,2000 年出现过的问题还会重现。2038 问题说的是在 2038 年一些 Linux 和 Unix 机器会死机(LCTT译注:32 位系统记录的时间,在2038年1月19日星期二晚上03:14:07之后的下一秒,会变成负数)。Corbet 说现在离 2038 年还有 23 年时间,现在部署的系统都会考虑 2038 问题。 -Linux 已经开始一些初步的方案来修复 2038 问题了,但做的还远远不够。“现在就要修复这个问题,而不是等 20 年后把这个头疼的问题留给下一代解决,我们却享受着退休的美好时光”。 +Linux 已经启动一些初步的方案来修复 2038 问题了,但做的还远远不够。“现在就要修复这个问题,而不是等 20 年后把这个头疼的问题留给下一代解决,我们却享受着退休的美好时光”。 物联网(IoT)也是 Linux 关注的领域,Linux 是物联网嵌入式操作系统的主要占有者,然而这并没有什么卵用。Corget 认为日渐臃肿的内核对于未来的物联网设备来说肯定过于庞大。 @@ -42,7 +42,7 @@ via: http://www.eweek.com/enterprise-apps/a-look-at-whats-next-for-the-linux-ker 作者:[Sean Michael Kerner][a] 译者:[bazz2](https://github.com/bazz2) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From c85181676da37df61817bfa51f3c481691d0b57b Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 9 Sep 2015 09:11:12 +0800 Subject: [PATCH 29/31] PUB:20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting @jerryling315 --- ... 22 Years of Journey and Still Counting.md | 108 +++++++++++++++++ ... 22 Years of Journey and Still Counting.md | 109 ------------------ 2 files changed, 108 insertions(+), 109 deletions(-) create mode 100644 published/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md delete mode 100644 translated/talk/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md diff --git a/published/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md b/published/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md new file mode 100644 index 0000000000..e14e0ba320 --- /dev/null +++ b/published/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md @@ -0,0 +1,108 @@ +Debian GNU/Linux,22 年未完的美妙旅程 +================================================================================ + +在2015年8月16日, Debian项目组庆祝了 Debian 的22周年纪念日;这也是开源世界历史最悠久、热门的发行版之一。 Debian项目于1993年由Ian Murdock创立。彼时,Slackware 作为最早的 Linux 发行版已经名声在外。 + +![Happy 22nd Birthday to Debian](http://www.tecmint.com/wp-content/uploads/2014/08/Debian-22nd-Birthday.png) + +*22岁生日快乐! Debian Linux!* + +Ian Ashly Murdock, 一个美国职业软件工程师, 在他还是普渡大学的学生时构想出了 Debian 项目的计划。他把这个项目命名为 Debian 是由于这个名字组合了他彼时女友的名字 Debra Lynn 和他自己的名字 Ian。 他之后和 Lynn 结婚并在2008年1月离婚。 + +![Ian Murdock](http://www.tecmint.com/wp-content/uploads/2014/08/Ian-Murdock.jpeg) + +*Debian 创始人:Ian Murdock* + +Ian 目前是 ExactTarget 的平台与开发社区的副总裁。 + +Debian (如同Slackware一样) 都是由于当时缺乏满足合乎标准的发行版才应运而生的。 Ian 在一次采访中说:“免费提供一流的产品会是 Debian 项目的唯一使命。 尽管过去的 Linux 发行版均不尽然可靠抑或是优秀。 我印象里...比如在不同的文件系统间移动文件, 处理大型文件经常会导致内核出错。 但是 Linux 其实是很可靠的, 自由的源代码让这个项目本质上很有前途。” + +"我记得过去我像其他想解决问题的人一样, 想在家里运行一个像 UNIX 的东西。 但那是不可能的, 无论是经济上还是法律上或是别的什么角度。 然后我就听闻了 GNU 内核开发项目, 以及这个项目是如何没有任何法律纷争", Ian 补充到。 他早年在开发 Debian 时曾被自由软件基金会(FSF)资助, 这份资助帮助 Debian 取得了长足的发展; 尽管一年后由于学业原因 Ian 退出了 FSF 转而去完成他的学位。 + +### Debian开发历史 ### + +- **Debian 0.01 – 0.09** : 发布于 1993 年八月 – 1993 年十二月。 +- **Debian 0.91** : 发布于 1994 年一月。 有了原始的包管理系统, 没有依赖管理机制。 +- **Debian 0.93 rc5** : 发布于 1995 年三月。 “现代”意义的 Debian 的第一次发布, 在基础系统安装后会使用dpkg 安装以及管理其他软件包。 +- **Debian 0.93 rc6**: 发布于 1995 年十一月。 最后一次 a.out 发布, deselect 机制第一次出现, 有60位开发者在彼时维护着软件包。 +- **Debian 1.1**: 发布于 1996 年六月。 项目代号 – Buzz, 软件包数量 – 474, 包管理器 dpkg, 内核版本 2.0, ELF 二进制。 +- **Debian 1.2**: 发布于 1996 年十二月。 项目代号 – Rex, 软件包数量 – 848, 开发者数量 – 120。 +- **Debian 1.3**: 发布于 1997 年七月。 项目代号 – Bo, 软件包数量 974, 开发者数量 – 200。 +- **Debian 2.0**: 发布于 1998 年七月。 项目代号 - Hamm, 支持构架 – Intel i386 以及 Motorola 68000 系列, 软件包数量: 1500+, 开发者数量: 400+, 内置了 glibc。 +- **Debian 2.1**: 发布于1999 年三月九日。 项目代号 – slink, 支持构架 - Alpha 和 Sparc, apt 包管理器开始成型, 软件包数量 – 2250。 +- **Debian 2.2**: 发布于 2000 年八月十五日。 项目代号 – Potato, 支持构架 – Intel i386, Motorola 68000 系列, Alpha, SUN Sparc, PowerPC 以及 ARM 构架。 软件包数量: 3900+ (二进制) 以及 2600+ (源代码), 开发者数量 – 450。 有一群人在那时研究并发表了一篇论文, 论文展示了自由软件是如何在被各种问题包围的情况下依然逐步成长为优秀的现代操作系统的。 +- **Debian 3.0**: 发布于 2002 年七月十九日。 项目代号 – woody, 支持构架新增 – HP, PA_RISC, IA-64, MIPS 以及 IBM, 首次以DVD的形式发布, 软件包数量 – 8500+, 开发者数量 – 900+, 支持加密。 +- **Debian 3.1**: 发布于 2005 年六月六日。 项目代号 – sarge, 支持构架 – 新增 AMD64(非官方渠道发布), 内核 – 2.4 以及 2.6 系列, 软件包数量: 15000+, 开发者数量 : 1500+, 增加了诸如 OpenOffice 套件, Firefox 浏览器, Thunderbird, Gnome 2.8, 支持: RAID, XFS, LVM, Modular Installer。 +- **Debian 4.0**: 发布于 2007 年四月八日。 项目代号 – etch, 支持构架 – 如前,包括 AMD64。 软件包数量: 18,200+ 开发者数量 : 1030+, 图形化安装器。 +- **Debian 5.0**: 发布于 2009 年二月十四日。 项目代号 – lenny, 支持构架 – 新增 ARM。 软件包数量: 23000+, 开发者数量: 1010+。 +- **Debian 6.0**: 发布于 2009 年七月二十九日。 项目代号 – squeeze, 包含的软件包: 内核 2.6.32, Gnome 2.3. Xorg 7.5, 同时包含了 DKMS, 基于依赖包支持。 支持构架 : 新增 kfreebsd-i386 以及 kfreebsd-amd64, 基于依赖管理的启动过程。 +- **Debian 7.0**: 发布于 2013 年五月四日。 项目代号: wheezy, 支持 Multiarch, 私有云工具, 升级了安装器, 移除了第三方软件依赖, 全功能多媒体套件-codec, 内核版本 3.2, Xen Hypervisor 4.1.4 ,软件包数量: 37400+。 +- **Debian 8.0**: 发布于 2015 年五月二十五日。 项目代号: Jessie, 将 Systemd 作为默认的初始化系统, 内核版本 3.16, 增加了快速启动(fast booting), service进程所依赖的 cgroups 使隔离部分 service 进程成为可能, 43000+ 软件包。 Sysvinit 初始化工具在 Jessie 中可用。 + +**注意**: Linux的内核第一次是在1991 年十月五日被发布, 而 Debian 的首次发布则在1993 年九月十三日。 所以 Debian 已经在只有24岁的 Linux 内核上运行了整整22年了。 + +### Debian 的那些事 ### + +1994年管理和重整了 Debian 项目以使得其他开发者能更好地加入,所以在那一年并没有发布面向用户的更新, 当然, 内部版本肯定是有的。 + +Debian 1.0 从来就没有被发布过。 一家 CD-ROM 的生产商错误地把某个未发布的版本标注为了 1.0, 为了避免产生混乱, 原本的 Debian 1.0 以1.1的面貌发布了。 从那以后才有了所谓的官方CD-ROM的概念。 + +每个 Debian 新版本的代号都是玩具总动员里某个角色的名字哦。 + +Debian 有四种可用版本: 旧稳定版(old stable), 稳定版(stable), 测试版(testing) 以及 试验版(experimental)。 始终如此。 + +Debian 项目组一直工作在不稳定发行版上, 这个不稳定版本始终被叫做Sid(玩具总动员里那个邪恶的臭小孩)。 Sid是unstable版本的永久名称, 同时Sid也取自'Still In Development"(译者:还在开发中)的首字母。 Sid 将会成为下一个稳定版, 当前的稳定版本代号为 jessie。 + +Debian 的官方发行版只包含开源并且自由的软件, 绝无其他东西. 不过 contrib 和非自由软件包使得安装那些本身自由但是其依赖的软件包不自由(contrib)的软件和非自由软件成为了可能。 + +Debian 是一堆Linux 发行版之母。 举几个例子: + +- Damn Small Linux +- KNOPPIX +- Linux Advanced +- MEPIS +- Ubuntu +- 64studio (不再活跃开发) +- LMDE + +Debian 是世界上最大的非商业 Linux 发行版。它主要是由C编写的(32.1%), 一并的还有其他70多种语言。 + +![Debian 开发语言贡献表](http://www.tecmint.com/wp-content/uploads/2014/08/Debian-Programming.png) + +*Debian 开发语言贡献表,图片来源: [Xmodulo][1]* + +Debian 项目包含6,850万行代码, 以及 450万行空格和注释。 + +国际空间站放弃了 Windows 和红帽子, 进而换成了 Debian - 在上面的宇航员使用落后一个版本的稳定发行版, 目前是 squeeze; 这么做是为了稳定程度以及来自 Debian 社区的雄厚帮助支持。 + +感谢上帝! 我们差点就听到来自国际空间宇航员面对 Windows Metro 界面的尖叫了 :P + +#### 黑色星期三 #### + +2002 年十一月二十日, Twente 大学的网络运营中心(NOC)着火。 当地消防部门放弃了服务器区域。 NOC维护着satie.debian.org 的网站服务器, 这个网站包含了安全、非美国相关的存档、新维护者资料、数量报告、数据库等等;这一切都化为了灰烬。 之后这些服务由 Debian 重建了。 + +#### 未来版本 #### + +下一个待发布版本是 Debian 9, 项目代号 – Stretch, 它会带来什么还是个未知数。 满心期待吧! + +有很多发行版在 Linux 发行版的历史上出现过一瞬间然后很快消失了。 在多数情况下, 维护一个日渐庞大的项目是开发者们面临的挑战。 但这对 Debian 来说不是问题。 Debian 项目有全世界成百上千的开发者、维护者。 它在 Linux 诞生的之初起便一直存在。 + +Debian 在 Linux 生态环境中的贡献是难以用语言描述的。 如果 Debian 没有出现过, 那么 Linux 世界将不会像现在这样丰富和用户友好。 Debian 是为数不多可以被认为安全可靠又稳定的发行版,是作为网络服务器完美选择。 + +这仅仅是 Debian 的一个开始。 它走过了这么长的征程, 并将一直走下去。 未来即是现在! 世界近在眼前! 如果你到现在还从来没有使用过 Debian, 我只想问, 你还再等什么? 快去下载一份镜像试试吧, 我们会在此守候遇到任何问题的你。 + +- [Debian 主页][2] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/happy-birthday-to-debian-gnu-linux/ + +作者:[Avishek Kumar][a] +译者:[jerryling315](http://moelf.xyz) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://xmodulo.com/2013/08/interesting-facts-about-debian-linux.html +[2]:https://www.debian.org/ diff --git a/translated/talk/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md b/translated/talk/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md deleted file mode 100644 index 1c92079b57..0000000000 --- a/translated/talk/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md +++ /dev/null @@ -1,109 +0,0 @@ -Debian GNU/Linux 生日: 22年未完的美妙旅程. -================================================================================ -在2015年8月16日, Debian项目组庆祝了 Debian 的22周年纪念日; 这也是开源世界历史最悠久, 热门的发行版之一. Debian项目于1993年由Ian Murdock创立. 彼时, Slackware 作为最早的 Linux 发行版已经名声在外. - -![Happy 22nd Birthday to Debian](http://www.tecmint.com/wp-content/uploads/2014/08/Debian-22nd-Birthday.png) - -22岁生日快乐! Debian Linux! - -Ian Ashly Murdock, 一个美国职业软件工程师, 在他还是普渡大学的学生时构想出了 Debia n项目的计划. 他把这个项目命名为 Debian 是由于这个名字组合了他彼时女友的名字, Debra Lynn, 和他自己的名字(译者: Ian). 他之后和Lynn顺利结婚并在2008年1月离婚. - -![Ian Murdock](http://www.tecmint.com/wp-content/uploads/2014/08/Ian-Murdock.jpeg) - -Debian 创始人:Ian Murdock - -Ian 目前是 ExactTarget 下 Platform and Development Community 的副总裁. - -Debian (如同Slackware一样) 都是由于当时缺乏满足作者标准的发行版才应运而生的. Ian 在一次采访中说:"免费提供一流的产品会是Debian项目的唯一使命. 尽管过去的 Linux 发行版均不尽然可靠抑或是优秀. 我印象里...比如在不同的文件系统间移动文件, 处理大型文件经常会导致内核出错. 但是 Linux 其实是很可靠的, 免费的源代码让这个项目本质上很有前途. - -"我记得过去我也像其他人一样想解决问题, 想在家里运营一个像 UNIX 的东西. 但那是不可能的, 无论是经济上还是法律上或是别的什么角度. 然后我就听闻了GNU内核开发项目, 以及这个项目是如何没有任何法律纷争", Ian 补充到. 他早年在开发 Debian 时曾被自由软件基金会(FSF)资助, 这份资助帮助 Debian 向前迈了一大步; 尽管一年后由于学业原因 Ian 退出了 FSF 转而去完成他的学位. - -### Debian开发历史 ### - -- **Debian 0.01 – 0.09** : 发布于 1993 八月 – 1993 十二月. -- **Debian 0.91 ** – 发布于 1994 一月. 有了原始的包管理系统, 没有依赖管理机制. -- **Debian 0.93 rc5** : 发布于 1995 三月. "现代"意义的 Debian 的第一次发布, dpkg 会在系统安装后被用作安装以及管理其他软件包. -- **Debian 0.93 rc6**: 发布于1995 十一月. 最后一次a.out发布, deselect机制第一次出现, 有60位开发者在彼时维护着软件包. -- **Debian 1.1**: 发布于1996 六月. 项目代号 – Buzz, 软件包数量 – 474, 包管理器 dpkg, 内核版本 2.0, ELF. -- **Debian 1.2**: 发布于1996 十二月. 项目代号 – Rex, 软件包数量 – 848, 开发者数量 – 120. -- **Debian 1.3**: 发布于1997 七月. 项目代号 – Bo, 软件包数量 974, 开发者数量 – 200. -- **Debian 2.0**: 发布于1998 七月. 项目代号 - Hamm, 支持构架 – Intel i386 以及 Motorola 68000 系列, 软件包数量: 1500+, 开发者数量: 400+, 内置了 glibc. -- **Debian 2.1**: 发布于1999 三月九日. 项目代号 – slink, 支持构架 - Alpha 和 Sparc, apt 包管理器开始成型, 软件包数量 – 2250. -- **Debian 2.2**: 发布于2000 八月十五日. 项目代号 – Potato, 支持构架 – Intel i386, Motorola 68000 系列, Alpha, SUN Sparc, PowerPC 以及 ARM 构架. 软件包数量: 3900+ (二进制) 以及 2600+ (源代码), 开发者数量 – 450. 有一群人在那时研究并发表了一篇论文, 论文展示了自由软件是如何在被各种问题包围的情况下依然逐步成长为优秀的现代操作系统的. -- **Debian 3.0**: 发布于2002 七月十九日. 项目代号 – woody, 支持构架新增– HP, PA_RISC, IA-64, MIPS 以及 IBM, 首次以DVD的形式发布, 软件包数量 – 8500+, 开发者数量 – 900+, 支持加密. -- **Debian 3.1**: 发布于2005 六月六日. 项目代号 – sarge, 支持构架 – 不变基础上新增 AMD64 – 非官方渠道发布, 内核 – 2.4 以及 2.6 系列, 软件包数量: 15000+, 开发者数量 : 1500+, 增加了诸如 – OpenOffice 套件, Firefox 浏览器, Thunderbird, Gnome 2.8, 内核版本 3.3 先进地支持了: RAID, XFS, LVM, Modular Installer. -- **Debian 4.0**: 发布于2007 四月八日. 项目代号 – etch, 支持构架 – 不变基础上新增 AMD64. 软件包数量: 18,200+ 开发者数量 : 1030+, 图形化安装器. -- **Debian 5.0**: Released on February 14th, 发布于2009. 项目代号 – lenny, 支持构架 – 保不变基础上新增 ARM. 软件包数量: 23000+, 开发者数量: 1010+. -- **Debian 6.0**: 发布于2009 七月二十九日. 项目代号 – squeeze, 包含的软件包: 内核 2.6.32, Gnome 2.3. Xorg 7.5, 同时包含了 DKMS, 基于依赖包支持. 支持构架 : 不变基础上新增 kfreebsd-i386 以及 kfreebsd-amd64, 基于依赖管理的启动过程. -- **Debian 7.0**: 发布于2013 五月四日. 项目代号: wheezy, 支持 Multiarch, 私人云工具, 升级了安装器, 移除了第三方软件依赖, 万能的多媒体套件-codec, 内核版本 3.2, Xen Hypervisor 4.1.4 软件包数量: 37400+. -- **Debian 8.0**: 发布于2015 五月二十五日. 项目代号: Jessie, 将 Systemd 作为默认的启动加载器, 内核版本 3.16, 增加了快速启动(fast booting), service进程所依赖的 cgroups 使隔离部分 service 进程成为可能, 43000+ packages. Sysvinit 初始化工具首次在 Jessie 中可用. - -**注意**: Linux的内核第一次是在1991 十月五日被发布, 而 Debian 的首次发布则在1993 九月十三日. 所以 Debian 已经在只有24岁的 Linux 内核上运行了整整22年了. - -### 有关 Debian 的小知识 ### - -1994年被用来管理和重整 Debian 项目以使得其他开发者能更好地加入. 所以在那一年并没有面向用户的更新被发布, 当然, 内部版本肯定是有的. - -Debian 1.0 从来就没有被发布过. 一家 CD-ROM 的生产商错误地把某个未发布的版本标注为了 1.0, 为了避免产生混乱, 原本的 Debian 1.0 以1.1的面貌发布了. 从那以后才有了所谓的官方CD-ROM的概念. - -每个 Debian 新版本的代号都是玩具总动员里某个角色的名字哦. - -Debian 有四种可用版本: 旧稳定版(old stable), 稳定版, 测试版 以及 试验版(experimental). 始终如此. - -Debian 项目组一直致力于开发写一代发行版的不稳定版本, 这个不稳定版本始终被叫做Sid(玩具总动员里那个邪恶的臭小孩). Sid是unstable版本的永久名称, 同时Sid也取自'Still In Development"(译者:还在开发中)的首字母. Sid 将会成为下一个稳定版, 此时的下一个稳定版本代号为 jessie. - -Debian 的官方发行版只包含开源并且免费的软件, 绝无其他东西. 不过contrib 和 不免费的软件包使得安装那些本身免费但是依赖的软件包不免费的软件成为了可能. 那些依赖包本身的证书可能不属于自由/免费软件. - -Debian 是一堆Linux 发行版的母亲. 举几个例子: - -- Damn Small Linux -- KNOPPIX -- Linux Advanced -- MEPIS -- Ubuntu -- 64studio (不再活跃开发) -- LMDE - -Debian 是世界上最大的非商业Linux 发行版.他主要是由C书写的(32.1%), 一并的还有其他70多种语言. - -![Debian 开发语言贡献表](http://www.tecmint.com/wp-content/uploads/2014/08/Debian-Programming.png) - -Debian Contribution - -图片来源: [Xmodulo][1] - -Debian 项目包含6,850万行代码, 以及, 450万行空格和注释. - -国际空间站放弃了 Windows 和红帽子, 进而换成了Debian - 在上面的宇航员使用落后一个版本的稳定发行版, 目前是squeeze; 这么做是为了稳定程度以及来自 Debian 社区的雄厚帮助支持. - -感谢上帝! 我们差点就听到来自国际空间宇航员面对 Windows Metro 界面的尖叫了 :P - -#### 黑色星期三 #### - -2002 十一月而是日, Twente 大学的 Network Operation Center 着火 (NOC). 当地消防部门放弃了服务器区域. NOC维护了satie.debian.org的网站服务器, 这个网站包含了安全, 非美国相关的存档, 新维护者资料, 数量报告, 数据库; 这一切都化为了灰烬. 之后这些服务被使用 Debian 重新实现了. - -#### 未来版本 #### - -下一个待发布版本是 Debian 9, 项目代号 – Stretch, 它会带来什么还是个未知数. 满心期待吧! - -有很多发行版在 Linux 发行版的历史上出现过一瞬然后很快消失了. 在多数情况下, 维护一个日渐庞大的项目是开发者们面临的挑战. 但这对 Debian 来说不是问题. Debian 项目有全世界成百上千的开发者, 维护者. 它在 Linux 诞生的之初起便一直存在. - -Debian 在 Linux 生态环境中的贡献是难以用语言描述的. 如果 Debian 没有出现过, 那么 Linux 世界将不会像现在这样丰富, 用户友好. Debian 是为数不多可以被认为安全可靠又稳定, 是作为网络服务器完美选择的发行版. - -这仅仅是 Debian 的一个开始. 它从远古时代一路走到今天, 并将一直走下去. 未来即是现在! 世界近在眼前! 如果你到现在还从来没有使用过 Debian, 我只想问, 你还再等什么? 快去下载一份镜像试试吧, 我们会在此守候遇到任何问题的你. - -- [Debian 主页][2] - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/happy-birthday-to-debian-gnu-linux/ - -作者:[Avishek Kumar][a] -译者:[jerryling315](http://moelf.xyz) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://xmodulo.com/2013/08/interesting-facts-about-debian-linux.html -[2]:https://www.debian.org/ From 3f0aab56c681a6d185d618a34a6bfe7153c15814 Mon Sep 17 00:00:00 2001 From: "Y.C.S.M" Date: Wed, 9 Sep 2015 10:07:09 +0800 Subject: [PATCH 30/31] Update 20150908 List Of 10 Funny Linux Commands.md update the state of md file --- sources/tech/20150908 List Of 10 Funny Linux Commands.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150908 List Of 10 Funny Linux Commands.md b/sources/tech/20150908 List Of 10 Funny Linux Commands.md index 660bd47ff5..f3acbe27d3 100644 --- a/sources/tech/20150908 List Of 10 Funny Linux Commands.md +++ b/sources/tech/20150908 List Of 10 Funny Linux Commands.md @@ -1,3 +1,4 @@ +translating by tnuoccalanosrep List Of 10 Funny Linux Commands ================================================================================ **Working from the Terminal is really fun. Today, we’ll list really funny Linux commands which will bring smile on your face.** @@ -182,4 +183,4 @@ via: http://www.unixmen.com/list-10-funny-linux-commands/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://www.unixmen.com/author/rajneesh/ \ No newline at end of file +[a]:http://www.unixmen.com/author/rajneesh/ From c1504f802cb1639bcd8f1fdfb5b57fa0ed1eb6a3 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 9 Sep 2015 16:20:09 +0800 Subject: [PATCH 31/31] =?UTF-8?q?20150909-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...l Uptime of System With tuptime Utility.md | 152 ++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 sources/tech/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md diff --git a/sources/tech/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md b/sources/tech/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md new file mode 100644 index 0000000000..d40f1b26af --- /dev/null +++ b/sources/tech/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md @@ -0,0 +1,152 @@ +Linux Server See the Historical and Statistical Uptime of System With tuptime Utility +================================================================================ +You can use the following tools to see how long system has been running on a Linux or Unix-like system: + +- uptime : Tell how long the server has been running. +- lastt : Show the reboot and shutdown time. +- tuptime : Report the historical and statistical running time of system, keeping it between restarts. Like uptime command but with more interesting output. + +#### Finding out the system last reboot time and date #### + +You [can use the following commands to get the last reboot and shutdown time and date on a Linux][1] operating system (also works on OSX/Unix-like system): + + ## Just show system reboot and shutdown date and time ### + who -b + last reboot + last shutdown + ## Uptime info ## + uptime + cat /proc/uptime + awk '{ print "up " $1 /60 " minutes"}' /proc/uptime + w + +**Sample outputs:** + +![Fig.01: Various Linux commands in action to find out the server uptime](http://s0.cyberciti.org/uploads/cms/2015/09/uptime-w-awk-outputs.jpg) + +Fig.01: Various Linux commands in action to find out the server uptime + +**Say hello to tuptime** + +The tuptime command line tool can report the following information on a Linux based system: + +1. Count system startups +1. Register first boot time (a.k.a. installation time) +1. Count nicely and accidentally shutdowns +1. Average uptime and downtime +1. Current uptime +1. Uptime and downtime rate since first boot time +1. Accumulated system uptime, downtime and total +1. Report each startup, uptime, shutdown and downtime + +#### Installation #### + +Type the [following command to clone a git repo on a Linux operating system][2]: + + $ cd /tmp + $ git clone https://github.com/rfrail3/tuptime.git + $ ls + $ cd tuptime + $ ls + +**Sample outputs:** + +![Fig.02: Cloning a git repo](http://s0.cyberciti.org/uploads/cms/2015/09/git-install-tuptime.jpg) + +Fig.02: Cloning a git repo + +Make sure you've Python v2.7 installed with sys, optparse, os, re, string, sqlite3, datetime, disutils, and locale modules. + +You can simply install it as follows: + + $ sudo tuptime-install.sh + +OR do a manual installation (recommended method due to systemd or non-systemd based Linux system): + +$ sudo cp /tmp/tuptime/latest/cron.d/tuptime /etc/cron.d/tuptime + +If is a system with systemd, copy service file and enable it: + + $ sudo cp /tmp/tuptime/latest/systemd/tuptime.service /lib/systemd/system/ + $ sudo systemctl enable tuptime.service + +If the systemd don't have systemd, copy init file: + + $ sudo cp /tmp/tuptime/latest/init.d/tuptime.init.d-debian7 /etc/init.d/tuptime + $ sudo update-rc.d tuptime defaults + +**Run it** + +Simply type the following command: + + $ sudo tuptime + +**Sample outputs:** + +![Fig.03: tuptime in action](http://s0.cyberciti.org/uploads/cms/2015/09/tuptime-output.jpg) + +Fig.03: tuptime in action + +After kernel upgrade I rebooted the box and typed the same command again: + + $ sudo tuptime + System startups: 2 since 03:52:16 PM 08/21/2015 + System shutdowns: 1 ok - 0 bad + Average uptime: 7 days, 16 hours, 48 minutes and 3 seconds + Average downtime: 2 hours, 30 minutes and 5 seconds + Current uptime: 5 minutes and 28 seconds since 06:23:06 AM 09/06/2015 + Uptime rate: 98.66 % + Downtime rate: 1.34 % + System uptime: 15 days, 9 hours, 36 minutes and 7 seconds + System downtime: 5 hours, 0 minutes and 11 seconds + System life: 15 days, 14 hours, 36 minutes and 18 seconds + +You can change date and time format as follows: + + $ sudo tuptime -d '%H:%M:%S %m-%d-%Y' + +**Sample outputs:** + + System startups: 1 since 15:52:16 08-21-2015 + System shutdowns: 0 ok - 0 bad + Average uptime: 15 days, 9 hours, 21 minutes and 19 seconds + Average downtime: 0 seconds + Current uptime: 15 days, 9 hours, 21 minutes and 19 seconds since 15:52:16 08-21-2015 + Uptime rate: 100.0 % + Downtime rate: 0.0 % + System uptime: 15 days, 9 hours, 21 minutes and 19 seconds + System downtime: 0 seconds + System life: 15 days, 9 hours, 21 minutes and 19 seconds + +Enumerate each startup, uptime, shutdown and downtime: + + $ sudo tuptime -e + +**Sample outputs:** + + Startup: 1 at 03:52:16 PM 08/21/2015 + Uptime: 15 days, 9 hours, 22 minutes and 33 seconds + + System startups: 1 since 03:52:16 PM 08/21/2015 + System shutdowns: 0 ok - 0 bad + Average uptime: 15 days, 9 hours, 22 minutes and 33 seconds + Average downtime: 0 seconds + Current uptime: 15 days, 9 hours, 22 minutes and 33 seconds since 03:52:16 PM 08/21/2015 + Uptime rate: 100.0 % + Downtime rate: 0.0 % + System uptime: 15 days, 9 hours, 22 minutes and 33 seconds + System downtime: 0 seconds + System life: 15 days, 9 hours, 22 minutes and 33 seconds + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/hardware/howto-see-historical-statistical-uptime-on-linux-server/ + +作者:Vivek Gite +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://www.cyberciti.biz/hardware/howto-see-historical-statistical-uptime-on-linux-server/ +[2]:http://www.cyberciti.biz/faq/debian-ubunut-linux-download-a-git-repository/ \ No newline at end of file